Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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#19096
davdhacs wants to merge 2 commits intomasterstackrox/stackrox:masterfrom
davdhacs/gha-checkout-experimentstackrox/stackrox:davdhacs/gha-checkout-experimentCopy head branch name to clipboard

Conversation

@davdhacs
Copy link
Contributor

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.

Description

change me!

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

change me!

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>
@openshift-ci
Copy link

openshift-ci bot commented Feb 18, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Feb 18, 2026

Images are ready for the commit at 7f83bc8.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-144-g7f83bc819b.

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.52%. Comparing base (adc404b) to head (7f83bc8).
⚠️ Report is 1 commits behind head on master.

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     
Flag Coverage Δ
go-unit-tests 49.52% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.