-
Notifications
You must be signed in to change notification settings - Fork 846
E2E tests: run tests on updates in mirror repos #27288
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
Conversation
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. |
When a ref is created a push event will also be fired, making the create event redundant.
Update event_type.
…e2e/run-on-mirror-changes
|
This seems a bit convoluted. Why are you having the mirror repos do a repository dispatch back to the monorepo to trigger an action in response to the monorepo pushing to them? Keeping in mind that fairly often one merge in the monorepo will trigger several mirror repo pushes, which would then trigger several repository dispatches. |
I agree it looks convoluted, but there are events in the mirror repos like a tag being created that we want to trigger tests. |
|
"Tag being created" most of the time is still going to be because of a push from the monorepo, with the autotagger workflow in between. The only exceptions I can think of are (1) something breaks in the autotagger workflow so someone has to tag it manually and (2) hard-way package releases. I can't think of any other events that would trigger your added workflow. If tags are the only thing you could probably limit the added workflow to only running on tag events, like the autorelease workflow does. That would still mean dozens of dispatches in a flood when the Jetpack weekly releases all the packages and js-packages Jetpack depends on though. |
|
The dispatch is conditioned: The idea here is to test closer to what gets released, and the code from mirros is released, from tags in the mirrors. There are other options, sure, but convoluted as this option seems, I think it might be the cleanest. |
brbrr
left a comment
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 fine with this approach, and we can iterate on it later on.
No, you're right on that part, I missed that there was the check.
I do think that would be cleaner, as then the mirrors that don't need it wouldn't even contain the workflow and wouldn't have do-nothing runs. The way I'd do it would be to make a separate jetpack/tools/cli/commands/build.js Lines 681 to 699 in 51ca350
I still think it would be cleaner to trigger it directly in the monorepo, from the end of the Build job or from the Post-Build job I really need to re-introduce one of these days (see #25892, reverted in #25894). You could still fetch from the mirror repo if you really want to, just saving the back-and-forth dispatches. |
Changes proposed in this Pull Request:
Trigger e2e tests on changes in mirror repos.
This PR only adds the trigger workflow in the mirror repos. The actual execution of relevant tests will be added with a follow-up PR.
In the mirror repos, on
pushevent a repository_dispatch call will be sent back to the monorepo. Based on theevent_typeof the dispatch the e2e tests workflow in the monorepo will execute the relevant tests.Other information:
Jetpack product discussion
pd5faL-i5-p2
Does this pull request change what data or activity we track or use?
no
Testing instructions:
e2e-testsworkflow automattic/jetpack-production ran successfully.