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

Bug 1783030: Detect replacement cycles while adding package channels #63

Merged

Conversation

tmckayus
Copy link
Contributor

@tmckayus tmckayus commented Jul 26, 2019

If a cycle is created via "replaces" attributes in CSVs, the appregistry-server will infinite loop in the sqlite loader and never serve. This is a simple fix to detect the cycle and fail.

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 26, 2019
@openshift-ci-robot
Copy link

Hi @tmckayus. Thanks for your PR.

I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@tmckayus
Copy link
Contributor Author

I ran into this accidentally while editing CSVs :) On a local OCP instance running in a VM, this actually caused qemu to suck up near 100% CPU. This change, in a pod, should cause the pod to fail and enter a crash backoff loop with a log message which should be more clear to a user if they happen to do what I did.

It might be nice to detect this in bundle validation in operator-courier as well.

@dinhxuanvu dinhxuanvu requested a review from ecordell July 26, 2019 19:58
@tmckayus
Copy link
Contributor Author

tmckayus commented Jul 26, 2019

fix for #64

pkg/sqlite/load.go Outdated Show resolved Hide resolved
@tmckayus tmckayus changed the title Detect replacement circuits while adding package channels Detect replacement cycles while adding package channels Aug 7, 2019
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 9, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 16, 2019
Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

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

/ok-to-test

Sorry for the delay. Just one small thing and then I think it's good:

pkg/sqlite/load.go Outdated Show resolved Hide resolved
@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 6, 2019
@tmckayus
Copy link
Contributor Author

/test unit

@tmckayus
Copy link
Contributor Author

rebased on master

@jwforres
Copy link

@njhale is this good to merge now?

@njhale
Copy link
Member

njhale commented Dec 12, 2019

@jwforres will review today. Currently, we also need to associate a BZ for this to merge, so I'll take care of that today as well.

@njhale njhale changed the title Detect replacement cycles while adding package channels Bug 1783030: Detect replacement cycles while adding package channels Dec 12, 2019
@openshift-ci-robot
Copy link

@tmckayus: This pull request references Bugzilla bug 1783030, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Bug 1783030: Detect replacement cycles while adding package channels

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Dec 12, 2019
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2019
@njhale
Copy link
Member

njhale commented Dec 12, 2019

/test unit

@tmckayus
Copy link
Contributor Author

Thanks for the BZ @njhale . TIL :)

@jwforres will review today. Currently, we also need to associate a BZ for this to merge, so I'll take care of that today as well.

@ecordell
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 19, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ecordell, njhale, tmckayus

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

@tmckayus
Copy link
Contributor Author

@ecordell @njhale I'm not familiar enough with the CI to know if the failing test is the fault of this PR, or a larger issue. Any insight? Perhaps a rebase maybe?

@njhale
Copy link
Member

njhale commented Dec 23, 2019

/retest

@njhale
Copy link
Member

njhale commented Dec 23, 2019

Any insight? Perhaps a rebase maybe?
Prow merges master onto the branch before testing. Since it seems there were no conflicts there, I don't think rebasing will help in this case. I retested and everything seemed to work.

After this merges I will manually check master, but I'm fairly certain that this patch doesn't cause any flakes on its own.

@ecordell
Copy link
Member

ecordell commented Jan 2, 2020

/retest

we're just hitting issues with test infra, doesn't look related to the project itself.

@openshift-merge-robot openshift-merge-robot merged commit b1b0a41 into operator-framework:master Jan 2, 2020
@openshift-ci-robot
Copy link

@tmckayus: All pull requests linked via external trackers have merged. Bugzilla bug 1783030 has been moved to the MODIFIED state.

In response to this:

Bug 1783030: Detect replacement cycles while adding package channels

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.

@njhale
Copy link
Member

njhale commented Jun 3, 2020

/cherry-pick release-4.3

@openshift-cherrypick-robot

@njhale: new pull request created: #345

In response to this:

/cherry-pick release-4.3

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.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants