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

Change the way we run e2e tests with feature gates in pipelines #3930

Merged
merged 1 commit into from May 17, 2021
Merged

Change the way we run e2e tests with feature gates in pipelines #3930

merged 1 commit into from May 17, 2021

Conversation

ghost
Copy link

@ghost ghost commented May 10, 2021

Changes

Prior to this commit pipelines ran e2e tests for both "stable" and
"alpha" feature gates in a single prow job. This makes the tests
take twice as long as running running either individually.

In a parallel commit to Plumbing we are introducing a new prow job
that is specifically for running alpha e2e tests. This means both
the alpha and stable tests can be run concurrently and hopefully
should reduce the iteration time on PRs - failures should show up
sooner.

The alpha feature gate prow job will set the PIPELINE_FEATURE_GATE
env var when it is initiated. Our e2e script recognizes this var
and sets the feature-flags configmap accordingly. If the env var
is not set then we default to running under "stable" feature gate.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Release Notes

NONE

Prior to this commit pipelines ran e2e tests for both "stable" and
"alpha" feature gates in a single prow job. This makes the tests
take twice as long as running running either individually.

In a parallel commit to Plumbing we are introducing a new prow job
that is specifically for running alpha e2e tests. This means both
the alpha and stable tests can be run concurrently and hopefully
should reduce the iteration time on PRs - failures should show up
sooner.

The alpha feature gate prow job will set the PIPELINE_FEATURE_GATE
env var when it is initiated. Our e2e script recognizes this var
and sets the feature-flags configmap accordingly. If the env var
is not set then we default to running under "stable" feature gate.
@ghost ghost added the kind/misc Categorizes issue or PR as a miscellaneuous one. label May 10, 2021
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label May 10, 2021
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 10, 2021
@ghost
Copy link
Author

ghost commented May 10, 2021

Here's the PR in plumbing to add the PIPELINE_FEATURE_GATE env var: tektoncd/plumbing#833

This PR will end up disabling the "alpha" tests until the one above is merged.

@ghost
Copy link
Author

ghost commented May 12, 2021

Let's see if this works so soon after the plumbing merge:

/test pull-tekton-pipeline-alpha-integration-tests

Edit: ok wow, that actually did start

Screen Shot 2021-05-12 at 8 14 22 AM

@ghost
Copy link
Author

ghost commented May 12, 2021

Re-running integration too to see if that now skips alpha:

/test pull-tekton-pipeline-integration-tests

Looking really good so far - both integration runs have started by patching the feature-flags configmap with the expected gate.

@ghost
Copy link
Author

ghost commented May 12, 2021

It looks like a timeout test failed because of cluster slowness. Let's rerun and see what happens.

/test pull-tekton-pipeline-alpha-integration-tests

@ghost
Copy link
Author

ghost commented May 12, 2021

nice. everything's passed and the integration runs each set their own feature gates as expected.

@ghost ghost mentioned this pull request May 12, 2021
5 tasks
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 12, 2021
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thank you!!
/lgtm

@@ -52,11 +52,14 @@ function run_e2e() {
go_test_e2e -tags=examples -timeout=20m ./test/ || failed=1
}

set_feature_gate "stable"
run_e2e
if [ "$PIPELINE_FEATURE_GATE" == "" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

NIT: We could also do:

set_feature_gate "${PIPELINE_FEATURE_GATE:-stable}"
run_e2e

But this works too.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 17, 2021
@tekton-robot
Copy link
Collaborator

tekton-robot commented May 17, 2021

@sbwsg: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-tekton-pipeline-alpha-integration-tests 3b29316 link /test pull-tekton-pipeline-alpha-integration-tests

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.

@vdemeester
Copy link
Member

/retest

@tekton-robot tekton-robot merged commit 567dce3 into tektoncd:main May 17, 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. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants