Skip to content
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

Include Big Sur vers "11" in mac_softwareupdate modern pattern condition #58247

Merged
merged 17 commits into from Sep 9, 2020

Conversation

sheagcraig
Copy link
Collaborator

@sheagcraig sheagcraig commented Aug 19, 2020

What does this PR do?

Apparently Apple is using both "10.16" and "11" for versioning Big Sur, depending on where you look. The mac_softwareupdate module uses a different regex depending on OS version, and the determination was based on the osrelease_info grain. This results in a Big Sur machine not using the correct regex; osrelease_info[1] is 0 for Big Sur.

This PR simply adds an additional clause to the if statement to handle osmajorrelease > 10.

What issues does this PR fix or reference?

Fixes:

  • Failure of mac_softwareupdate module to correctly parse shell output from the softwareupdate command on Big Sur.

Previous Behavior

  • No results.

New Behavior

  • Results are correctly parsed.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@sheagcraig sheagcraig requested a review from a team as a code owner August 19, 2020 14:09
@ghost ghost requested review from twangboy and removed request for a team August 19, 2020 14:09
sheagcraig and others added 7 commits August 19, 2020 10:11
It may be unrelated, but tests were failing when they didn't have the
osmajorrelease grain. This module should only be available on macOS
where that grain _does_ exist, but there's no harm in just using
osrelease_info like the second half of the condition.
@weswhet
Copy link
Collaborator

weswhet commented Aug 25, 2020

Looks great! Thanks, @sheagcraig!

@sheagcraig
Copy link
Collaborator Author

Howdy @twangboy!

@weswhet
Copy link
Collaborator

weswhet commented Aug 31, 2020

@sagetherage could we tag this for 3001.2 (assuming that's a thing)

@sagetherage
Copy link
Contributor

sagetherage commented Aug 31, 2020

@sagetherage could we tag this for 3001.2 (assuming that's a thing)

@weswhet Sure, for whatever release comes next? Will do! Right now, the next release is Magnesium but if we do a point release I will keep this mind. Is there an issue in the backlog to tie to this, maybe not?

@sagetherage sagetherage added Magnesium Mg release after Na prior to Al MacOS pertains to the OS of fruit labels Aug 31, 2020
@weswhet
Copy link
Collaborator

weswhet commented Aug 31, 2020

@weswhet Sure, for whatever release comes next? Will do! Right now, the next release is Magnesium but if we do a point release I will keep this mind. Is there an issue in the backlog to tie to this, maybe not?

@sheagcraig could you open an issue for backlog tracking?

@sagetherage yeah whatever is the next release would be great. Would love to get as much Big Sur support in as close to its release as possible. Per usual Thank you! Thank you! 😃

@sagetherage
Copy link
Contributor

@weswhet should we create a Mac team in GitHub to review PRs? I am working on permissions to get more access to that, but today I could do that with people in the MacOS Working Group and then assign that team as a reviewers - just a thought. Maybe discuss at the next WG meeting?

@sagetherage sagetherage linked an issue Sep 1, 2020 that may be closed by this pull request
@garethgreenaway
Copy link
Member

@sheagcraig Looks great. Can you add a changelog file for this change? Thanks!

@sheagcraig
Copy link
Collaborator Author

There you go @garethgreenaway

@garethgreenaway
Copy link
Member

@sheagcraig Awesome. thanks!

@DmitryKuzmenko
Copy link
Contributor

@sheagcraig thank you for the PR it's awesome! I just have one question about Mac OS versioning because I'm not a Mac OS guru.

@dwoz dwoz merged commit 2961006 into saltstack:master Sep 9, 2020
28 checks passed
@sheagcraig sheagcraig deleted the fix_mac_softwareupdate_big_sur branch September 9, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MacOS pertains to the OS of fruit Magnesium Mg release after Na prior to Al
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Big Sur softwareupdate module parsing
6 participants