Skip to content

Upstream OLM and API sync 12-14 #232

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 10 commits into from
Dec 16, 2021

Conversation

dinhxuanvu
Copy link
Member

Test #229 without OLMConfig PR

timflannagan and others added 10 commits December 15, 2021 13:46
…test failures (#2442)

* Introduce mechanism for gathering test artifacts during individual test failures

Update the testing e2e suite and add a mechanism for gathering test
artifacts during individual test failures. Currently, container logs are
gathered when deprovisioning upstream kind clusters, yet we lack
fine-grain ability to diagnose test failures further.

Note: test failures use the `CurrentGinkgoTestDescription.Failed` field
to determine failures. Testing artifacts are only gathered when the base
$ARTIFACTS_DIR environment variable has been specified.

Add a collect-ci-artifacts.sh bash script, responsible for gathering OLM
native resources for an individual testing namespace. This bash script
will be called when tearing down the generated testing namespace for
relevant e2e packages. Currently, the artifact gathering process is
restricted to only a single namespace - longer term, it might be
possible to instead migrate towards collecting resources that all share
a similar label selector, and utilizing that label selector to handle
multi-namespace testing scenarios.

Introduce another helper function in test/e2e/util_test.go that's
responsible for gathering test artifacts (i.e. calling this newly
introduced script) when the test case had failed, and in either case,
delete the namespace.

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

* test/e2e: Refactor the bundle e2e tests to avoid using global test namespace

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

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 4cc28bb74ff6721eb41491ec57c55cc47bc1ad84
Update the testing e2e packages and ensure that the $KUBECONFIG
environment variable is correctly set before running the bash script
responsible for collecting CI artifacts.

This should fix the following error message that was popping up in
individual CI runs:

```
collecting logs in the ./artifacts/ artifacts directory
../test/e2e/collect-ci-artifacts.sh: line 7: KUBECONFIG: parameter null or not set
failed to collect namespace artifacts: exit status 1
```

Update the kind provisioner to avoid prematurely removing the temporary
directory that contains the constructed (and ephemeral) kubeconfig file
and track that metadata in the TestContext structure. In the case that
field is unset for that object, fall back to the os.Getenv("KUBECONFIG")
value.

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

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 6dc902654d4f2089da9da56cc6b1d574be995d20
Signed-off-by: Daniel Sover <[email protected]>

Co-authored-by: Daniel Sover <[email protected]>

Upstream-repository: operator-lifecycle-manager
Upstream-commit: d36949bb3b7353a43d8e8fc02033e0f09b7252bb
…parser (openshift#203)

* feat(constraints): add compound constraints and olm.constraint value parser

Signed-off-by: Eric Stroczynski <[email protected]>

* renaming and add yaml tags

Signed-off-by: Eric Stroczynski <[email protected]>

Upstream-repository: api
Upstream-commit: 40cb9fd4036ae1a58d84d29d4d14a47649b5f7f4
Upstream-repository: api
Upstream-commit: 7f43803893b09e6160fbaffdb2e32e0c269005ff
* go.*,vendor: Bump controller-runtime to v0.10.1

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

* pkg/controller: Update the CRD testEnv field to use the CRD type

Update the CRD field to use the apiextensionsv1.CustomResourceDefinition
type instead of the client.Object interface. It looks like this change
was introduced during the sweep to k8s 1.22 bump:

kubernetes-sigs/controller-runtime@b5eeb71

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

* go.*,vendor: Bump the o/api dependency for v1 CRDs

Update the o/api dependency and pull in a new version that contains v1 CRDs. Newer controller-runtime versions don't support v1beta1 CRDs

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

* pkg/controller: Update openshift-related tests after bumping o/api dependency

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

* pkg,test: Update test fixtures that are instantiated with status fields

Update the adoption controller test subscription fixture and remove the
status sub-resource block that's shared between tests. When an object is
created, it's status sub-resource is now removed, so changes are centered
around setting this resource before firing off any Update calls used
throughout this test package.

Update any test/e2e APIs that also follow a similiar pattern.

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 1f2472f3a190ae794f8983473f0cf81dd472d9ca
Signed-off-by: Eric Stroczynski <[email protected]>

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 82fbb1aa0c391a2197e9a665759c3f94764850ab
…es (#2418)

Signed-off-by: Eric Stroczynski <[email protected]>

Upstream-repository: operator-lifecycle-manager
Upstream-commit: 7a9e1af72b7d961e95dbe53d8878e9605576d8b5
* feat(resolver): support generic constraint using CEL

Introduce the new type of constraint that uses CEL (Common Expression Language)
as an expression language to define the constraint in a generic way.
This type of constraint will allow operator authors to specify a dependency
on any arbitrary properties in the bundle. This constraint also supports
logical operator such as AND and OR in the CEL expression.

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

* Add unit test for generic constraint and add some context on CEL library

Add unit test cases for generic constraint using CEL to ensure it works
properly in the resolver.

Add some context for the custom library for semver comparison in CEL.

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

* Use constraints library from api with simplified CEL library

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

* Rebase against master to use property converter interface

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

Upstream-repository: operator-lifecycle-manager
Upstream-commit: e3dfbc50dc67a31fef181cc560a537a17e51817b
Signed-off-by: Per G. da Silva <[email protected]>

Upstream-repository: operator-lifecycle-manager
Upstream-commit: be0c556043441662899d19ddf048c77ee61ed34c
@dinhxuanvu dinhxuanvu changed the title Synx 12 14 test [WIP] Synx 12 14 test Dec 15, 2021
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 15, 2021
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 15, 2021
@dinhxuanvu
Copy link
Member Author

/test e2e-upgrade

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 16, 2021

@dinhxuanvu: 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/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@anik120 anik120 left a comment

Choose a reason for hiding this comment

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

/lgtm
trying
/hold cancel
since looks like maintainers don't have permission to edit PRs

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 16, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 16, 2021

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@anik120
Copy link
Contributor

anik120 commented Dec 16, 2021

/unhold

@anik120 anik120 mentioned this pull request Dec 16, 2021
@timflannagan
Copy link
Contributor

/retitle Upstream OLM and API sync 12-14

@openshift-ci openshift-ci bot changed the title [WIP] Synx 12 14 test Upstream OLM and API sync 12-14 Dec 16, 2021
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 16, 2021
@openshift-merge-robot openshift-merge-robot merged commit cf218f7 into openshift:master Dec 16, 2021
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.

6 participants