Skip to content

fix(mac_brew_pkg): manage unknown versions#68763

Merged
dwoz merged 3 commits intosaltstack:3006.xfrom
cdalvaro:bugfix/mac_brew_pkg/manage_unknown_versions
Mar 3, 2026
Merged

fix(mac_brew_pkg): manage unknown versions#68763
dwoz merged 3 commits intosaltstack:3006.xfrom
cdalvaro:bugfix/mac_brew_pkg/manage_unknown_versions

Conversation

@cdalvaro
Copy link
Copy Markdown
Contributor

@cdalvaro cdalvaro commented Feb 24, 2026

What does this PR do?

Fix mac_brew_pkg.list_pkgs crashing or producing incorrect results when Homebrew returns null values for cask metadata:

  • When the installed version of a cask is null (e.g. Homebrew cannot determine the installed version), it is now reported as "unknown" instead of raising an error.
  • When full_token is null, it is now filtered out so that None is never used as a package name key in the returned dictionary.

What issues does this PR fix or reference?

This PR manage those situations to avoid propagating None values.

Merge requirements satisfied?

Commits signed with GPG?

Yes

Comment thread salt/modules/mac_brew_pkg.py Outdated
Copy link
Copy Markdown
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

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

Since this bug exists in 3006.x, could you please rebase this PR on 3006.x branch?

@cdalvaro cdalvaro changed the base branch from master to 3006.x February 25, 2026 16:37
@cdalvaro cdalvaro force-pushed the bugfix/mac_brew_pkg/manage_unknown_versions branch from fcabd30 to 2e426a4 Compare February 25, 2026 16:37
@dwoz dwoz merged commit b6c65a6 into saltstack:3006.x Mar 3, 2026
797 of 799 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants