Skip to content

Bug 1991662: Catalog switcher#144

Merged
openshift-ci[bot] merged 3 commits intoopenshift:masterfrom
kevinrizza:catalog-switcher
Aug 9, 2021
Merged

Bug 1991662: Catalog switcher#144
openshift-ci[bot] merged 3 commits intoopenshift:masterfrom
kevinrizza:catalog-switcher

Conversation

@kevinrizza
Copy link
Copy Markdown
Member

  • Implement catalog switching proposal

The command + in sed is non-portable. The posix compliant version of
this command is {1,}

This change allows this script to run on a mac too (which uses BSD sed)

See https://riptutorial.com/sed/topic/9436/bsd-macos-sed-vs--gnu-sed-vs--the-posix-sed-specification

Note: GVK was implemented but disabled due to security concerns.
Future versions will address these concerns

Signed-off-by: John Hunkins jhunkins@us.ibm.com

  • Address review comments from ecordell
  • reorganize imports
  • change logging common case to debug

Signed-off-by: John Hunkins jhunkins@us.ibm.com

  • removed all watcher related code
  • this is the commit that should be reviewed later
    when it comes time to re-enable the GVK code

Signed-off-by: John Hunkins jhunkins@us.ibm.com

  • update vendor to remove dynamic lister code

Signed-off-by: John Hunkins jhunkins@us.ibm.com

  • fix incorrect names and improper error usage
  • fix names that don't match Golang convention
  • fix misspelled package name
  • return nil for sync function casting

Signed-off-by: John Hunkins jhunkins@us.ibm.com

  • change code block organization and add mutex

Signed-off-by: John Hunkins jhunkins@us.ibm.com

  • remove all traces of GVK template feature
  • clean up every instance of the GVK templating feature

  • add last minute change for RWMutex instead of Mutex

  • this is the second commit that should be reviewed later
    when it comes time to re-enable the GVK code

Signed-off-by: John Hunkins jhunkins@us.ibm.com

  • return status update errors and adjust logging

Signed-off-by: John Hunkins jhunkins@us.ibm.com

  • address review comments
  • update logging for clarity
  • clean up code blocks
  • refactor catalogsource helper functions:
    • remove mutex
    • remove two step get/update* in preference to update* even though
      this may result in more "the object has been modified" errors
    • rename helper functions to clarify usage
    • clarify the update helper function docs

Signed-off-by: John Hunkins jhunkins@us.ibm.com

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 5f6fcd14f08a7e2a81b016fa83132ea68242f335

* Implement catalog switching proposal

- implements catalog switching proposal
See https://github.com/operator-framework/enhancements/blob/master/enhancements/automatic-catalog-switching-annotations.md
- picks up v0.10.3
- change sed command in copy_crds.sh to be posix compliant

The command + in sed is non-portable. The posix compliant version of
this command is {1,}

This change allows this script to run on a mac too (which uses BSD sed)

See https://riptutorial.com/sed/topic/9436/bsd-macos-sed-vs--gnu-sed-vs--the-posix-sed-specification

Note: GVK was implemented but disabled due to security concerns.
Future versions will address these concerns

Signed-off-by: John Hunkins <jhunkins@us.ibm.com>

* Address review comments from ecordell

- reorganize imports
- change logging common case to debug

Signed-off-by: John Hunkins <jhunkins@us.ibm.com>

* removed all watcher related code

- this is the commit that should be reviewed later
when it comes time to re-enable the GVK code

Signed-off-by: John Hunkins <jhunkins@us.ibm.com>

* update vendor to remove dynamic lister code

Signed-off-by: John Hunkins <jhunkins@us.ibm.com>

* fix incorrect names and improper error usage

- fix names that don't match Golang convention
- fix misspelled package name
- return nil for sync function casting

Signed-off-by: John Hunkins <jhunkins@us.ibm.com>

* change code block organization and add mutex

Signed-off-by: John Hunkins <jhunkins@us.ibm.com>

* remove all traces of GVK template feature

- clean up every instance of the GVK templating feature
- add last minute change for RWMutex instead of Mutex

- this is the second commit that should be reviewed later
when it comes time to re-enable the GVK code

