chore(ci): compare checkout strategies for version stamping#19096
Draft
davdhacs wants to merge 2 commits intomasterstackrox/stackrox:masterfrom
davdhacs/gha-checkout-experimentstackrox/stackrox:davdhacs/gha-checkout-experimentCopy head branch name to clipboard
Draft
chore(ci): compare checkout strategies for version stamping#19096davdhacs wants to merge 2 commits intomasterstackrox/stackrox:masterfrom davdhacs/gha-checkout-experimentstackrox/stackrox:davdhacs/gha-checkout-experimentCopy head branch name to clipboard
davdhacs wants to merge 2 commits intomasterstackrox/stackrox:masterfrom
davdhacs/gha-checkout-experimentstackrox/stackrox:davdhacs/gha-checkout-experimentCopy head branch name to clipboard
Conversation
Test 5 approaches to get version info with different checkout depths: 1. Full clone (fetch-depth: 0) — current approach, ~17s 2. Blobless clone (filter: blob:none) — full graph, no blobs 3. Shallow + deepen — fetch-depth: 1 then deepen 200 commits 4. VERSION file + SHA — no history needed, ~5s checkout 5. Shallow + GitHub API — get commit count via API Measures checkout time, git describe output, and .git size for each approach to determine the best tradeoff. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
VERSION-based strategies currently assumeBASE_VERSIONis both present and a valid git ref (used in the compare API), which will fail or give misleading results ifVERSIONis missing, empty, or not an exact tag/branch name—consider either hard-coding a known tag for this experiment or validating thatBASE_VERSIONresolves before using it. - The
version-filestrategy changes the version format semantics compared togit describe(no commit count, no dirty marker), so if the goal is to evaluate drop‑in replacements, you may want to more closely mirror the currentgit describeoutput or at least log the differences explicitly in the job output.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `VERSION`-based strategies currently assume `BASE_VERSION` is both present and a valid git ref (used in the compare API), which will fail or give misleading results if `VERSION` is missing, empty, or not an exact tag/branch name—consider either hard-coding a known tag for this experiment or validating that `BASE_VERSION` resolves before using it.
- The `version-file` strategy changes the version format semantics compared to `git describe` (no commit count, no dirty marker), so if the goal is to evaluate drop‑in replacements, you may want to more closely mirror the current `git describe` output or at least log the differences explicitly in the job output.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
|
Images are ready for the commit at 7f83bc8. To use with deploy scripts, first |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19096 +/- ##
=======================================
Coverage 49.52% 49.52%
=======================================
Files 2671 2671
Lines 201582 201582
=======================================
+ Hits 99829 99833 +4
+ Misses 94297 94294 -3
+ Partials 7456 7455 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test 5 approaches to get version info with different checkout depths:
Measures checkout time, git describe output, and .git size for each approach to determine the best tradeoff.
Partially generated by AI.
Description
change me!
User-facing documentation
Testing and quality
Automated testing
How I validated my change
change me!