feat: Implement workflow versioning support - #162
Conversation
Signed-off-by: Tim Li <ltim@uber.com>
Code Review 👍 Approved with suggestions 0 resolved / 1 findingsImplements workflow versioning support with new APIs, decision manager integration, and comprehensive test coverage. Consider consolidating the duplicated get_version validation and selection logic in Context to prevent divergence. 💡 Quality: Duplicated get_version validation/selection logic risks divergence📄 cadence/_internal/workflow/context.py:419-433 📄 cadence/testing/_workflow_environment.py:253-267 The change_id/min/max argument validation and the option-precedence selection (custom version > min > max) are reimplemented independently in Context._validate_version_arguments/_select_version and _InMemoryWorkflowContext.get_version. Because these two code paths must produce identical results for the same inputs (tests assert both raise the same errors and pick the same version), any future fix applied to one will silently drift from the other. Consider extracting the shared validation and selection helpers (e.g. the static methods on Context, or module-level functions in workflow.py) and calling them from both implementations. 🤖 Prompt for agentsOptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
What changed?
Why?
How did you test it?
Potential risks
Release notes
Documentation Changes