Skip to content

(CAT-2413) Defaults puppetcore agent version to newest if none given #798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

david22swan
Copy link
Member

@david22swan david22swan commented Jul 25, 2025

When puppetcore is selected without a specified version, this change defaults to the latest 8.x version available.

This prevents errors caused by the download site requiring a version parameter.

Relates to CAT-2413

@david22swan david22swan requested review from bastelfreak and a team as code owners July 25, 2025 10:55
@david22swan david22swan added the bug Something isn't working label Jul 25, 2025
@david22swan david22swan requested a review from joshcooper July 25, 2025 10:55
@david22swan david22swan changed the title (CAT-2413) Defaults to 8.14.0 for puppetcore agent version if non given (CAT-2413) Defaults puppetcore agent version to newest if none given Jul 28, 2025
@david22swan david22swan force-pushed the CAT-2413 branch 2 times, most recently from ccda2cb to 3e0f43f Compare July 28, 2025 11:46
@david22swan

This comment was marked as outdated.

@david22swan

This comment was marked as outdated.

@david22swan david22swan force-pushed the CAT-2413 branch 2 times, most recently from c298169 to 568863c Compare July 29, 2025 09:29
When puppetcore is selected without a specified version, this change defaults to the latest 8.x version available.

This prevents errors caused by the download site requiring a version parameter.

Relates to CAT-2413
map(select(startswith("8."))) |
max_by(split(".") | map(tonumber))')
fi

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, there's no guarantee jq is installed on the system where we're trying to install the agent... Since this latest business is a hack for platforms without package managers, I'm thinking we should just fail if version is unset on Windows and macOS. That way the caller will know it needs to provide an explicit version. Then in CI, it should be easy to run curl | jq on an ubuntu worker and pass the version into the test.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is less of a priority on our end now that the nightly images are up for us to grab.
Was mainly continuing with this for the teams that don't want to use nightlies, but if they haven't commented about it yet then they either have their own solution or aren't running on Windows/Mac

Copy link
Member Author

Choose a reason for hiding this comment

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

Have opened a second PR which adds error messages: #801

else
download_url="${mac_source}?version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}"
download_url="${mac_source}?type=native&version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}"
Copy link
Contributor

Choose a reason for hiding this comment

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

when/why did type become required?

Copy link
Member Author

Choose a reason for hiding this comment

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

A while back, ever since the site started hosting the pdk I think..

Copy link
Member Author

Choose a reason for hiding this comment

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

With multiple products up, an identifier was needed

@david22swan david22swan marked this pull request as draft July 30, 2025 09:04
@david22swan david22swan closed this Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants