Part of support non editable workflows: discovery end-point#247
Part of support non editable workflows: discovery end-point#247woutdenolf wants to merge 5 commits into
Conversation
| @@ -0,0 +1,165 @@ | |||
| import logging | |||
There was a problem hiding this comment.
Refactor the task discovery to do both task and workflow discovery.
|
|
||
|
|
||
| @pytest.fixture | ||
| def local_patched_ewoks_worker(monkeypatch): |
There was a problem hiding this comment.
Like ewoksjob and ewokscore.
acc16bd to
bc638d3
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…s, not when the reader thread starts
|
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, |
There was a problem hiding this comment.
Should it not be workflow id here?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
Partial implementation of non-editable workflow support:
v2_1_0POST /api/workflows/discoverin analogy toPOST /api/tasks/discover+ tests in analogy to ewoksjob tests and ewokserver task discovery testsNeeds ewoksjob v1.6.0rc1 which exposes workflow discovery to clients.
The server does not do anything yet with the discovered workflows.