⚙️ FEATURE-#22: Refactor template execution contract around dotflow start --workflow factory#23
Open
FernandoCelmer wants to merge 45 commits into
Open
⚙️ FEATURE-#22: Refactor template execution contract around dotflow start --workflow factory#23FernandoCelmer wants to merge 45 commits into
FernandoCelmer wants to merge 45 commits into
Conversation
… for externally-scheduled clouds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unify every cloud platform template around a single execution contract built on
dotflow start --workflow <module>.workflow:main. Fixes silent bugs inexecution_mode(was dead config), double scheduling whenscheduler=croncombined with externally-scheduled clouds, and mixed-stale entrypoints across Dockerfiles/handlers. Adds a newdotflow-cloudplatform (README-only), wiresEXECUTION_MODEthrough the post-gen hook, and bumps the generated project's dotflow pin to1.0.0.dev2.Changes by layer
Cookiecutter / hook:
cookiecutter.json— adddotflow-cloudto cloud choices.hooks/post_gen_project.py— exposeEXECUTION_MODEplaceholder.Generated project (
{{cookiecutter.project_name}}/):pyproject.toml— bump pin to1.0.0.dev2; Jinja override forcesscheduler="none"for clouds that schedule externally.{{cookiecutter.module_name}}/workflow.py—main()is now a factory; adds internalworkflow.start(mode=..., resume=...)only for Lambda/alibaba clouds that need it;SchedulerCron+[scheduler]extra dropped for externally-scheduled clouds.README.md— local run instruction updated todotflow start --workflow ...:main --mode ....Container-style clouds (13 platforms):
dotflow start --workflow {{MODULE_NAME}}.workflow:main --mode {{EXECUTION_MODE}}.Lambda-compatible clouds (7 platforms):
handler.pysimplified tomain()(start is internal tomain()via Jinja).handler.handlerfor Lambda,python -cENTRYPOINT for alibaba-fc).New
dotflow-cloudplatform:cloud/dotflow-cloud/README.md+ registry entry withfiles: ["README.md"].Docs (14 READMEs):
Scheduled-cloud override
workflow.pyandpyproject.tomlboth use:Prevents double-scheduling when the user picks
scheduler=crontogether with an externally-scheduled cloud.Known gap (tracked upstream)
checkpoint=yescombined with a CLI-based cloud still silently does nothing becausedotflow startCLI is missing a--resumeflag. Tracked in dotflow-io/dotflow#267. Once shipped, container-style Dockerfiles can emit--resumeconditionally.Test plan
python -m ... workflowleft, noresult = main()left, single CMD shape per cloud family.cloud/registry.jsonparses.cookiecutter gh:dotflow-io/templateswith each cloud option and inspect generated files (pending release).Closes #22