Skip to content

PREQ-8673: Increase legacy build-number migration buffer to 10000 - #351

Merged
hedinasr merged 1 commit into
masterfrom
fix/hnasr/PREQ-8673-increaseBuildNumberBuffer
Sep 17, 2026
Merged

hedinasr merged 1 commit into
masterfrom
fix/hnasr/PREQ-8673-increaseBuildNumberBuffer

Conversation

@hedinasr

Copy link
Copy Markdown
Contributor

PREQ-8673: Increase the v1→v2 migration seed buffer so new claims skip numbers already published to Artifactory.

Why

When no refs/build-number/* exist yet, v2 seeds MAX_CLAIMED from the legacy GitHub build_number property plus a buffer. The buffer was 1000. Repos such as sonarcloud-webapp kept publishing with v1 after that snapshot, so v2 later re-issued numbers Artifactory already had. multiRepoPromote then 500s (Multiple builds found for sonarcloud-webapp#N).

Change

  • Seed with legacy + 10000 instead of legacy + 1000.
  • Update the shellspec that asserted 42 + 1000 + 1 = 1043 to 10043.

This only affects the first claim in a repo that still has no refs/build-number/*. Repos that already have those refs are unchanged.

Test plan

  • shellspec spec/get_build_number_spec.sh --shell bash — 18 examples, 0 failures

v1 already published far more than 1000 numbers into Artifactory after
the property snapshot. A 10000 gap keeps v2 from re-claiming those
numbers during migration.
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Sep 17, 2026

Copy link
Copy Markdown

PREQ-8673

@sonarqubecloud

Copy link
Copy Markdown

@hedinasr
hedinasr marked this pull request as ready for review September 17, 2026 14:33
@hedinasr
hedinasr requested a review from a team as a code owner September 17, 2026 14:33
@gitar-bot

gitar-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk

Increases the legacy build-number migration buffer from 1000 to 10000 to prevent v2 from re-issuing numbers already published to Artifactory when repos continue publishing with v1 after the initial snapshot. Shellspec test updated accordingly. No issues found.

Review coverage

Functional validation 1 of 1 objectives covered

Rules No rules evaluated

Auto-approval Not enabled · Set up

Implementation Status ✅ 1 of 1 objectives covered
PREQ-8673 - 1 of 1 objectives covered

This PR covers the objective to increase the legacy build-number migration buffer to 10000.

✅ 1 covered here
  • ✅ Increase legacy build-number migration buffer to 10000
Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@hedinasr
hedinasr merged commit 2120607 into master Sep 17, 2026
21 checks passed
@hedinasr
hedinasr deleted the fix/hnasr/PREQ-8673-increaseBuildNumberBuffer branch September 17, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants