Skip to content

72 support non editable workflows 2 - #254

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

72 support non editable workflows 2#254
woutdenolf wants to merge 6 commits into
mainfrom
72-support-non-editable-workflows-2

Conversation

@woutdenolf

@woutdenolf woutdenolf commented Aug 4, 2026

Copy link
Copy Markdown
Member

Follow up of #247 to complete supporting "remote workflows".

Serve remote workflows, discovered from python packages on the worker side, like normal local workflows.

Local shadowing of remote workflows supports caching, editing and deleting. See changelog for more.

Note: we have been using different terms for the same thing and I tried to pick one in docstrings and function names to be consistent

  • remote workflows: I picked this one
    • remote as in worker-side
    • as opposed to the local JSON files in the resource directory.
  • non-editable workflows: bad name because they can be edited from a REST API pov.
  • python-package workflows
  • python-project workflows
  • discovered workflows

@woutdenolf woutdenolf linked an issue Aug 4, 2026 that may be closed by this pull request
@woutdenolf
woutdenolf force-pushed the 72-support-non-editable-workflows-2 branch from b6f6015 to c93fe4c Compare August 5, 2026 05:45
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.68116% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ewoksserver/app/routes/workflows/backend.py 84.76% 16 Missing ⚠️
src/ewoksserver/app/lifespan.py 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@woutdenolf
woutdenolf force-pushed the 72-support-non-editable-workflows-2 branch 2 times, most recently from d11cb8b to b7313ec Compare August 5, 2026 06:18
@woutdenolf
woutdenolf marked this pull request as ready for review August 5, 2026 06:26
@woutdenolf
woutdenolf marked this pull request as draft August 5, 2026 06:28
@woutdenolf
woutdenolf force-pushed the 72-support-non-editable-workflows-2 branch from b7313ec to b9016b1 Compare August 5, 2026 06:37


def _remote_workflow_index_path(settings: EwoksSettings) -> Path:
return settings.resource_directory / _REMOTE_WORKFLOW_INDEX

@woutdenolf woutdenolf Aug 5, 2026

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.

JSON file that contains a mapping: workflow identifier -> discovery queue.

It gets populated by workflow discovery. Identifiers get removed when shadowed locally due to caching on discovery (opt-out) or workflow editing.

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.

Identifiers get removed when shadowed locally due to caching on discovery (opt-out) or workflow editing.

Can you elaborate on what prompts a removal from the index?

@woutdenolf woutdenolf Aug 5, 2026

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.

An identifier gets removed from the index the moment it gets a local shadow (see save_workflow).

Also when populating the index, if the external identifier exists locally (because it was already shadowed or accidental identifier collision) it does not get added to the index.

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 other words, the moment an identifier exists locally it is a local workflow like any other local workflow.

It has no relation to the external workflow anymore. It just so happens to have the same identifier. That's why I use the word "shadow".

@woutdenolf
woutdenolf marked this pull request as ready for review August 5, 2026 06:41
@woutdenolf
woutdenolf requested a review from loichuder August 5, 2026 06:41

@loichuder loichuder left a comment

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.

Looks good!

As discussed today, let's use "external workflow" instead of "remote workflow" and I'll make a second pass on the PR.

Comment thread src/ewoksserver/app/routes/common/discovery.py Outdated
Comment thread src/ewoksserver/app/routes/common/discovery.py Outdated
Comment thread src/ewoksserver/app/routes/workflows/backend.py Outdated
Comment thread src/ewoksserver/app/routes/workflows/backend.py Outdated


def _remote_workflow_index_path(settings: EwoksSettings) -> Path:
return settings.resource_directory / _REMOTE_WORKFLOW_INDEX

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.

Identifiers get removed when shadowed locally due to caching on discovery (opt-out) or workflow editing.

Can you elaborate on what prompts a removal from the index?

Comment thread src/ewoksserver/app/routes/workflows/router.py Outdated
@woutdenolf
woutdenolf force-pushed the 72-support-non-editable-workflows-2 branch from 70f48ce to 95b0b73 Compare August 5, 2026 15:05
@woutdenolf

Copy link
Copy Markdown
Member Author

Applied suggestions and renamed "remote" to "external". CI failure unrelated.

@woutdenolf
woutdenolf requested a review from loichuder August 8, 2026 06:33
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.

Support non-editable workflows

2 participants