Skip to content

OCPBUGS-41540: [4.16] add optional schema migrations; default to olm.bundle.object instead of olm.csv.metadata (#1384) #859

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

Merged

Conversation

grokspawn
Copy link
Contributor

@grokspawn grokspawn commented Sep 9, 2024

  • Allow disabling of migrations for bundles and sqlite DBs
  • intro new migrations package
  • schema migration optional; default to olm.bundle.object
  • review resolutions
  • use a type to protect migration interactions
  • review revisions

Upstream-repository: operator-registry
Upstream-commit: c80e8751e716c069017b55279a0f29d0254d426a

some notes about this backport

  • changes were intertwined with basic template schema definition changes in 4.17 which required some manual intervention in the merge to avoid propagating
  • in 4.17+ the composite template was removed. In 4.16 is has not been, so to match expectations of any users, this commit enables all migrations for basic & semver template builders of composite template

Copy link
Contributor

openshift-ci bot commented Sep 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grokspawn

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 9, 2024
@grokspawn
Copy link
Contributor Author

/jira cherrypick OCPBUGS-39458

@openshift-ci-robot
Copy link

@grokspawn: Jira Issue OCPBUGS-39458 has been cloned as Jira Issue OCPBUGS-41540. Will retitle bug to link to clone.
/retitle OCPBUGS-41540: ✨ add optional schema migrations; default to olm.bundle.object instead of olm.csv.metadata (#1384)

In response to this:

/jira cherrypick OCPBUGS-39458

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot changed the title ✨ add optional schema migrations; default to olm.bundle.object instead of olm.csv.metadata (#1384) OCPBUGS-41540: ✨ add optional schema migrations; default to olm.bundle.object instead of olm.csv.metadata (#1384) Sep 9, 2024
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 9, 2024
@openshift-ci-robot
Copy link

@grokspawn: This pull request references Jira Issue OCPBUGS-41540, which is invalid:

  • expected dependent Jira Issue OCPBUGS-39458 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is MODIFIED instead
  • expected dependent Jira Issue OCPBUGS-39458 to target a version in 4.17.0, but it targets "4.17.z" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

  • Allow disabling of migrations for bundles and sqlite DBs
  • intro new migrations package
  • schema migration optional; default to olm.bundle.object
  • review resolutions
  • use a type to protect migration interactions
  • review revisions

Upstream-repository: operator-registry
Upstream-commit: c80e8751e716c069017b55279a0f29d0254d426a

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 openshift-eng/jira-lifecycle-plugin repository.

@grokspawn grokspawn force-pushed the bundle-metadata-4.16 branch 2 times, most recently from 4b028ca to a85e3f6 Compare September 9, 2024 19:55
@grokspawn grokspawn changed the title OCPBUGS-41540: ✨ add optional schema migrations; default to olm.bundle.object instead of olm.csv.metadata (#1384) OCPBUGS-41540: [4.16] add optional schema migrations; default to olm.bundle.object instead of olm.csv.metadata (#1384) Sep 9, 2024
…of olm.csv.metadata (#1384)

* Allow disabling of migrations for bundles and sqlite DBs

Signed-off-by: Joe Lanford <[email protected]>

* intro new migrations package

Signed-off-by: Joe Lanford <[email protected]>

* schema migration optional; default to olm.bundle.object

Signed-off-by: Jordan Keister <[email protected]>

* review resolutions

Signed-off-by: Jordan Keister <[email protected]>

* use a type to protect migration interactions

Signed-off-by: Jordan Keister <[email protected]>

* review revisions

Signed-off-by: Jordan Keister <[email protected]>

---------

Signed-off-by: Joe Lanford <[email protected]>
Signed-off-by: Jordan Keister <[email protected]>
Co-authored-by: Joe Lanford <[email protected]>
Upstream-repository: operator-registry
Upstream-commit: c80e8751e716c069017b55279a0f29d0254d426a
@grokspawn grokspawn force-pushed the bundle-metadata-4.16 branch from a85e3f6 to ee2a081 Compare September 9, 2024 20:52
@perdasilva
Copy link
Contributor

/label backport-risk-assessed
/jira refresh

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Sep 11, 2024
@openshift-ci-robot
Copy link

@perdasilva: This pull request references Jira Issue OCPBUGS-41540, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/label backport-risk-assessed
/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@perdasilva
Copy link
Contributor

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 11, 2024
@openshift-ci-robot
Copy link

@perdasilva: This pull request references Jira Issue OCPBUGS-41540, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.z) matches configured target version for branch (4.16.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-39458 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-39458 targets the "4.17.0" version, which is one of the valid target versions: 4.17.0
  • bug has dependents

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@perdasilva
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 12, 2024
@bandrade
Copy link
Contributor

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Sep 16, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD c4c6542 and 2 for PR HEAD ee2a081 in total

1 similar comment
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD c4c6542 and 2 for PR HEAD ee2a081 in total

@bandrade
Copy link
Contributor

/retest

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD c4c6542 and 2 for PR HEAD ee2a081 in total

Copy link
Contributor

openshift-ci bot commented Sep 17, 2024

@grokspawn: all tests passed!

Full PR test history. Your PR dashboard.

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

@openshift-merge-bot openshift-merge-bot bot merged commit c50e9ce into openshift:release-4.16 Sep 17, 2024
13 checks passed
@openshift-ci-robot
Copy link

@grokspawn: Jira Issue OCPBUGS-41540: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-41540 has been moved to the MODIFIED state.

In response to this:

  • Allow disabling of migrations for bundles and sqlite DBs
  • intro new migrations package
  • schema migration optional; default to olm.bundle.object
  • review resolutions
  • use a type to protect migration interactions
  • review revisions

Upstream-repository: operator-registry
Upstream-commit: c80e8751e716c069017b55279a0f29d0254d426a

some notes about this backport

  • changes were intertwined with basic template schema definition changes in 4.17 which required some manual intervention in the merge to avoid propagating
  • in 4.17+ the composite template was removed. In 4.16 is has not been, so to match expectations of any users, this commit enables all migrations for basic & semver template builders of composite template

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: operator-registry
This PR has been included in build operator-registry-container-v4.16.0-202409171005.p0.gc50e9ce.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-operator-framework-tools
This PR has been included in build ose-operator-framework-tools-container-v4.16.0-202409171005.p0.gc50e9ce.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: operator-lifecycle-manager
This PR has been included in build operator-lifecycle-manager-container-v4.16.0-202409171005.p0.gc50e9ce.assembly.stream.el9.
All builds following this will include this PR.

@grokspawn grokspawn deleted the bundle-metadata-4.16 branch September 17, 2024 14:48
@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.16.0-0.nightly-2024-09-17-112842

@grokspawn
Copy link
Contributor Author

/cherrypick release-4.15

@openshift-cherrypick-robot

@grokspawn: #859 failed to apply on top of branch "release-4.15":

Applying: add optional schema migrations; default to olm.bundle.object instead of olm.csv.metadata (#1384)
Using index info to reconstruct a base tree...
M	staging/operator-registry/alpha/action/render.go
M	staging/operator-registry/alpha/action/render_test.go
M	staging/operator-registry/alpha/template/composite/builder.go
M	staging/operator-registry/alpha/template/semver/semver.go
M	staging/operator-registry/alpha/template/semver/types.go
M	staging/operator-registry/cmd/opm/render/cmd.go
M	vendor/github.com/operator-framework/operator-registry/alpha/action/render.go
M	vendor/github.com/operator-framework/operator-registry/alpha/template/composite/builder.go
M	vendor/github.com/operator-framework/operator-registry/alpha/template/semver/semver.go
M	vendor/github.com/operator-framework/operator-registry/alpha/template/semver/types.go
M	vendor/github.com/operator-framework/operator-registry/cmd/opm/render/cmd.go
M	vendor/modules.txt
Falling back to patching base and 3-way merge...
Auto-merging vendor/modules.txt
Auto-merging vendor/github.com/operator-framework/operator-registry/cmd/opm/render/cmd.go
CONFLICT (content): Merge conflict in vendor/github.com/operator-framework/operator-registry/cmd/opm/render/cmd.go
Auto-merging vendor/github.com/operator-framework/operator-registry/alpha/template/semver/types.go
Auto-merging vendor/github.com/operator-framework/operator-registry/alpha/template/semver/semver.go
CONFLICT (content): Merge conflict in vendor/github.com/operator-framework/operator-registry/alpha/template/semver/semver.go
Auto-merging vendor/github.com/operator-framework/operator-registry/alpha/template/composite/builder.go
Auto-merging vendor/github.com/operator-framework/operator-registry/alpha/action/render.go
CONFLICT (content): Merge conflict in vendor/github.com/operator-framework/operator-registry/alpha/action/render.go
Auto-merging staging/operator-registry/cmd/opm/render/cmd.go
CONFLICT (content): Merge conflict in staging/operator-registry/cmd/opm/render/cmd.go
Auto-merging staging/operator-registry/alpha/template/semver/types.go
Auto-merging staging/operator-registry/alpha/template/semver/semver.go
CONFLICT (content): Merge conflict in staging/operator-registry/alpha/template/semver/semver.go
Auto-merging staging/operator-registry/alpha/template/composite/builder.go
Auto-merging staging/operator-registry/alpha/action/render_test.go
CONFLICT (content): Merge conflict in staging/operator-registry/alpha/action/render_test.go
Auto-merging staging/operator-registry/alpha/action/render.go
CONFLICT (content): Merge conflict in staging/operator-registry/alpha/action/render.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 add optional schema migrations; default to olm.bundle.object instead of olm.csv.metadata (#1384)
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-4.15

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-sigs/prow repository.

@grokspawn
Copy link
Contributor Author

release-4.15 manual cherry-pick is #870

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.