Signed-off-by: John Hunkins <jhunkins@us.ibm.com>

* return status update errors and adjust logging

Signed-off-by: John Hunkins <jhunkins@us.ibm.com>

* address review comments

- update logging for clarity
- clean up code blocks
- refactor catalogsource helper functions:
  - remove mutex
  - remove two step get/update* in preference to update* even though
    this may result in more "the object has been modified" errors
  - rename helper functions to clarify usage
  - clarify the update helper function docs

Signed-off-by: John Hunkins <jhunkins@us.ibm.com>

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 5f6fcd14f08a7e2a81b016fa83132ea68242f335
@openshift-ci openshift-ci Bot requested review from anik120 and dinhxuanvu July 30, 2021 17:57
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 30, 2021
@timflannagan
Copy link
Copy Markdown
Contributor

/retest

@timflannagan
Copy link
Copy Markdown
Contributor

This lgtm to me but we're waiting for either exception approval or this to land as a bug in z-stream.

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 30, 2021
@timflannagan
Copy link
Copy Markdown
Contributor

/retest

@timflannagan
Copy link
Copy Markdown
Contributor

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 30, 2021
@davegord
Copy link
Copy Markdown

/retest

3 similar comments
@timflannagan
Copy link
Copy Markdown
Contributor

/retest

@davegord
Copy link
Copy Markdown

/retest

@davegord
Copy link
Copy Markdown

/retest

@kevinrizza
Copy link
Copy Markdown
Member Author

 Status: "Failure",
            Message: "Operation cannot be fulfilled on catalogsources.operators.coreos.com \"catalog-5dh25\": the object has been modified; please apply your changes to the latest version and try again",
            Reason: "Conflict",
            Details: {
                Name: "catalog-5dh25",
                Group: "operators.coreos.com",
                Kind: "catalogsources",
                UID: "",
                Causes: nil,
                RetryAfterSeconds: 0,
            },
            Code: 409,

Looks like we're not resilient to cache invalidation and need to add retry logic. I believe these failures are valid

/hold

so we don't keep wasting test resources

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 31, 2021
Upstream-repository: operator-lifecycle-manager
Upstream-commit: d55593954671505ef56bf09eb2e7900069fedecb
@kevinrizza
Copy link
Copy Markdown
Member Author

/hold cancel

tests updated, should avoid that flake now

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 2, 2021
In some cases, the discovery client can return a kube server version
with the minor version field as a non uint value. To properly parse the
value and get all version fields correctly, instead directly parse the
GitVersion string for all values of the kube server version

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 31350db3ec552fbabbedda33929538983155dea9
@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-gcp

@kevinrizza
Copy link
Copy Markdown
Member Author

/retest

@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-gcp

@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-upgrade

@davegord
Copy link
Copy Markdown

davegord commented Aug 4, 2021

/test e2e-gcp

@kevinrizza
Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@kevinrizza
Copy link
Copy Markdown
Member Author

/retest

@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-upgrade

2 similar comments
@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-upgrade

@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-upgrade

@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-upgrade

}

