Skip to content

Sync w/ upstream: operator-lifecycle-manager #213

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
merged 35 commits into from
Nov 30, 2021

Conversation

njhale
Copy link
Contributor

@njhale njhale commented Nov 2, 2021

Contains the set of commits in https://github.com/operator-framework/operator-lifecycle-manager/ that haven't been pulled downstream as of 11/02/2021.

When I get the chance, I'll put the scripts I used to generate this up for review as well.

Note: Some of the commits here are empty. Usually, this is due to a commit having already been cherry-picked with incorrect upstream tracking commit message trailers. I decided to include these commits as a simple way to rectify the situation -- i.e. more metadata reduces confusion in future sync attempts.

@openshift-ci openshift-ci bot requested a review from awgreene November 2, 2021 20:04
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 2, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njhale

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 requested a review from kevinrizza November 2, 2021 20:04
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 2, 2021
Copy link
Contributor

@timflannagan timflannagan left a comment

Choose a reason for hiding this comment

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

This is missing any of the explicit Makefile override options when running the staging OLM e2e suite in downstream environments: 467750e.

Comment on lines 175 to 177
if err = op.EnsureCSVMetric(); err != nil {
logger.WithError(err).Fatalf("error emitting metrics for existing CSV")
}
Copy link
Contributor

@timflannagan timflannagan Nov 4, 2021

Choose a reason for hiding this comment

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

This commit introduces a problematic/flaky e2e test that was prohibiting the initial downstream sync and leading to timeouts. It may be easier to simply exclude this commit until we fix that flaky e2e test upstream from this sync PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Note: I dropped this commit from the PR to help cut down on e2e flakes. We're already tracking fixing this upstream, so we're not missing a ton excluding it while we get a proper fix through the chain.

@@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '~1.16'
- run: make e2e-local E2E_NODES=2 JUNIT_DIRECTORY=./artifacts/
- run: make e2e-local E2E_NODES=2 ARTIFACTS_DIR=./artifacts/
Copy link
Contributor

Choose a reason for hiding this comment

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

We'll technically need to update o/release as well as we explicitly specify the JUNIT_DIRECTORY there. Likely easiest to drop this commit from this PR and tackle at a later date?

Copy link
Contributor Author

@njhale njhale Nov 11, 2021

Choose a reason for hiding this comment

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

Hmm, this was a breaking change then.

Copy link
Contributor

Choose a reason for hiding this comment

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

I called it out when the PR was opened: operator-framework/operator-lifecycle-manager#2432 (comment) - imo it's a quick change and not the end of the world as we're between freezes right now and have the flexibility to make these types of changes.

dinhxuanvu and others added 19 commits November 15, 2021 16:30
In some special cases, the MultiOperatorGroups condition is missing
even though there are multiple OGs in the same namespace. The process
of adding this condition happens during syncNamespace which sometimes
doesn't happen if syncOperatorGroups fails prematurely due to other
errors. Moving the MultiOperatorGroups condition to syncOperatorGroups
to ensure it will be run everytime.

Signed-off-by: Vu Dinh <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 69bccf373e4d970072a9bf7f2993a94b6c7b07dc
Explicitly ignore operatorclient generated packages

The gofmt/goimport commands are touching generated packages that don't
have the proper "//go:generate ..." instructions.

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 8ed489c8e2031722a66b22ee2ab5631e679be477
…style checks

Introduce the ci/sanity GH workflow:
- Runs `make vendor`
- Runs `make lint`
- Ensures that both of those targets don't produce a diff when running
  `make diff`

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 5deade00b217f2dcea248079ea3d7779895b6d75
Run find . -name '*.go' -not -path "./vendor/*" -not -path "./pkg/lib/operatorclient/operatorclientmocks/*" | xargs gofmt -w
find . -name '*.go' -not -path "./vendor/*" -not -path "./pkg/lib/operatorclient/operatorclientmocks/*" | xargs goimports -w and commit the results.

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 2246f8aa4c5f484610f545dab19b9c4e32aef973
* Update the CONTRIBUTING.md guidelines

Signed-off-by: timflannagan <[email protected]>

* Address review feedback

Signed-off-by: timflannagan <[email protected]>

