Fix vpk pack duplicate#161
Open
syrle-foronda wants to merge 2 commits into
Open
Conversation
Wrap vpk pack in a try/catch to detect and handle duplicate-version conflicts. Adds logging for attempts and success, sets PlannerVersionExists=true when the error indicates the version already exists (matches "equal or greater" or HTTP 409), and rethrows other errors. This prevents the pipeline from failing when attempting to upload an already-published Planner package while preserving the PlannerVersion variable.
Replace nbgv-based versioning with a deterministic version computed from Build.BuildId and the commit hash (format: 0.1.<BuildId>-beta+<gitHash>). This removes the nbgv tool install/update steps, exposes the computed version as the NBGV_SemVer1 pipeline variable for later steps, and updates error messages to reflect the new variable/flow and avoid references to unexpanded nbgv output.
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.
This pull request updates the build and packaging pipeline for the .NET Upgrade Planner to simplify versioning and improve reliability. The most significant change is the removal of the dependency on the
nbgvtool for versioning, replacing it with a versioning scheme based on the Azure DevOpsBuild.BuildIdand Git commit hash. Additional improvements include better error handling in the packaging step and updates to environment variable usage.Build versioning improvements:
nbgvtool for versioning with a custom version string that usesBuild.BuildIdand a shortened Git commit hash, ensuring monotonically increasing and unique versions. (pipelines/templates/steps-build-planner.yml)PLANNER_SEMVER1environment variable to the newNBGV_SemVer1variable, aligning with the new versioning approach. (pipelines/templates/steps-build-planner.yml) [1] [2]Packaging and error handling:
vpk packstep to gracefully handle cases where the package version already exists, avoiding unnecessary failures and providing clearer log messages. (pipelines/templates/upload-build-planner.yml)