// make the update if possible
if _, err := client.OperatorsV1alpha1().CatalogSources(catsrc.GetNamespace()).Update(context.TODO(), catsrc, metav1.UpdateOptions{}); err != nil {
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.

There is a bug in this function as this Update call only updates the spec, not the status. Another call UpdateStatus is needed here.
This is the downstream PR so this needs to be fixed upstream first.

@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-upgrade

3 similar comments
@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-upgrade

@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-upgrade

@kevinrizza
Copy link
Copy Markdown
Member Author

/test e2e-upgrade

@kevinrizza kevinrizza changed the title Catalog switcher (#2281) Bug 1991662: Catalog switcher (#2281) Aug 9, 2021
@kevinrizza kevinrizza changed the title Bug 1991662: Catalog switcher (#2281) Bug 1991662: Catalog switcher Aug 9, 2021
@kevinrizza
Copy link
Copy Markdown
Member Author

/bugzilla refresh

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 9, 2021

@kevinrizza: An error was encountered searching for bug 1991662 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. could not unmarshal response body: invalid character '<' looking for beginning of value

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

Details

In response to this:

Bug 1991662: Catalog switcher (#2281)

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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 9, 2021

@kevinrizza: An error was encountered searching for bug 1991662 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. could not unmarshal response body: invalid character '<' looking for beginning of value

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

Details

In response to this:

/bugzilla 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 kubernetes/test-infra repository.

Copy link
Copy Markdown
Contributor

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 9, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 9, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu, kevinrizza

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [dinhxuanvu,kevinrizza]

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

@davegord
Copy link
Copy Markdown

davegord commented Aug 9, 2021

/retest

1 similar comment
@davegord
Copy link
Copy Markdown

davegord commented Aug 9, 2021

/retest

@openshift-ci openshift-ci Bot merged commit fb92eba into openshift:master Aug 9, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 9, 2021

@kevinrizza: An error was encountered searching for external tracker bugs for bug 1991662 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. could not unmarshal response body: invalid character '<' looking for beginning of value

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

Details

In response to this:

Bug 1991662: Catalog switcher

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.

ankitathomas pushed a commit to ankitathomas/operator-framework-olm that referenced this pull request Sep 8, 2021
OLM is unable to properly handle the case where a bundle author
explicitly adds a hardcoded reference to a service account with a name
that matches the name of the service account defined by the deployment
spec in the CSV. This commit adds a validation method to ensure that the
name of the service account in a bundle does not match
deployment.Spec.Template.Spec.ServiceAccountName in the csv's spec

Upstream-repository: api
Upstream-commit: 0fe04f80e0102dc6973109a221a7babd6bee005e
ankitathomas pushed a commit to ankitathomas/operator-framework-olm that referenced this pull request Sep 9, 2021
OLM is unable to properly handle the case where a bundle author
explicitly adds a hardcoded reference to a service account with a name
that matches the name of the service account defined by the deployment
spec in the CSV. This commit adds a validation method to ensure that the
name of the service account in a bundle does not match
deployment.Spec.Template.Spec.ServiceAccountName in the csv's spec

Upstream-repository: api
Upstream-commit: 0fe04f80e0102dc6973109a221a7babd6bee005e
timflannagan pushed a commit to timflannagan/operator-framework-olm that referenced this pull request Nov 30, 2021
OLM is unable to properly handle the case where a bundle author
explicitly adds a hardcoded reference to a service account with a name
that matches the name of the service account defined by the deployment
spec in the CSV. This commit adds a validation method to ensure that the
name of the service account in a bundle does not match
deployment.Spec.Template.Spec.ServiceAccountName in the csv's spec

Upstream-repository: api
Upstream-commit: 0fe04f80e0102dc6973109a221a7babd6bee005e
timflannagan pushed a commit to timflannagan/operator-framework-olm that referenced this pull request Nov 30, 2021
OLM is unable to properly handle the case where a bundle author
explicitly adds a hardcoded reference to a service account with a name
that matches the name of the service account defined by the deployment
spec in the CSV. This commit adds a validation method to ensure that the
name of the service account in a bundle does not match
deployment.Spec.Template.Spec.ServiceAccountName in the csv's spec

Upstream-repository: api
Upstream-commit: 0fe04f80e0102dc6973109a221a7babd6bee005e
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 4, 2022
OLM is unable to properly handle the case where a bundle author
explicitly adds a hardcoded reference to a service account with a name
that matches the name of the service account defined by the deployment
spec in the CSV. This commit adds a validation method to ensure that the
name of the service account in a bundle does not match
deployment.Spec.Template.Spec.ServiceAccountName in the csv's spec

Upstream-repository: api
Upstream-commit: 0fe04f80e0102dc6973109a221a7babd6bee005e
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 4, 2022
OLM is unable to properly handle the case where a bundle author
explicitly adds a hardcoded reference to a service account with a name
that matches the name of the service account defined by the deployment
spec in the CSV. This commit adds a validation method to ensure that the
name of the service account in a bundle does not match
deployment.Spec.Template.Spec.ServiceAccountName in the csv's spec

Upstream-repository: api
Upstream-commit: 0fe04f80e0102dc6973109a221a7babd6bee005e
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants