-
Notifications
You must be signed in to change notification settings - Fork 3
chore(cd): Refactor version update action and add new sandbox paths #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(cd): Refactor version update action and add new sandbox paths #60
Conversation
|
📦 Python package built successfully!
|
📝 WalkthroughWalkthroughThe action replaces separate Sequence DiagramsequenceDiagram
participant Workflow as CD Workflow
participant Action as update-config-version
participant Parser as Input Parser
participant Validator as Entry Validator
participant Iterator as Multi-entry Iterator
participant yq as yq Update Engine
participant Octopilot as Octopilot
Workflow->>Action: Call action with versions input<br/>(multi-line format)
Action->>Parser: Parse versions input
Parser->>Parser: Split by lines &<br/>extract --file --key --value
Parser->>Action: Return FILE_PATHS, VERSION_KEYS,<br/>VERSION_VALUES arrays
Action->>Validator: Validate each entry
Validator->>Validator: Check file path format<br/>(no traversal, .yaml/.yml)
Validator->>Validator: Check key format<br/>(yq expression)
Validator->>Validator: Check value format<br/>(semver or SHA)
Validator->>Action: Validation complete
Action->>Iterator: Iterate through arrays
Iterator->>yq: For each entry: perform<br/>yq update on file
yq->>yq: Update configuration value
Iterator->>Octopilot: Apply all per-entry<br/>yq expressions
Octopilot->>Octopilot: Commit changes with<br/>first entry metadata
Octopilot->>Workflow: Return completion status
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60 +/- ##
=======================================
Coverage 73.28% 73.28%
=======================================
Files 93 93
Lines 5199 5199
Branches 757 757
=======================================
Hits 3810 3810
Misses 1147 1147
Partials 242 242
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
🚀 Review App Deployment Started
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.github/actions/update-config-version/action.yml:
- Around line 196-209: Ensure all entries in VERSION_VALUES are identical before
using the first value in git_commit_body: iterate over VERSION_VALUES (the array
populated earlier) and compare each element to VERSION_VALUES[0]; if any differ,
print an error like "ERROR: Conflicting version values" and exit non-zero. Only
after this validation set VERSION_VALUE="${VERSION_VALUES[0]}" and use it in
git_commit_body (keep existing references to ENV and RELEASE_NAME).
- Around line 177-182: The current strict regex validating the variable named
key rejects valid yq paths (e.g., .foo["bar-baz"], .items[0], .foo-bar); replace
the regex check in the action.yml validation block with a looser rule: assert
the string starts with a dot (.) and disallow single-quote characters for shell
safety, but otherwise allow any characters used by yq (including brackets,
quotes, hyphens and digits). Update the validation around the key variable (the
block that currently uses the ^\.?[a-zA-Z0-9_]+... regex) to implement "must
start with '.'" and "must not contain '\''" checks instead of the existing
restrictive pattern so yq-compatible paths are accepted.
…-pipeline-to-push-its-version-to-global
Summary by CodeRabbit
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.