Repository navigation
Resolve real puppet9 package version instead of trusting convenience file - #846
Merged
Merged
Conversation
…file The `puppet-agent-9.x-version` file at passing-agent-SHAs/ reports the eventual release version (e.g. "9.0.0.204.g<sha>", derived from the build's `:version:` field), but pre-9.0.0 nightlies are still packaged under Puppet's next-major pre-release convention (8.99.99.<build>, the build's `:origversion:`). mac/windows/solaris/aix install from a hand-built, exact filename, so passing the "friendly" version as package_version 404s downloading the dmg -- apt/yum are unaffected since they resolve `latest` via repo metadata rather than a literal filename. Reproduced live against an osx-26 agent: the manifest built a URL for puppet-agent-9.0.0.204.g5c75eb0ed-1.osx26.dmg (404), while artifactory only ever published puppet-agent-8.99.99.204.g5c75eb0ed-1.osx26.dmg for that SHA. Resolve the real package version from the build's own YAML (`:origversion:`) instead, so this stays correct across the eventual 9.0.0 cut too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
span786
marked this pull request as ready for review
August 6, 2026 14:17
Contributor
Author
joshcooper
reviewed
Aug 11, 2026
| build_yaml_url = "https://builds.delivery.puppetlabs.net/puppet-agent/#{latest_version_sha}/artifacts/#{latest_version_sha}.yaml" | ||
| build_data = YAML.safe_load(fetch_with_retry.call(build_yaml_url), permitted_classes: [Symbol]) | ||
| origversion = build_data[:origversion] || fail_test("No :origversion found in #{build_yaml_url}") | ||
| latest_version = "#{origversion}.g#{latest_version_sha[0, 9]}" |
Contributor
There was a problem hiding this comment.
This isn't going to work for tagged releases. Suggest using this instead
$ curl -s https://artifactory.delivery.puppetlabs.net/artifactory/generic/api/v1/json/report-9.x | jq -r '."suite-version"'
9.0.0.1.gb19013e48
Contributor
Author
There was a problem hiding this comment.
Good catch, thanks. Switched to the generic suite report (.../artifactory/generic/api/v1/json/report-9.x, suite-version) as suggested -- verified it returns 9.0.0.1.gb19013e48 and that the corresponding dmg exists on artifactory. Pushed in c1a438e.
joshcooper
requested changes
Aug 11, 2026
Per review feedback on #846 (#846 (comment)), resolving the version from a single build's own per-SHA YAML doesn't work once that build is promoted to a tagged release. Use the artifactory generic suite report instead (.../artifactory/generic/api/v1/json/report-9.x), which reports the real, currently-packaged version (`suite-version`) regardless of whether the 9.x suite is on a pre-release or a tagged version. Verified live: report-9.x currently returns suite-version "9.0.0.1.gb19013e48", and the corresponding puppet-agent-9.0.0.1.gb19013e48-1.osx26.dmg exists on artifactory (200 OK). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
joshcooper
approved these changes
Aug 12, 2026
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
puppet agent -treturned exit 6 because the agent couldn't downloadpuppet-agent-9.0.0.204.g5c75eb0ed-1.osx26.dmg(404).test_upgrade_puppet8_to_puppet9.rbused thepuppet-agent-9.x-versionconvenience file frompassing-agent-SHAs/as the literalpackage_versionfor mac/windows/solaris/aix. That file reports the eventual release version (derived from the build's:version:field, e.g.9.0.0.204.g<sha>), but pre-9.0.0 nightlies are still packaged under Puppet's next-major pre-release convention (8.99.99.<build>, the build's:origversion:). mac/windows/solaris/aix install from a hand-built, exact filename, so the mismatch 404s; apt/yum are unaffected since they resolvelatestvia repo metadata.puppet-agent-private'sVERSIONfile was bumped8.99.99→9.0.0(PA-9002), which changed the marketing/informational version reported by the convenience file without changing how packages are actually named — the two values silently diverged.:origversion:) instead of trusting the convenience file. This is correct both now (during the pre-9.0.0 gap) and after the eventual 9.0.0 cut, since it always reads the authoritative field for what actually got packaged.Verified live: derived
latest_version=8.99.99.204.g5c75eb0ed, matching the artifact actually published on artifactory;curl -Iagainst the resulting mac_source URL returns200 OK(previously404).Test plan
8.99.99.204.g5c75eb0ed-1.osx26.dmg) and resolves with200 OKruby -csyntax checktest_upgrade_puppet8_to_puppet9.rbacceptance run against a macOS 26 agent