Skip to content

docs: clarify versioningStrategy 0 uses current workflow run_number#2220

Open
jeffreybulanadi wants to merge 2 commits intomicrosoft:mainfrom
jeffreybulanadi:docs/2155-versioning-strategy-run-number-accuracy
Open

docs: clarify versioningStrategy 0 uses current workflow run_number#2220
jeffreybulanadi wants to merge 2 commits intomicrosoft:mainfrom
jeffreybulanadi:docs/2155-versioning-strategy-run-number-accuracy

Conversation

@jeffreybulanadi
Copy link
Copy Markdown

Summary

Fixes #2155

The �ersioningStrategy setting 0 documentation stated that Build uses the
un_number "for the CI/CD workflow". In practice, GITHUB_RUN_NUMBER resolves to the run_number of the currently executing workflow -- which is the CI/CD workflow when CI/CD triggers the build, but is the Test Next Major, Test Next Minor, or other workflow's own run_number when those workflows trigger a build instead.

This causes confusion when users configure �ersioningStrategy: 0 and observe that the build number increments using a different counter than expected when non-CI/CD workflows trigger the build.

Root Cause

The ReadSettings action resolves \ directly, which is always the current workflow's run_number. The documentation used "CI/CD workflow" as a specific reference when it should say "current workflow run".

Changes

  • Scenarios/settings.md: Updated strategy 0 description from "for the CI/CD workflow" to "of the current workflow run" and added a note clarifying the cross-workflow behavior.
  • Scenarios/settings.md: Updated
    unNumberOffset description from "the CI/CD workflow uses" to "the current workflow run uses" for consistency.

How to Test

Documentation change only -- no code is modified. Verify by reading the updated �ersioningStrategy section in Scenarios/settings.md and confirming it accurately describes the behavior in Actions/ReadSettings/ReadSettings.ps1 where .appBuild = .runNumberOffset + [Int32]().

Strategy 0 documentation stated the build number is the run_number
'for the CI/CD workflow'. In practice, \ resolves
to the run_number of the currently executing workflow -- which is the
CI/CD workflow when CI/CD triggers the build, but is the Test Next
Major, Test Next Minor, or other workflow's own run_number when those
workflows trigger a build instead.

Add an explicit note in the strategy 0 description and update the
runNumberOffset setting description to say 'current workflow run'
rather than 'CI/CD workflow', so users are not surprised when
non-CI/CD builds produce a version number based on a different
run_number sequence.

Fixes microsoft#2155
Copilot AI review requested due to automatic review settings April 21, 2026 12:12
@jeffreybulanadi jeffreybulanadi requested a review from a team as a code owner April 21, 2026 12:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Clarifies AL-Go’s versioningStrategy: 0 documentation to reflect that GitHub run_number is taken from the currently executing workflow run, which can differ from CI/CD when other workflows (e.g., Test Next Major/Minor) trigger builds.

Changes:

  • Update versioningStrategy: 0 wording from “CI/CD workflow” to “current workflow run” and add a cross-workflow clarification note.
  • Update runNumberOffset wording for consistency with the “current workflow run” terminology.

Comment thread Scenarios/settings.md Outdated
Comment thread Scenarios/settings.md Outdated
…mberOffset

- versioningStrategy: replace 'Currently 3 versioning strategies are
  supported' with 'The following versioning strategies are supported'
  to avoid a hardcoded count that is inconsistent with the four
  documented strategies (0, 2, 3, 15) plus the +16 modifier.
- runNumberOffset: extend the applicable strategies from '0' to
  '0, 3, or 15' to match the actual behavior in ReadSettings.ps1
  where runNumberOffset is applied to GITHUB_RUN_NUMBER for all
  three strategies.
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.

[Bug]: Versioning strategy 0 does not take the CI/CD workflow run number as documented

2 participants