docs: clarify versioningStrategy 0 uses current workflow run_number#2220
Open
jeffreybulanadi wants to merge 2 commits intomicrosoft:mainfrom
Open
Conversation
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
Contributor
There was a problem hiding this comment.
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: 0wording from “CI/CD workflow” to “current workflow run” and add a cross-workflow clarification note. - Update
runNumberOffsetwording for consistency with the “current workflow run” terminology.
…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.
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.
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
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]().