Fix update-versions.py script to handle certain cases and add additional tests - #124
Fix update-versions.py script to handle certain cases and add additional tests#124Nikhil-Manglore wants to merge 3 commits into
Conversation
Signed-off-by: Nikhil Manglore <nmanglor@amazon.com>
2c56e84 to
93e4775
Compare
|
Warning Review limit reached
Next review available in: 40 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe update script now retrieves bundle versions from ChangesBundle version updates
Sequence Diagram(s)sequenceDiagram
participant UpdateScript as update-versions.py
participant Mainline as origin/mainline
participant Versions as versions.json
participant BundleRules as bundle update rules
UpdateScript->>Mainline: Request bundle version
Mainline-->>Versions: Read versions.json
Versions-->>UpdateScript: Return mainline bundle version
UpdateScript->>BundleRules: Compare current and mainline versions
BundleRules-->>UpdateScript: Apply Valkey or module bump rules
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/update-versions.py`:
- Around line 74-80: Update scripts/update-versions.py lines 74-80 in
get_mainline_bundle_version to return a distinct unavailable-data result when
origin/mainline or the requested block cannot be read, and ensure callers stop
mutation for that result while preserving a separate value for an available
block with no prior bump. Update tests/test_update_versions.py lines 84-94 so
the mock returns each block’s current version for equality testing, and add
separate coverage for unavailable mainline data.
In `@tests/test_update_versions.py`:
- Around line 84-94: Update _mainline_matches_current to return
versions_data[block]["version"] for existing blocks, so it models mainline
equality with the current bundle version instead of a missing lookup. Add a
separate test for mainline lookup failure, after updating the production path to
handle that failure safely.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1417b9d4-7cb2-4655-9960-997d3965ed94
📒 Files selected for processing (2)
scripts/update-versions.pytests/test_update_versions.py
Signed-off-by: Nikhil Manglore <nmanglor@amazon.com>
Signed-off-by: Nikhil Manglore <nmanglor@amazon.com>
Two commits needed manual updates that we have now patched:
Update 1
Valkey Search released version 1.1.1. In Valkey Bundle version 9.1, Search version 1.2.1 already existed so the Valkey Search version correctly didn't update. However the overall Valkey Bundle version still updated from 9.1.1 to 9.1.2. We now handle cases where we only update the Valkey Bundle version if a module or core version is actually bumped in each version block
Update 2
Valkey 8.1.9 released and its GitHub release event fired the release workflow twice, resulting in two dispatches into Valkey Bundle for the same version. The first run correctly bumped the 8.1 block from 8.1.8 to 8.1.9, but the second run bumped it again to 8.1.10 even though nothing had actually changed. Separately, when the Valkey 9.1.1 update ran, the 9.1 block's Valkey Bundle version failed to bump from 9.1.1 to 9.1.2 because the script was skipping the bump whenever the batching branch (valkey-bundle-update) already existed, regardless of whether that specific block had been touched. Both issues are now fixed. We now compares each block's current bundle version to its value on mainline, so a block that hasn't been touched yet on the branch bumps once and a block that has been touched doesn't double-bump on a repeat dispatch.