Skip to content

use v1beta2 as the storage version of PingSource#4577

Closed
eclipselu wants to merge 1 commit into
knative:masterfrom
eclipselu:dev
Closed

use v1beta2 as the storage version of PingSource#4577
eclipselu wants to merge 1 commit into
knative:masterfrom
eclipselu:dev

Conversation

@eclipselu
Copy link
Copy Markdown
Contributor

Fixes #4539

Proposed Changes

  • 🧹 flip storage version to v1beta2 in PingSource CRD
  • 🎁 add post-install job to migrate existing PingSource objects to v1beta2

Release Note

Change storage versions of PingSource to from v1beta1 to v1beta2
You must run post-install job in config/post-intall/v0.21.0 after upgrading

Docs

@google-cla google-cla Bot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 23, 2020
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 23, 2020
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: eclipselu
To complete the pull request process, please assign grantr after the PR has been reviewed.
You can assign the PR to them by writing /assign @grantr in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 23, 2020

Codecov Report

Merging #4577 (42bcaec) into master (2e9f6a2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4577   +/-   ##
=======================================
  Coverage   81.31%   81.31%           
=======================================
  Files         290      290           
  Lines        8157     8157           
=======================================
  Hits         6633     6633           
  Misses       1126     1126           
  Partials      398      398           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e9f6a2...42bcaec. Read the comment docs.

- flip storage version to v1beta2 in PingSource CRD
- add post-install job to migrate existing PingSource objects to v1beta2
@eclipselu
Copy link
Copy Markdown
Contributor Author

/test pull-knative-eventing-upgrade-tests

@eclipselu
Copy link
Copy Markdown
Contributor Author

/retest

@eclipselu
Copy link
Copy Markdown
Contributor Author

Upgrade test is failing because

The CustomResourceDefinition "pingsources.sources.knative.dev" is invalid: status.storedVersions[1]: Invalid value: "v1beta2": must appear in spec.versions
ERROR: Knative latest release installation failed

v1beta2 was not introduced in 0.19, this is expected. this test should work once we release 0.20.

@eclipselu
Copy link
Copy Markdown
Contributor Author

I think it's still premature to publish this PR, closing.
will reopen after 0.20 is released.

@eclipselu eclipselu closed this Nov 23, 2020
@lionelvillard
Copy link
Copy Markdown
Contributor

I don't like the idea of postponing this PR. Since the reconciler migrated to v1beta2, for each reconcile the stored v1beta1 object is converted to v1beta2 and then back to b1beta1. This can potentially overload the webhook, especially when running in multi-tenant environment.

@vaikas @cardil I'm not too familiar with the upgrade tests. Is there a way we can disable one particular test just for PingSource?

@lionelvillard lionelvillard reopened this Nov 24, 2020
@eclipselu
Copy link
Copy Markdown
Contributor Author

eclipselu commented Nov 24, 2020

I don't like the idea of postponing this PR. Since the reconciler migrated to v1beta2, for each reconcile the stored v1beta1 object is converted to v1beta2 and then back to v1beta1. This can potentially overload the webhook, especially when running in multi-tenant environment.

do you mean we're flipping storage version to v1beta2 in 0.20 (the same version that we introduced v1beta2) ?

@knative-prow-robot
Copy link
Copy Markdown
Contributor

@eclipselu: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-knative-eventing-upgrade-tests 42bcaec link /test pull-knative-eventing-upgrade-tests

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@lionelvillard
Copy link
Copy Markdown
Contributor

yes

@eclipselu
Copy link
Copy Markdown
Contributor Author

yes

in this case how do we allow downgrading from 0.20 (introduced v1beta2 and set it as storage version) to 0.19 (no v1beta2)?
I don't think PingSources upgraded from v1beta1 -> v1beta2 can be converted back, because 0.19 does not understand v1beta2.

@lionelvillard
Copy link
Copy Markdown
Contributor

That's a good point. Downgrading would require to run a job to do the conversion back.

@n3wscott
Copy link
Copy Markdown
Contributor

/hold

@lionelvillard to follow-up for issues.

Likely, we do not want to migrate the storage version for 0.20, target 0.21.

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 24, 2020
@lionelvillard
Copy link
Copy Markdown
Contributor

@cr22rc do you think that's fine to wait 0.21 for the post-install job?

@matzew
Copy link
Copy Markdown
Member

matzew commented Nov 26, 2020

Likely, we do not want to migrate the storage version for 0.20, target 0.21.

+1 was about to issue a hold due to exactly same reasons


// Package postinstall is a placeholder that allows us to pull in config files
// via go mod vendor.
package postinstall
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@lionelvillard @pierDipi the PingSource migration is using v0.21.1, we should try to merge this with PRs like #4658 to make sure we have single post install directory. Do you think we should bring up in the eventing meeting?

Copy link
Copy Markdown
Contributor Author

@eclipselu eclipselu Jan 7, 2021

Choose a reason for hiding this comment

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

Do we remove the post-install directory after 0.20.0 is cut and add this commit back in?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we remove the post-install directory after 0.20.0 is cut add this commit back in?

yes, like serving and as expected by the operator (@houshengbo, @Cynocracy)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, I'd expect a simple PR like #4658.
I guess we can discuss this asynchronously on an issue or PR.
Perhaps a document describing the post-install job story might be helpful.

@zhongduo
Copy link
Copy Markdown
Contributor

zhongduo commented Jan 7, 2021 via email

@eclipselu
Copy link
Copy Markdown
Contributor Author

eclipselu commented Jan 15, 2021

closing in favour of #4750, as the original fork branch was deleted by accident.

@eclipselu eclipselu closed this Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PingSource: make v1beta2 the storage version and migrate existing objects to v1beta2

7 participants