-
Notifications
You must be signed in to change notification settings - Fork 200
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
introduce upgrade mechanism and add upgrade patch to v1 storage migration #1675
Conversation
/retest |
3372a10
to
4f71653
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.
Few questions:
- Any reason why the generated injection code is removed ? (probably due to the knative.dev/pkg update ?)
- Any reason to have an
upgrade/helper
package instead of just having things inupgrade
? (helper
is a package name we tend to "not use" because it doesn't really mean anything)
Otherwise I like the PR but I think we need to have some unit-tests at least 👼🏼
Yes, I updated the
In the future, If we want to call storage migration, we can reuse that function.
I was waiting for the initial confirmation about this feature to put effort on unit-tests. |
25d5bdf
to
6d2c7ea
Compare
70138f5
to
f63b536
Compare
f63b536
to
2d229b1
Compare
2d229b1
to
1c83481
Compare
|
||
// performs crd storage version upgrade | ||
// lists all the resources and, | ||
// keeps only one storage version on the crd |
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.
I don't think, this is what we wanted to keep on CR i.e. only 1 version
What I know about the issue is - the fresh installation and old installation can have different version, but we need to update the CRD by removing the old versions and using the new versions. We can't delete and create again, as it will remove user CRs.
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.
@piyush-garg My understanding is,
- storage version should contain latest version and may contain old version too
- from the
migrate
package [1], first updating all the resources to latest version - then keeps only the latest version under
status.storedVersions
[1] - https://github.com/knative/pkg/blob/main/apiextensions/storageversion/migrator.go#L49-L56
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.
i am not sure if this will work like this, because just changing the version will not work for tekton resources, spec also needs to handled accordingly.
what i was expecting from this story was to handle the change of this field https://github.com/tektoncd/pipeline/blob/main/config/300-pipeline.yaml#L27
1c83481
to
09bf9ac
Compare
/kind bug |
09bf9ac
to
2b9c36e
Compare
2b9c36e
to
50a319d
Compare
50a319d
to
615f419
Compare
…tion Signed-off-by: Jeeva Kandasamy <[email protected]>
615f419
to
5c9b1a3
Compare
/approve we need to properly test this more |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: piyush-garg 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 |
The following is the coverage report on the affected files.
|
/cherry-pick release-v0.68.x |
@jkandasa: once the present PR merges, I will cherry-pick it on top of release-v0.68.x in a new PR and assign it to you. In response to this:
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. |
@jkandasa: new pull request created: #1687 In response to this:
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. |
Changes
This PR introduces upgrade mechanism. Which will be executed as two part.
marks last applied upgrade reference to
TektonConfig
CR(via status annotation)In addition to upgrade base code, this PR includes the following fixes
v1
storage conversionSubmitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lint
before submitting a PRSee the contribution guide for more details.
Release Notes