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

Match and Compare platforms with OSFeatures #20

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dmcgowan
Copy link
Member

@dmcgowan dmcgowan commented Nov 16, 2024

Add-on to #16

This allows using the OSFeatures field for matching and comparing. To match, the checked platform's features must be a subset of the matcher's platforms. The matcher platform represents the supported features by the host and the checked platforms the platform needed for each image in an index or used to match a plugin instance.

This provides a way to add feature variation in a backwards compatible wherever platform matching is involved.

Updates the os part of the format to include features after the os
version. The guarantees that the format may fully represent the platform
structure.

Signed-off-by: Derek McGowan <[email protected]>
{
"linux(+other)/amd64",
[]string{"windows/amd64", "linux/amd64", "linux/arm64", "linux(+other)/amd64"},
[]string{"linux(+other)/amd64", "linux/amd64", "windows/amd64", "linux/arm64"},
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a case where the OSVersion prefixes the OSFeatures? ie linux(7.2+other)

Copy link
Member Author

Choose a reason for hiding this comment

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

I can add such a case

Copy link
Member Author

Choose a reason for hiding this comment

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

We should define how the OS version can be generically supported as well, possibly similar what is being done with OS Features here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants