-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore: Automatically add labels for all e2e-tests stages to PRs #3048
Conversation
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
Use different approach according to https://docs.github.com/en/actions/using-workflows/using-github-cli-in-workflows Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
I agree with the renaming of the label, but I'm not sure if adding a second label is worth 🤔 |
It allows for easier to see if the tests have ran or not and filtering IMO. Also, end-users know there are e2e tests that can be ran if they want to |
Signed-off-by: Tom Kerkhove <[email protected]>
I would even introduce a |
Signed-off-by: Tom Kerkhove <[email protected]>
Signed-off-by: Tom Kerkhove <[email protected]>
I went even further @JorTurFer to show all stages :)
That way, contributors have a better understanding of what is going on in addition to the comment that has the link. This allows them to have a quick idea where it is, without having to go in details. |
Is there any real benefit behind adding this complexity? Also I think that the original name was chosen because sometimes you'd like to mark the PR as ok even without running the e2e. For example if it is adding some stuff where it doesn't make sense to run e2e. |
on: | ||
pull_request: | ||
types: | ||
- opened |
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.
Should we do this also in reopen?
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'd keep the current label state as the test might have already ran successfully, no?
- name: Remove '${{ env.E2E_LABELS_NOTRUN}}' label | ||
id: remove-not-run-label | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
gh pr edit ${{ needs.triage.outputs.pr_num }} --remove-label '${{ env.E2E_LABELS_NOTRUN}}' | ||
|
||
- name: Remove '${{ env.E2E_LABELS_PASSED}}' label | ||
id: remove-pass-label | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
gh pr edit ${{ needs.triage.outputs.pr_num }} --remove-label '${{ env.E2E_LABELS_PASSED}}' | ||
|
||
- name: Remove '${{ env.E2E_LABELS_FAILED }}' label | ||
id: remove-failed-label | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
gh pr edit ${{ needs.triage.outputs.pr_num }} --remove-label '${{ env.E2E_LABEL}}' | ||
gh pr edit ${{ needs.triage.outputs.pr_num }} --remove-label '${{ env.E2E_LABELS_FAILED }}' | ||
|
||
- name: Add '${{ env.E2E_LABELS_RUNNING }}' label | ||
id: add-running-label | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
gh pr edit ${{ needs.triage.outputs.pr_num }} --add-label '${{ env.E2E_LABELS_RUNNING }}' |
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.
Should we merge these 3 steps into a single one? We can reduce a lot of lines just appending the gh
lines to one of them
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.
Good idea, but will see if we want this based on the main conversation
id: remove-label | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
gh pr edit ${{ needs.triage.outputs.pr_num }} --remove-label '${{ env.E2E_LABEL}}' | ||
gh pr edit ${{ needs.triage.outputs.pr_num }} --remove-label '${{ env.E2E_LABELS_PASSED}}' |
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.
Should we add here other labels like not-run
?
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.
Good idea, but will see if we want this based on the main conversation
Yes, #3048 (comment) & #3048 (comment) - It's basically to make it more contributor-friendly as not everyone knows how the whole e2e tests work. Also, if you are checking the PR list it doesn't give you an idea how they are doing in terms of tests. But if I'm the only one then I'm happy to drop this.
That's a fair ask - Happy to revert |
I have to recognize that seeing how it looks in k8s repo I get better your point, but I still have doubts about if this is overkill for us. |
This is indeed to provide a more robust approach as we've seen growth in PRs and contributors lately.
I think this PR is doing an OK job in managing them, no? I think it's fairly simple to do this at the moment.
Why would this be different if we have our tests in Go vs JS? The PR experience is still the same, or am I missing something? |
#3071 is a lot better, abandon 🚢 |
Automatically add labels for all e2e-tests stages to PRs:
ok-to-merge
toe2e-tests/ok-to-merge
so that it's clear to end-users what the label stands for.Checklist