cert-manager-operator icon indicating copy to clipboard operation
cert-manager-operator copied to clipboard

CM-261: utilize ginkgo label filter to differentiate cloud platforms

Open lunarwhite opened this issue 1 year ago • 6 comments

Main changes:

  • Bump onsi/gingko/v2 to v2.19.
    • To make use of the newly introduced Label Sets feature. Benefits:
      • It is more expressive and human-readable than regexp combining --focus and --skip.
      • It extends the current --label-filter to support filtering by key-value pairs, with the contains and not contains operations for the labels that have values. (more example usages can be found in the doc)
      • It gives more flexibility in filtering and sorting tests based on labels. As the test suite grows, we might apply more label types to identify Serial/Disruptive, Alpha/Beta, Conformance/MinVersion:xxx, etc.
  • Add an env variable E2E_GINKGO_LABEL_FILTER in the Makefile. Append -ginkgo.label-filter=$(E2E_GINKGO_LABEL_FILTER) to the go test command.
  • Apply labels "Platform:AWS", "Platform:GCP" and "Platform:IBM" to cases description accordingly.
  • Set the default value of E2E_GINKGO_LABEL_FILTER in the Makefile to "Platform: isSubsetOf {AWS}".
    • It would then select and run both non-platform-specific and AWS-only cases.

Other changes:

  • Remove some hardcoded skipping logic.
  • Regroup ACME dns-01 cases by their provider platform. Each dns-01 provider now will have a dedicated Context().

I've tested on the GCP cluster. It shows: (skipped 3 cases labeled "Platform:AWS", 1 labeled "Platform:IBM")

go test \
-timeout 1h \
-count 1 \
-v \
-p 1 \
-tags e2e \
-run "" \
./test/e2e \
-ginkgo.label-filter="Platform: isSubsetOf {GCP}"

...

Ran 17 of 21 Specs in 524.481 seconds
SUCCESS! -- 17 Passed | 0 Failed | 0 Pending | 4 Skipped
--- PASS: TestAll (524.49s)
PASS
ok  	github.com/openshift/cert-manager-operator/test/e2e	846.604s

lunarwhite avatar Jul 24 '24 06:07 lunarwhite

@lunarwhite: This pull request references CM-261 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.17.0" version, but no target version was set.

In response to this:

Main changes:

  • Bump onsi/gingko/v2 to v2.19.
  • To make use of the newly introduced Label Sets feature. Benefits:
    • It is more expressive and human-readable than regexp combining --focus and --skip.
    • It extends the current --label-filter to support filtering by key-value pairs, with the contains and not contains operations for the labels that have values. (more example usages can be found in the doc)
    • It gives more flexibility in filtering and sorting tests based on labels. As the test suite grows, we might apply more label types to identify Serial/Disruptive, Alpha/Beta, Conformance/MinVersion:xxx, etc.
  • Add an env variable E2E_GINKGO_LABEL_FILTER in the Makefile. Append -ginkgo.label-filter=$(E2E_GINKGO_LABEL_FILTER) to the go test command.
  • Apply labels "Platform:AWS", "Platform:GCP" and "Platform:IBM" to cases description accordingly.
  • Set the default value of E2E_GINKGO_LABEL_FILTER in the Makefile to "Platform: isSubsetOf {AWS}".
  • It would then select and run both non-platform-specific and AWS-only cases.

Other changes:

  • Remove some hardcoded skipping logic.
  • Regroup ACME dns-01 cases by their provider platform. Each dns-01 provider now will have a dedicated Context().

I've tested on the GCP cluster. It shows: (skipped 3 cases labeled "Platform:AWS", 1 labeled "Platform:IBM")

go test \
-timeout 1h \
-count 1 \
-v \
-p 1 \
-tags e2e \
-run "" \
./test/e2e \
-ginkgo.label-filter="Platform: isSubsetOf {GCP}"

...

Ran 17 of 21 Specs in 524.481 seconds
SUCCESS! -- 17 Passed | 0 Failed | 0 Pending | 4 Skipped
--- PASS: TestAll (524.49s)
PASS
ok  	github.com/openshift/cert-manager-operator/test/e2e	846.604s

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-robot avatar Jul 24 '24 06:07 openshift-ci-robot

/uncc deads2k /cc @swghosh @TrilokGeer

CI is green. Mark it as ready for review now.

To keep it simple and easy for review and updates, I created this separate PR for CM-261. I didn't touch the main logic of the existing cases, so your comments in #181 are not fully addressed. After this is done, we can rebase and update #181.

lunarwhite avatar Jul 24 '24 08:07 lunarwhite

/test all

swghosh avatar Aug 21 '24 08:08 swghosh

/lgtm /label docs-approved /label px-approved (non-user facing, only e2e test related changes)

swghosh avatar Aug 30 '24 14:08 swghosh

/assign @TrilokGeer

swghosh avatar Oct 17 '24 07:10 swghosh

/approve /hold /test all

swghosh avatar Oct 22 '24 11:10 swghosh

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lunarwhite, swghosh

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[bot] avatar Oct 22 '24 11:10 openshift-ci[bot]

/remove-hold /retest-required

swghosh avatar Oct 23 '24 09:10 swghosh

/retest-required

lunarwhite avatar Oct 25 '24 01:10 lunarwhite

self-adding /label qe-approved

lunarwhite avatar Oct 25 '24 04:10 lunarwhite

@lunarwhite: This pull request references CM-261 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

Main changes:

  • Bump onsi/gingko/v2 to v2.19.
  • To make use of the newly introduced Label Sets feature. Benefits:
    • It is more expressive and human-readable than regexp combining --focus and --skip.
    • It extends the current --label-filter to support filtering by key-value pairs, with the contains and not contains operations for the labels that have values. (more example usages can be found in the doc)
    • It gives more flexibility in filtering and sorting tests based on labels. As the test suite grows, we might apply more label types to identify Serial/Disruptive, Alpha/Beta, Conformance/MinVersion:xxx, etc.
  • Add an env variable E2E_GINKGO_LABEL_FILTER in the Makefile. Append -ginkgo.label-filter=$(E2E_GINKGO_LABEL_FILTER) to the go test command.
  • Apply labels "Platform:AWS", "Platform:GCP" and "Platform:IBM" to cases description accordingly.
  • Set the default value of E2E_GINKGO_LABEL_FILTER in the Makefile to "Platform: isSubsetOf {AWS}".
  • It would then select and run both non-platform-specific and AWS-only cases.

Other changes:

  • Remove some hardcoded skipping logic.
  • Regroup ACME dns-01 cases by their provider platform. Each dns-01 provider now will have a dedicated Context().

I've tested on the GCP cluster. It shows: (skipped 3 cases labeled "Platform:AWS", 1 labeled "Platform:IBM")

go test \
-timeout 1h \
-count 1 \
-v \
-p 1 \
-tags e2e \
-run "" \
./test/e2e \
-ginkgo.label-filter="Platform: isSubsetOf {GCP}"

...

Ran 17 of 21 Specs in 524.481 seconds
SUCCESS! -- 17 Passed | 0 Failed | 0 Pending | 4 Skipped
--- PASS: TestAll (524.49s)
PASS
ok  	github.com/openshift/cert-manager-operator/test/e2e	846.604s

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-robot avatar Oct 25 '24 04:10 openshift-ci-robot

@lunarwhite: 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-ci[bot] avatar Oct 25 '24 05:10 openshift-ci[bot]

/cherry-pick cert-manager-1.15

lunarwhite avatar Mar 05 '25 12:03 lunarwhite

@lunarwhite: new pull request created: #251

In response to this:

/cherry-pick cert-manager-1.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.