[ci] Fix checkout and improve error output for gen_versions_map.sh - #845
Conversation
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
WalkthroughThis update modifies two components: the GitHub Actions workflow for pre-commit checks and the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
hack/gen_versions_map.sh (1)
34-35: DRY up duplicate version‐extraction logic
Both the commit‐ and tag‐lookup blocks use identicalgit show … | awkpipelines. Consider extracting this into a helper function (e.g.get_chart_version ref chart) to reduce code duplication and improve maintainability.Also applies to: 47-48
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/pre-commit.yml(1 hunks)hack/gen_versions_map.sh(2 hunks)
🔇 Additional comments (3)
hack/gen_versions_map.sh (2)
34-34: Expose git show errors by removing stderr suppression
Removing2>/dev/nullensures that failures ingit show(e.g., missing commit or file) will be visible, improving debuggability in CI.
47-47: Expose tag lookup errors for better diagnostics
Now thatgit showon tags emits errors instead of being silenced, you'll get immediate feedback if a chart version isn't present at a given tag..github/workflows/pre-commit.yml (1)
16-18: Checkout full history and all tags for version‐mapping script
Addingfetch-depth: 0andfetch-tags: trueguarantees the CI runs with complete commit history and tag data, which aligns with the updatedgen_versions_map.shlogic.
) Third attempt to fix #842 and #836 tested in https://github.com/cozystack/cozystack/actions/runs/14599981710/job/40955508728?pr=808 Signed-off-by: Andrei Kvapil <kvapss@gmail.com> **Chores** - Improved GitHub Actions workflow to fetch full git history and tags during pre-commit checks. **Refactor** - Updated script behavior to display error messages when version extraction from git fails, making troubleshooting easier. (cherry picked from commit a6b02bf) Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
) Backport of #845 to release-v0.30 Third attempt to fix #842 and #836 tested in https://github.com/cozystack/cozystack/actions/runs/14599981710/job/40955508728?pr=808 Signed-off-by: Andrei Kvapil <kvapss@gmail.com> **Chores** - Improved GitHub Actions workflow to fetch full git history and tags during pre-commit checks. **Refactor** - Updated script behavior to display error messages when version extraction from git fails, making troubleshooting easier. (cherry picked from commit a6b02bf) Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
) Backport of #845 to release-v0.30 Third attempt to fix #842 and #836 tested in https://github.com/cozystack/cozystack/actions/runs/14599981710/job/40955508728?pr=808 Signed-off-by: Andrei Kvapil <kvapss@gmail.com> **Chores** - Improved GitHub Actions workflow to fetch full git history and tags during pre-commit checks. **Refactor** - Updated script behavior to display error messages when version extraction from git fails, making troubleshooting easier. (cherry picked from commit a6b02bf) Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
) Backport of #845 to release-v0.30 Third attempt to fix #842 and #836 tested in https://github.com/cozystack/cozystack/actions/runs/14599981710/job/40955508728?pr=808 Signed-off-by: Andrei Kvapil <kvapss@gmail.com> **Chores** - Improved GitHub Actions workflow to fetch full git history and tags during pre-commit checks. **Refactor** - Updated script behavior to display error messages when version extraction from git fails, making troubleshooting easier. (cherry picked from commit a6b02bf) Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
) Backport of #845 to release-v0.30 Third attempt to fix #842 and #836 tested in https://github.com/cozystack/cozystack/actions/runs/14599981710/job/40955508728?pr=808 Signed-off-by: Andrei Kvapil <kvapss@gmail.com> **Chores** - Improved GitHub Actions workflow to fetch full git history and tags during pre-commit checks. **Refactor** - Updated script behavior to display error messages when version extraction from git fails, making troubleshooting easier. (cherry picked from commit a6b02bf) Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
Third attempt to fix #842 and #836
tested in https://github.com/cozystack/cozystack/actions/runs/14599981710/job/40955508728?pr=808
Signed-off-by: Andrei Kvapil kvapss@gmail.com
Summary by CodeRabbit