-
Notifications
You must be signed in to change notification settings - Fork 78
warn on maxOpenShiftVersion specifying more than major.minor #146
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
warn on maxOpenShiftVersion specifying more than major.minor #146
Conversation
Signed-off-by: Ankita Thomas <ankithom@redhat.com>
8c3ab96
to
a9ff8e8
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ankitathomas, njhale The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
} | ||
|
||
truncatedMaxOcp := semver.Version{Major: semVerVersionMaxOcp.Major, Minor: semVerVersionMaxOcp.Minor} | ||
if !semVerVersionMaxOcp.EQ(truncatedMaxOcp) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If olmMaxOpenShiftVersionValue
is 4.8.0
it looks like this will not be tripped, right?
Is that okay, or do we want to do something like this:
regexp.MustCompile("^v?\d+\.\d+$").MatchString(olmMaxOpenShiftVersionValue)
bundleDir: "./testdata/valid_bundle_v1beta1", | ||
imageIndexPath: "./testdata/dockerfile/valid_bundle.Dockerfile", | ||
annotations: map[string]string{ | ||
"olm.properties": fmt.Sprintf(`[{"type": "olm.maxOpenShiftVersion", "value": "4.8.1"}]`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test for 4.8.0
just to tell our future selves what the expectation is?
Signed-off-by: Ankita Thomas ankithom@redhat.com
validation accompanying operator-framework/operator-lifecycle-manager#2326