-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add upgrade tests to test main against previous release #6690
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
test/e2e-tests-upgrade.sh
Outdated
@@ -24,6 +24,10 @@ | |||
# Scenario 2: install the previous release, create the pipelines and tasks, upgrade | |||
# to the current release, and validate whether the Tekton pipeline works. | |||
|
|||
# Scenario 3: install the current pipelines, use the integration tests from the previous release(s) | |||
# to prevent regression. Incompatible changes made in the current release cycle are expected to fail | |||
# and will be skipped after failing once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the skipping work? Is there a way to mark as test as skipped for the upgrade test suite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We could introduce a new build tag for upgrade tests, but this would require updates to the e2e test tag when a feature is introduced or there are any breaking changes made to it and spotted by the upgrade test.
- We could have a 'skip list'(probably in the e2e-test-upgrade.sh) and use regex and
mv
command to move around skipped tests in the./test
folder.
I thought this could be in a followup PR? if not so happy to add in this PR if any of the above sounds ok to add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do it in this PR, so we have a way to make backwards incompatible changes if needed, or at least some plan for how we would do so without skipping upgrade tests entirely. I think it's confusing for this comment to describe this functionality if it's not part of this PR.
I'm not sure what it means exactly to skip upgrade tests after they fail once? Does this mean the first time CI is run for one PR, within a CI run after failing once, or between all CI runs for all PRs? I'm not sure if we'd want to just skip failing tests without some user intervention to signal that an incompatible change is intentional.
I'm also not sure what the best way of doing this is. Can you elaborate a bit more on how your ideas would work? Is the intention that you'd have to modify the skip list when making an incompatible change?
I think either tekton chains or chainguard (not sure which) has tests like this already so it might be worth talking to @wlynch about how they work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what it means exactly to skip upgrade tests after they fail once? Does this mean the first time CI is run for one PR, within a CI run after failing once, or between all CI runs for all PRs?
The intentions for skipping here is to prevent the upgrade test from failing consistently when there are known incompatible changes made on devel (of which there should be only few cases that we run into ideally).
I'm not sure what it means exactly to skip upgrade tests after they fail once? Does this mean the first time CI is run for one PR, within a CI run after failing once, or between all CI runs for all PRs?
The upgrade tests now we have is a CRON job. The case I am picturing that if it is observed to fail for the first time during this dev cycle, then we would want to investigate if the failed test is a regression and then decide to either escalate or to skip it(if it is an intentional breaking change).
I was suggesting the 2 alternatives based on the above assumptions if the case is reasonable 🤔 .
I had the chance to learn from @wlynch a bit ago when working on #5784, IIRC some mapping of certain versions and enabled features has been one of the suggestions to take. I am not sure if a list of e2e tests with 'breaking changes' would be a good idea at this stage for our features since there shouldn't be many?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot upgrade tests are a cron job. I wonder if it would make sense to run them as part of CI instead? We might be constrained by our test cluster bandwidth though just based on our experience with integration tests.
Of the two approaches you mentioned, I think the "skip list" is better because it's opt-out rather than opt-in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lbernick , I do agree that it would be nice and responsive to detect breaking changes in CI. Added #6709 as a followup to track moving upgrade tests to CI.
I have also tried out the "skip list" approach in the current commit. Moving forward when we are running against multiple previous releases, we could change the 'skip list' to a mapping of specific releases and incompatible features/tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot upgrade tests are a cron job. I wonder if it would make sense to run them as part of CI instead? We might be constrained by our test cluster bandwidth though just based on our experience with integration tests.
One idea would be to run these tests as part of the release pipeline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Dibyo, tracked the upcoming goals at #6709
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this more-- it would be nice to at least run upgrade tests as part of CI if this file is changed-- otherwise it's hard to say with confidence that this PR works as intended
test/e2e-tests-upgrade.sh
Outdated
header "Testing main against the latest release to detect regression" | ||
get_tests_from_release $PREVIOUS_PIPELINE_VERSION | ||
|
||
skip_breaking_tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JeromeJu curious if you've been able to test this locally, especially the test skipping part. Do you have an example output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried it locally with 1-2 tests name in the list, it just removed those tests from our tests suites(skipping seems to work fine).
May I ask what would an ideal example output to be, it feels that has to be a long output as the logs we have in prow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe just comment in this thread with a link to a github gist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/e2e-tests-upgrade.sh
Outdated
@@ -24,6 +24,10 @@ | |||
# Scenario 2: install the previous release, create the pipelines and tasks, upgrade | |||
# to the current release, and validate whether the Tekton pipeline works. | |||
|
|||
# Scenario 3: install the current pipelines, use the integration tests from the previous release(s) | |||
# to prevent regression. Incompatible changes made in the current release cycle are expected to fail | |||
# and will be skipped after failing once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this more-- it would be nice to at least run upgrade tests as part of CI if this file is changed-- otherwise it's hard to say with confidence that this PR works as intended
test/e2e-tests-upgrade.sh
Outdated
# Upgrade to the current release. | ||
header "Upgrade to the current release of Tekton pipeline" | ||
install_pipeline_crd | ||
# Run the integration tests.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Run the integration tests.c | |
# Run the integration tests. |
function skip_breaking_examples { | ||
for TEST in "${BACKWARD_INCOMPATIBLE_EXAMPLES[@]}"; do | ||
echo "Remove $TEST since it is a breaking change at devel" | ||
rm ./examples/v1/"$TEST".yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if instead of removing the examples tests from the local copy of the repo, would it instead make sense to update the examples tests to accept a flag for which tests should be skipped?
This commit adds the upgrade tests for testing main against the e2e tests from the previous release to prevent regression. Incompatible changes made in the current release cycle are expected to be catched.
Has been prioritizing on other issues and just got back onto this. So far I haven't figured out a way to only trigger such upgrade test when an actual regression happen? Seems the only way rn is to wait for the nightly CRON job. |
Can you clarify what you're trying to do? I think running these checks in CI is tracked in #6709, or you can run it locally to test. Arguably, we should be running these tests as part of CI before making changes to them, otherwise it's hard to know if the changes work as intended, but we could justify saving this for future work. |
I was in the middle of trying to open a new PR and left the current branch as an example for upgrade test changes only, but now let's just keep it in this one.
I am trying to seek for a way to figure a way out to put this as part of the CI and circumvent the flakes which is apparent in our CI. Is it suggesting that making the upgrade test part of the CI ideally prior to the current PR? |
@JeromeJu: PR needs rebase. 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. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Changes
This commit adds the upgrade tests for testing main against the e2e tests from the previous release to prevent regression. Incompatible changes made in the current release cycle are expected to be catched.
This should also catch the case where existing resources become invalid with tests from previous releases.
/kind misc
fixes #6728
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes