-
Notifications
You must be signed in to change notification settings - Fork 108
Validate the major.minor as the version matching mechanism for customized manifests #320
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
Conversation
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.
@houshengbo: 2 warnings.
In response to this:
Proposed Changes
- Instead of checking whether versions match in terms of major, minor and patch numbers, we only check the major and minor numbers.
- Use {VERSION} instead of ${VERSION} as the annotation to replace with the spec.version, because we have to add an additional \ to make $visible.
Release Note
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
SERVING_CORE = "testdata/kodata/knative-serving/" + VERSION + "/serving-core.yaml" | ||
SERVING_HPA = "testdata/kodata/knative-serving/" + VERSION + "/serving-hpa.yaml" | ||
EVENTING_CORE = "testdata/kodata/knative-eventing/" + VERSION + "/eventing-core.yaml" | ||
IN_MEMORY_CHANNEL = "testdata/kodata/knative-eventing/" + VERSION + "/in-memory-channel.yaml" | ||
SERVING_VERSION_CORE = "testdata/kodata/knative-serving/${VERSION}/serving-core.yaml" | ||
SERVING_VERSION_HPA = "testdata/kodata/knative-serving/${VERSION}/serving-hpa.yaml" | ||
SERVING_VERSION_CORE = "testdata/kodata/knative-serving/{VERSION}/serving-core.yaml" |
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.
SERVING_VERSION_CORE = "testdata/kodata/knative-serving/{VERSION}/serving-core.yaml" | |
ServingVersionCore = "testdata/kodata/knative-serving/{Version}/serving-core.yaml" |
Golint naming: don't use ALL_CAPS in Go names; use CamelCase. More info.
SERVING_VERSION_CORE = "testdata/kodata/knative-serving/${VERSION}/serving-core.yaml" | ||
SERVING_VERSION_HPA = "testdata/kodata/knative-serving/${VERSION}/serving-hpa.yaml" | ||
SERVING_VERSION_CORE = "testdata/kodata/knative-serving/{VERSION}/serving-core.yaml" | ||
SERVING_VERSION_HPA = "testdata/kodata/knative-serving/{VERSION}/serving-hpa.yaml" |
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.
SERVING_VERSION_HPA = "testdata/kodata/knative-serving/{VERSION}/serving-hpa.yaml" | |
ServingVersionHpa = "testdata/kodata/knative-serving/{Version}/serving-hpa.yaml" |
Golint naming: don't use ALL_CAPS in Go names; use CamelCase. More info.
8a445ea
to
492e416
Compare
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
manifestVersion := u.GetLabels()[key] | ||
if targetVersion != manifestVersion && manifestVersion != "" { | ||
if manifestVersion != "" && semver.MajorMinor(targetVersion) != semver.MajorMinor(manifestVersion) { |
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.
Nice! Didn't know MajorMinor()
492e416
to
83d19a5
Compare
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: antoineco, houshengbo 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 |
83d19a5
to
3ae8463
Compare
3ae8463
to
d874fc5
Compare
d874fc5
to
326c923
Compare
/lgtm |
/test pull-knative-operator-upgrade-tests |
Proposed Changes
Release Note