-
Notifications
You must be signed in to change notification settings - Fork 193
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
(PA-1887) Fix osfamily::darwin OSX version regex #278
Conversation
e7cc979
to
2d27966
Compare
A quick sanity run (https://cinext-jenkinsmaster-enterprise-prod-1.delivery.puppetlabs.net/job/experimental_test_playground_2017.3.2_2017.3.6-rc0-5-gcd13eb0_automate_run_pe_acceptance_tests/8/ and https://github.com/ekinanp/pe_acceptance_tests/commit/321af32f2bd4a426a93a926d2618c1f00af8427c for the r10k change) indicates that this PR does not break anything, so this should be good for a merge. |
CLA signed by all contributors. |
We should also update the spec test at https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/master/spec/classes/puppet_agent_osfamily_darwin_spec.rb#L53 |
2d27966
to
3e5d825
Compare
@MikaelSmith Oh forgot to tell you that I updated the spec test |
This should probably have a ticket, since it will fix upgrades for 10.12 and 10.13. I assume those wouldn't work before. |
What's interesting is those worked and still work fine -- the reason is b/c the old regex was wrong, it was using character classes. I talk about it a bit more in the commit message. I can file the ticket though. |
Oh gotcha. Probably still worth ensuring we have a release note about now enforcing macOS version checks. |
The previous regex used a character class instead of a union to match the major Mac OSX product version, which would match values such as "10.14", "10.15". This meant that the puppet_agent module would think these are supported platforms, and proceed further with the installation (failing at a different point, which would produce a harder-to-read error message). This commit fixes things so that non-supported Mac OSX platforms correctly fail in the osfamily::darwin class with a readable error message.
@MikaelSmith Ok, I filed PA-1887 for this work and it seems that the CI checks have passed. |
The previous regex used a character class instead of a union to
match the major Mac OSX product version, which would match values
such as "10.14", "10.15". This meant that the puppet_agent module
would think these are supported platforms, and proceed further with
the installation (failing at a different point, which would produce
a harder-to-read error message). This commit fixes things so that
non-supported Mac OSX platforms correctly fail in the osfamily::darwin
class with a readable error message.