* Add linting target, link to the code of conduct, flesh out the style and review guidelines

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: f87b21f888e5366f358bb6d139bc194052cd85ab
Signed-off-by: timflannagan <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 8563f6fd75963ef2cc8b76dc9b080bf7de38a6c2
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 404aa2c5b4398f1cf96d3e65c3346cdeed16d871
…s (#2356)

Update the sanity workflow and avoid running the defined jobs when only
markdown changes are present in the PR. This is a follow-up to #2347
which enabled this behavior with the other actions, and this sanity
action was introduced after that PR had already merged.

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 26c36d719bd6edb3a43829ee67a50c4fcd230d7b
Update the root Makefile and remove the target for running the metric
e2e tests.

Remove the test/rh-operators directory.

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 45b334bf47e889dfc0f94cdec70609ca92676e90
* fix(prometheus): add summary and description for prometheus alerts

Signed-off-by: Tyler Slaton <[email protected]>

* fix(prometheus): updating language on description for alerts

Signed-off-by: Tyler Slaton <[email protected]>

* fix(prometheus): change copy on alerts for PR

Signed-off-by: Tyler Slaton <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 54f954b6121162195d7db28f7e0e180127e0fe10
Signed-off-by: timflannagan <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: e48737c5fc30c867d7f3ea3ce471c86050aa9a89
…#2370)

Currently, OLM only caches configmap with olm-managed label to reduce
memory usage footprint. There is an automatic mechanism to inject
this label to all configmaps that belong to catalogsource. However,
for e2e test, this label should be added by default to avoid extra
logic to be executed.

Signed-off-by: Vu Dinh <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 8b0ac13809b5155e4b7f1415e2fb37a060c3fe07
…troller (#2349)

* pkg/controller: Fix panic when creating cluster-scoped RBAC in OG controller

Fixes [#2091](operator-framework/operator-lifecycle-manager#2091).

This is a follow-up to [#2309](operator-framework/operator-lifecycle-manager#2309) that attempted to fix the original issue. When checking whether the ClusterRole/ClusterRoleBinding resources already exist, we're also checking whether the existing labels are owned by the CSV we're currently handling. When accessing the "cr" or "crb" variables that the Create calls output, a panic is produced as we're attempting to access the meta.Labels key from those resources, except those resources themselves are nil. Update the check to verify that the cr/crb variables are not nil before attempting to access those object's labels. The testing fake client may need to be updated in the future to handle returning these resources properly.

Signed-off-by: timflannagan <[email protected]>

* test(og): de-flake sync unit tests

Co-authored-by: Nick Hale <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 188ee1ae265f0a79d90b4cce52d97a26f16afe5a
default global catalog namespace shouldn't be vendor specific

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 33606c9b07a7cb180f3d72acefa6da763d59eff5
…ed (#2365)

* Makefile: Avoid hardcoding the quay repository in the release target

Update the release target and avoid hardcoding the
quay.io/operator-framework/olm quay repository and instead use the
existing IMAGE_REPO variable defined further up in the Makefile.

Update how the $(ver) variable is handled and avoid hardcoding the 'v'
prefix when overriding that 'ver' variable in the environment.

Signed-off-by: timflannagan <[email protected]>

* Integrate goreleaser to automate the building and publishing of multi-arch container images

Signed-off-by: timflannagan <[email protected]>

* .github/workflows: Add a release workflow for creating draft releases

Add a GHA release workflow that's triggered on tags that's responsible
for building and pushing multi-arch (i.e. manifestlist) OLM container
images using goreleaser.

Goreleaser will also create a draft release, and generate a changelog
since the previous tag.

Rendering the release quickstart manifests is done after goreleaser has
created this draft release as there's no easy way to hook this
functionality into goreleaser after the docker images/manifestlists have
been pushed but before release artifacts are generated.

Use the 'softprops/action-gh-release' to update the newly created draft
release with these quickstart manifests as assets.

Signed-off-by: timflannagan <[email protected]>

* .goreleaser: Add support for ppc64le and s390x architectures

* .github/workflows: Avoid using the latest goreleaser action version

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 41261fc6cef588c520176476974d64871ce1a312
Update the root Makefile and update the `e2e` target to use the ginkgo
executable instead of `go test ...` as logs produce when running the e2e
suite aren't captured until after the process has completed. This leads
to situations where failing tests aren't immediately communicated back
and loss of logs entirely in the case where the process was manually
teminated.

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 584e12a9819b8aea1205332c4eba72a46d609fad
Use server-side apply to update a fixture and avoid false negatives due
caused by resource contention.

Signed-off-by: Nick Hale <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 6b3935294cf09261d81b9233ee5fd181ae63e6e0
Signed-off-by: Daniel Sover <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: 1a6a03ec9e18a5e4394b06a053258846c6d52872
Signed-off-by: Vu Dinh <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: a03dd0c21020d1f2c0486e00fb5f6660f1d1e363
@timflannagan
Copy link
Contributor

/retest

1 similar comment
@timflannagan
Copy link
Contributor

/retest

akihikokuroda and others added 2 commits November 29, 2021 17:31
Signed-off-by: akihikokuroda <[email protected]>

Upstream-repository: operator-lifecycle-manager
Upstream-commit: eabd986fefe848d15c877988a7c4dea5924ae8eb
Currently, when resolution happens, every subscription will get
updated regardless if there are any changes applied or not. This
resolves into unnecessary API update calls.

This commit will filter out subscriptions that don't get changed
and only changed ones get updated.

Note: Remove an additional update API call from one of subscription
sync methods as well.

Signed-off-by: Vu Dinh <[email protected]>

Upstream-repository: operator-lifecycle-manager
Upstream-commit: e6cc305d49e865020b0d3481b621bf7412fb871a
@timflannagan
Copy link
Contributor

/retest

2 similar comments
@timflannagan
Copy link
Contributor

/retest

@timflannagan
Copy link
Contributor

/retest

@timflannagan
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 30, 2021
@openshift-merge-robot openshift-merge-robot merged commit d1d3813 into openshift:master Nov 30, 2021
@njhale njhale deleted the sync/10-18 branch November 30, 2021 15:15
awgreene pushed a commit to awgreene/operator-framework-olm that referenced this pull request Feb 2, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>

Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
awgreene pushed a commit to awgreene/operator-framework-olm that referenced this pull request Feb 22, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>

Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 1, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 2, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 2, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 2, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 4, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 4, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 4, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 4, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 4, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 7, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 7, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 8, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 9, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 10, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 10, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 12, 2022
* Ignore the root vendor directory

* Remove the root vendor directory

Signed-off-by: timflannagan <[email protected]>

* Ignore the root bin directory

* Remove tool dependencies that are installed at runtime from root module

* Update workflows and Makefile to avoid referencing the vendor directory

Signed-off-by: timflannagan <[email protected]>
Upstream-repository: api
Upstream-commit: 73f2f9e7f359194b8f38f62406920669eb85c37f
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.