enforce version bump in preview#547
Conversation
…easures ## Problem A race condition exists when two PRs modify the same chart concurrently: 1. Both PRs pass version validation against their original base 2. First PR merges, bumping chart to version X 3. Second PR merges, also targeting version X 4. Post-merge validation fails because HEAD and HEAD~1 both have version X This was observed in PR #531, where both #531 and #473 bumped openhands to 0.4.1, causing the post-merge publish workflow to fail. ## Solution 1. Enable 'enforce_version_bump: true' on PR checks (this PR) 2. Enable 'Require branches to be up to date before merging' in GitHub branch protection (requires admin action) The combination ensures PRs always validate against the latest main, preventing the race condition. ## Changes - Add comprehensive documentation in docs/helm-chart-publishing-race-condition.md - Change enforce_version_bump from false to true in preview-helm-charts.yml - Add explanatory comments about the race condition and recommended settings Closes #545 Co-authored-by: openhands <[email protected]>
|
@OpenHands remove the doc update. I simply wanted documentation on the github issue which is already done |
|
I'm on it! aivong-openhands can track my progress at all-hands.dev |
Documentation on the race condition is already present in GitHub issue #545. Co-authored-by: openhands <[email protected]>
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste - Elegant, pragmatic solution to a real problem.
Analysis:
This solves the documented race condition from PR #531 using the simplest possible approach: a boolean flag + existing GitHub branch protection. No new code complexity, no over-engineering, just leveraging infrastructure that already exists.
The documentation is thorough without being bloated. It explains the root cause with verifiable commit SHAs, shows why enforcement alone is insufficient, and provides clear recovery procedures. The workflow comment correctly points out the limitation and references the docs.
Key Insight:
Requires admin coordination to enable "require up-to-date branches" setting, but this is clearly documented and inherent to the problem space. The PR correctly identifies that validation timing is the root issue, not the validation logic itself.
✅ Worth merging: Solves real problem with minimal change and clear documentation.
SummaryI've addressed the reviewer's comment requesting the removal of the documentation file from PR #547. Changes Made
Request Fulfillment Checklist
Current PR StateThe PR now contains only:
The documentation about the race condition is already present in GitHub issue #545, so a separate docs file was unnecessary. PR link: #547 |
Co-authored-by: openhands <[email protected]>
|
is a duplicate of #547 |
Description
This PR addresses the question raised in issue #545 about how enforcement would have prevented the race condition. After investigation, I've documented the true root cause and the complete solution.
Root Cause Discovery
The comment on issue #545 correctly pointed out that PR #531 did bump the openhands chart version and passed its validation check. The investigation revealed:
0.4.0→0.4.1(validation passed against base0.4.0)0.4.0→0.4.1mainat0.4.10.4.1Why Enforcement Alone Is Insufficient
Simply changing
enforce_version_bump: false→truewould NOT have prevented this issue because:origin/mainat the time the PR was created0.4.0→0.4.1= valid bumpComplete Solution
To fully prevent this race condition, both of the following are needed:
enforce_version_bump: truein preview-helm-charts.ymlWhen both are enabled:
0.4.1)0.4.2Helm Chart Checklist
versionfield inChart.yamlfor each modified chartAdditional Notes
Changes in This PR
enforce_version_bumpfromfalsetotrueinpreview-helm-charts.ymlAdmin Action Required
A repository administrator needs to enable:
Fixes #545
This PR was created by an AI assistant (OpenHands) on behalf of @aivong-openhands.