-
Notifications
You must be signed in to change notification settings - Fork 1.8k
wip: Run less e2e matrix by default #9109
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
base: main
Are you sure you want to change the base?
Conversation
fa89ad4 to
a3243e7
Compare
|
/run-backcompat-e2e |
b0bbe04 to
654bf50
Compare
|
|
||
| jobs: | ||
| run-if-requested: | ||
| if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/run-extra-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.
So this is a bit more efficient than slash command as it doesn't require to run a workflow if the comment doesn't contain /run-extra-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.
Does this circumvent rules regarding who can run/trigger 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.
I think we should stick to one way of implementing slash commands.
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 we could use a slash command to add a label, and check for the label in matrix - only run certain instances if the label is set.
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.
So the only reason I did not go with slash command was, aside from experimenting, that this approach doesn't consume "run" — aka it won't start a workflow unless the comment on the PR has this content. The slash command approaches runs on any comments on any PRs (or issues I think), which tends to be a lot (and sometimes it may take over some other workflows).
But in general I agree with you, we should stick to one way of implementing slash commands indeed.
|
/run-extra-tests |
|
^^ this won't work for that PR, but this would be the "incatation" |
|
Example of it vdemeester/experiments#3, working with forks. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: twoGiants 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 |
|
Note: the idea is then to mark oldest and latest (including the arm one) as required, and the rest would be optionnal. If they run and fail, by default, |
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 like this idea a lot, I think it will reduce flakiness for any iterative pull requests. Though I wonder if we should ensure that the matrix extras have passed before a PR is merged, in case a backwards compatibility regression is introduced and initially I missed that the required e2e tests still test /run-extra-tests was never commented on the PRlatest and oldest. I think that should effectively cover our bases for regressions.
Two concerns I wanted to discuss as well:
- We will need to make sure this doesn't enable circumventing CI protection rules, who can run or rerun CI
- This duplicates a lot of the existing
e2e-matrix.ymlworkflow. Since that workflow is already setup to be dispatched from another workflow and , does it makes sense to rewrite the e2e test workflow to receive theos,k8s-name,k8s-version,feature-flags, etc as inputs? If we do this, the business logic for setting up and running the e2e tests would all be in one place, and the various workflows which trigger e2e tests would be responsible for specifying their matrixes
|
|
||
| jobs: | ||
| run-if-requested: | ||
| if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/run-extra-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.
Does this circumvent rules regarding who can run/trigger tests?
| outputs: | ||
| sha: ${{ steps.pr.outputs.sha }} | ||
|
|
||
| backcompat-e2e: |
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.
For clarity
| backcompat-e2e: | |
| backwards-compatibility-e2e: |
| concurrency: | ||
| group: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.k8s-name }}-${{ matrix.feature-flags }}-${{ github.event.issue.number }} | ||
| cancel-in-progress: true | ||
| name: e2e tests (backcompat) |
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.
For clarity
| name: e2e tests (backcompat) | |
| name: e2e tests (backwards compatibility) |
|
Also, it looks like while multiple |
Yes, cancelling will be handled for this PR as we have the cancelling group, that I didn't have in my example repository.
Yes, this is something missing, a check that would check if you can or not run/rerun the CI indeed. |
|
Yeah the name isn't correct, I should use |
|
I think I can use something similar to https://github.com/peter-evans/slash-command-dispatch/blob/main/src/github-helper.ts#L58. |
But add a way to run all of them with a comment. Signed-off-by: Vincent Demeester <[email protected]>
654bf50 to
65b5748
Compare
Changes
But add a way to run all of them with a comment.
I wonder if this is going to work 🤔
/kind misc
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