Update versions1.json as part of version bump - #1004
Conversation
📝 WalkthroughWalkthroughA post-processing step was added to the version update release script that invokes a Python utility for updating documentation versions. The invocation occurs after existing documentation link replacements. No other version-update logic or control flow was modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ci/release/update-version.sh (1)
155-157: Consider adding error handling to ensure partial failures are caught.The approach is correct—placing this after VERSION is written ensures the Python script reads the updated version. However, if
update_doc_versions.pyfails (e.g., missing file, JSON parse error), the bash script will still exit successfully, potentially leaving the repository in an inconsistent state (the same class of problem this PR aims to fix).🛡️ Suggested fix to propagate errors
# Update docs version switcher to include the new version -python ci/utils/update_doc_versions.py +if ! python ci/utils/update_doc_versions.py; then + echo "Error: Failed to update docs version switcher" + exit 1 +fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/release/update-version.sh` around lines 155 - 157, The call to python ci/utils/update_doc_versions.py in update-version.sh can fail silently; ensure failures propagate so the release script exits non-zero: after invoking the script (or at the top of update-version.sh), enable exit-on-error (e.g., set -e / set -o errexit) or check the python command's exit status and echo an error then exit 1 on failure; update references to update_doc_versions.py and the python invocation so any exception (missing file, parse error) aborts the release process rather than allowing a partial/incorrect state.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@ci/release/update-version.sh`:
- Around line 155-157: The call to python ci/utils/update_doc_versions.py in
update-version.sh can fail silently; ensure failures propagate so the release
script exits non-zero: after invoking the script (or at the top of
update-version.sh), enable exit-on-error (e.g., set -e / set -o errexit) or
check the python command's exit status and echo an error then exit 1 on failure;
update references to update_doc_versions.py and the python invocation so any
exception (missing file, parse error) aborts the release process rather than
allowing a partial/incorrect state.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 109687a8-14e3-4921-bf4a-d6a152435f8e
📒 Files selected for processing (1)
ci/release/update-version.sh
|
/merge |
update-version.shupdates VERSION and all associated files, butdocs/cuopt/source/versions1.jsonwas not included. This caused the pre-commit style check to fail on main after the 26.04 burndown version bump --versions1.jsonstill referenced 26.04.00 while VERSION had moved to 26.06.00.This adds a call to
ci/utils/update_doc_versions.pyat the end ofupdate-version.shso the docs version switcher is updated atomically as part of every version bump, rather than relying on the pre-commit hook to catch the gap after the fact.