-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Add GHA to cancel redundant GHA workflows except on master #54689
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
💊 CI failures summary and remediationsAs of commit 30a0247 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
|
@janeyx99 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
| workflow_run: | ||
| types: | ||
| - requested | ||
| workflows: |
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.
This is the most lightweight way for us to cancel redundant workflows, but it comes at the potential cost of needing to list out all the names of our workflows here. It would not be too difficult to write a script that would generate the names, but I wonder if there's a better, more GH supported way to accomplish the same thing. (e.g., if there were some way to just specify all workflows with a *). (comment copied over from other PR)
Summary: #54779 split out the logic from our "Lint" workflow into a separate workflow that allows us to annotate PRs from forks. However, as of #54689, it is possible for the "Lint" workflow to be canceled, in which case it may not upload the "flake8-py3" and "clang-tidy" artifacts that the "Add annotations" workflow expects. This often results in GitHub pointlessly sending notification emails due to the failure in the "Add annotations" workflow. This PR fixes the issue by gracefully handling the case where the expected artifact is absent. Pull Request resolved: #55242 Test Plan: I tested this in the same external sandbox repo used to test #54779. Reviewed By: malfet Differential Revision: D27540120 Pulled By: samestep fbshipit-source-id: 47cc02950edbbc6381033bda2fe4570cb3e331cb
Relands #54685 with the fix to filter out master
Tested with @samestep in other repository.