Skip to content

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

Merged
dwoz merged 17 commits into
saltstack:masterfrom
sheagcraig:fix_mac_softwareupdate_big_sur
Sep 9, 2020
Merged

Include Big Sur vers "11" in mac_softwareupdate modern pattern condition#58247
dwoz merged 17 commits into
saltstack:masterfrom
sheagcraig:fix_mac_softwareupdate_big_sur

Conversation

@sheagcraig

@sheagcraig sheagcraig commented Aug 19, 2020

Copy link
Copy Markdown
Contributor

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

weswhet commented Aug 25, 2020

Copy link
Copy Markdown
Contributor

Looks great! Thanks, @sheagcraig!

@sheagcraig

Copy link
Copy Markdown
Contributor Author

Howdy @twangboy!

@weswhet

weswhet commented Aug 31, 2020

Copy link
Copy Markdown
Contributor

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

@sagetherage

sagetherage commented Aug 31, 2020

Copy link
Copy Markdown
Contributor

@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

weswhet commented Aug 31, 2020

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
Contributor

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

@sheagcraig

Copy link
Copy Markdown
Contributor Author

There you go @garethgreenaway

@garethgreenaway

Copy link
Copy Markdown
Contributor

@sheagcraig Awesome. thanks!

Comment thread salt/modules/mac_softwareupdate.py
@DmitryKuzmenko

Copy link
Copy Markdown
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
@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