Skip to content

Part of support non editable workflows: discovery end-point#247

Open
woutdenolf wants to merge 5 commits into
mainfrom
72-support-non-editable-workflows
Open

Part of support non editable workflows: discovery end-point#247
woutdenolf wants to merge 5 commits into
mainfrom
72-support-non-editable-workflows

Conversation

@woutdenolf

@woutdenolf woutdenolf commented Jul 13, 2026

Copy link
Copy Markdown
Member

Partial implementation of non-editable workflow support:

  • New API version v2_1_0
  • add POST /api/workflows/discover in analogy to POST /api/tasks/discover + tests in analogy to ewoksjob tests and ewokserver task discovery tests
  • discover on startup

Needs ewoksjob v1.6.0rc1 which exposes workflow discovery to clients.

The server does not do anything yet with the discovered workflows.

@woutdenolf woutdenolf linked an issue Jul 13, 2026 that may be closed by this pull request
@@ -0,0 +1,165 @@
import logging

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor the task discovery to do both task and workflow discovery.



@pytest.fixture
def local_patched_ewoks_worker(monkeypatch):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like ewoksjob and ewokscore.

@woutdenolf woutdenolf changed the title 72 support non editable workflows Part of support non editable workflows: discovery end-point Jul 13, 2026
@woutdenolf
woutdenolf force-pushed the 72-support-non-editable-workflows branch from acc16bd to bc638d3 Compare July 13, 2026 16:09
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ewoksserver/app/routes/common/discovery.py 90.78% 7 Missing ⚠️
src/ewoksserver/app/lifespan.py 77.77% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@woutdenolf
woutdenolf requested a review from a team July 13, 2026 16:42
@woutdenolf

woutdenolf commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

I will push some debug/fix commits for CI but does not fundamentally change the PR.

Edit: the remaining issues are caused by concurrent reading/writing to sqlite db. See ewoks-kit/ewoksjob#344.

modules=modules,
discover_kwargs=discover_kwargs,
worker_options=worker_options,
key=lambda workflow: workflow,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it not be workflow id here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In contrast to task discovery which returns List[TaskDict] the workflow discovery returns List[str] which are graph ids.

For the variable name is graph_id ok?

status_code=status.HTTP_404_NOT_FOUND,
)

print("Discovered workflows not used yet:", identifiers)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to stay?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I wanted to draw attention with an annoying print. Seems like it worked ;-).

There will be another PR after this. But I split to not make it too complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants