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

Change upgrade path validation for 8.0 to only allow 7.17 #5261

Merged
merged 7 commits into from
Jan 20, 2022

Conversation

pebrc
Copy link
Collaborator

@pebrc pebrc commented Jan 19, 2022

Fixes #5258

This sets the minimal supported version for 8.0 to 7.17. It also changes the validation on version upgrade to take the .status.Version into account instead of the spec.Version (which it still uses as a fallback in case we do not have a valid .status.Version). The rationale behind that is that we want to make sure that users do update the version of the spec in quick succession without waiting for the rollout of the upgrade to complete thereby unwittingly circumventing the version restriction.

@pebrc pebrc added >bug Something isn't working v2.0.0 labels Jan 19, 2022
Copy link
Contributor

@sebgl sebgl left a comment

Choose a reason for hiding this comment

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

LGTM

// this should not happen, since this is the already persisted version
errs = append(errs, field.Invalid(field.NewPath("spec").Child("version"), current.Spec.Version, parseStoredVersionErrMsg))
currentVer, ferr := currentVersion(current)
if ferr != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

ferr?

Copy link
Collaborator Author

@pebrc pebrc Jan 19, 2022

Choose a reason for hiding this comment

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

ferr for field.Error which is what the webhook API works with, err is used as a variable for a regular builtin error below

Copy link
Contributor

@naemono naemono left a comment

Choose a reason for hiding this comment

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

LGTM as well, but your non-deterministic TestDelayingQueueInvariants tests are failing you in ci.

@pebrc
Copy link
Collaborator Author

pebrc commented Jan 19, 2022

Jenkins test this please

TestDelayingQueueInvariants is flaky sometimes unfortunately

Copy link
Contributor

@barkbay barkbay left a comment

Choose a reason for hiding this comment

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

LGTM

@pebrc pebrc merged commit 5fbc14d into elastic:main Jan 20, 2022
pebrc added a commit to pebrc/cloud-on-k8s that referenced this pull request Jan 20, 2022
This sets the minimal supported version for 8.0 to 7.17. It also changes the validation on version upgrade to take the .status.Version into account instead of the spec.Version (which it still uses as a fallback in case we do not have a valid .status.Version). The rationale behind that is that we want to make sure that users do update the version of the spec in quick succession without waiting for the rollout of the upgrade to complete thereby unwittingly circumventing the version restriction.
pebrc added a commit that referenced this pull request Jan 20, 2022
)

This sets the minimal supported version for 8.0 to 7.17. It also changes the validation on version upgrade to take the .status.Version into account instead of the spec.Version (which it still uses as a fallback in case we do not have a valid .status.Version). The rationale behind that is that we want to make sure that users do update the version of the spec in quick succession without waiting for the rollout of the upgrade to complete thereby unwittingly circumventing the version restriction.
fantapsody pushed a commit to fantapsody/cloud-on-k8s that referenced this pull request Feb 7, 2023
This sets the minimal supported version for 8.0 to 7.17. It also changes the validation on version upgrade to take the .status.Version into account instead of the spec.Version (which it still uses as a fallback in case we do not have a valid .status.Version). The rationale behind that is that we want to make sure that users do update the version of the spec in quick succession without waiting for the rollout of the upgrade to complete thereby unwittingly circumventing the version restriction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate that upgrade to 8.0 is going through 7.last
4 participants