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

add in a package os version compatibility check #255

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dsbaha
Copy link

@dsbaha dsbaha commented Dec 4, 2020

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test

/kind feature

/kind flake

What this PR does / why we need it:
This adds in a os version compatibly check on cpe_remote_file. Some PKG files have strict os version requirements defined in the Distribution file. This check evaluates if the pkg is compatible for the OS its being installed.
Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation e.g., Design Proposals, usage docs, etc.:


@facebook-github-bot
Copy link
Contributor

Hi @dsbaha!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@gbatye
Copy link
Contributor

gbatye commented Dec 10, 2020

So the goal is to skip package installations if /usr/sbin/installer -volinfo does not contain "MountPoint"?

Do you have an example output for a package that does not contain "MountPoint"?

Also I believe that this resource will fail if a package is not compatible with the OS and that will inform user to gate the package to particular OS versions.

@erikng
Copy link
Contributor

erikng commented Dec 11, 2020

All packages will have a mount point as it's a standard attribute.

For context, what we are trying to solve is when users are running beta OS versions, some packages may fail. You are correct that chef will fail and this is behavior we do not want to occur.

We would rather this package not install and we don't want to have to continuously baby our fleet.

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.

4 participants