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

Update GitHub Actions workflows triggers #158

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

praseodym
Copy link
Contributor

Do not trigger Frontend and Backend workflows on push, but only for pull request and merge queue (merge group). Because commits to main are already checked in the merge group, they do not need to run on push. Also, the pull_request trigger will run on the PR merge branch instead of the PR branch, which lets us find potential test failures sooner (in the PR of only when the merge queue checks run).

Do not trigger Frontend and Backend workflows on push, but only for pull
request and merge queue (merge group). Because commits to `main` are
already checked in the merge group, they do not need to run on push.
Also, the `pull_request` trigger will run on the PR merge branch instead
of the PR branch, which lets us find potential test failures sooner
(in the PR of only when the merge queue checks run).
@jschuurk-kr
Copy link
Contributor

Do not trigger Frontend and Backend workflows on push, but only for pull request and merge queue (merge group).

My concern with this is that this makes us rely more on people running the tests locally themselves. Or people run a sub-set of the tests, create a PR, and when some other tests fail, they "just fix the tests" because they're done (they submitted a PR after all), instead of really engaging with the failing tests. This is most likely to happen with the dom-to-db tests.
Might also be that I'm too cynical because of experiences in previous jobs...

Because commits to main are already checked in the merge group, they do not need to run on push.

I agree and still... the paranoid part in me wants to keep running them for push-es to main.

@praseodym
Copy link
Contributor Author

Do not trigger Frontend and Backend workflows on push, but only for pull request and merge queue (merge group).

My concern with this is that this makes us rely more on people running the tests locally themselves. Or people run a sub-set of the tests, create a PR, and when some other tests fail, they "just fix the tests" because they're done (they submitted a PR after all), instead of really engaging with the failing tests. This is most likely to happen with the dom-to-db tests. Might also be that I'm too cynical because of experiences in previous jobs...

I don't think we currently wait for the tests on push to run before creating a pull request. Especially when working with draft pull requests and when pull requests are changed after creation (which is almost always). All tests will still run on the pull request, and in a better way because any changes to main are also tested.

Because commits to main are already checked in the merge group, they do not need to run on push.

I agree and still... the paranoid part in me wants to keep running them for push-es to main.

If you look at the checks on the latest commits to main, you'll see that the Frontend and Backend checks are run twice, once by the merge group and once by the push trigger: https://github.com/kiesraad/abacus/commits/main/

@jschuurk-kr
Copy link
Contributor

Do not trigger Frontend and Backend workflows on push, but only for pull request and merge queue (merge group).

My concern with this is that this makes us rely more on people running the tests locally themselves. Or people run a sub-set of the tests, create a PR, and when some other tests fail, they "just fix the tests" because they're done (they submitted a PR after all), instead of really engaging with the failing tests. This is most likely to happen with the dom-to-db tests. Might also be that I'm too cynical because of experiences in previous jobs...

I don't think we currently wait for the tests on push to run before creating a pull request. Especially when working with draft pull requests and when pull requests are changed after creation (which is almost always). All tests will still run on the pull request, and in a better way because any changes to main are also tested.

I still see a risk of noticing some failing tests too late, i.e. only after you submit a pull request. And then it's easy to fall into "just fixing the tests" instead of using the tests as a feedback mechanism.

On the other hand, there are quite a few assumptions beneath that scenario. I'm ok with merging these changes, if we remain vigilant about the scenario I sketched.

Because commits to main are already checked in the merge group, they do not need to run on push.

I agree and still... the paranoid part in me wants to keep running them for push-es to main.

If you look at the checks on the latest commits to main, you'll see that the Frontend and Backend checks are run twice, once by the merge group and once by the push trigger: https://github.com/kiesraad/abacus/commits/main/

I think the only way to convince me is to run the pipeline with this new configuration, so let's. :-D

@praseodym praseodym added this pull request to the merge queue Jul 18, 2024
Merged via the queue into main with commit 714d339 Jul 18, 2024
3 checks passed
@praseodym praseodym deleted the github-actions-workflow-triggers branch July 18, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants