Skip to content

sysutils/py-salt: fix the efi grain on FreeBSD - #63052

Merged
dwoz merged 2 commits into
saltstack:masterfrom
asomers:freebsd-efi
Dec 16, 2023
Merged

dwoz merged 2 commits into
saltstack:masterfrom
asomers:freebsd-efi

Conversation

@asomers

@asomers asomers commented Nov 9, 2022

Copy link
Copy Markdown
Contributor

The logic to detect whether we booted from EFI only worked on Linux and Apple, AFAICT.

What does this PR do?

Correctly detects EFI on FreeBSD

What issues does this PR fix or reference?

Fixes:

Previous Behavior

grains.get efi would always return False on FreeBSD

New Behavior

grains.get efi will return the correct value on FreeBSD

Merge requirements satisfied?

Commits signed with GPG?

Yes

@asomers
asomers requested a review from a team as a code owner November 9, 2022 22:21
@asomers
asomers requested review from twangboy and removed request for a team November 9, 2022 22:21

@twangboy twangboy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is gonna need a test and a changelog.

@twangboy twangboy added needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases needs-changelog labels Nov 14, 2022
@asomers

asomers commented Nov 18, 2022

Copy link
Copy Markdown
Contributor Author

This is gonna need a test and a changelog.

I can add a changelog entry. But as for tests, there is literally nothing that this function would do except return the value of our mock function. In other words, there's no way to write a test for this function that's different from simply writing the function itself. That's why one-liners usually don't need to be unit-tested.

The logic to detect whether we booted from EFI only worked on Linux and
Apple, AFAICT.
@dwoz

dwoz commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

@asomers Please add a changelog file.

@dwoz dwoz removed the needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label Dec 11, 2023
dwoz
dwoz previously approved these changes Dec 11, 2023

@dwoz dwoz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending changelog.

@dwoz
dwoz merged commit a11b4d5 into saltstack:master Dec 16, 2023
@asomers
asomers deleted the freebsd-efi branch August 1, 2024 14:02

This branch was previously deployed

1 inactive deployment
ci — 6fa0e883 Deployed Dec 12, 2023 by asomers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants