-
Notifications
You must be signed in to change notification settings - Fork 65
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
Consolidate backend checks #19126
Consolidate backend checks #19126
Conversation
@@ -64,7 +64,7 @@ jobs: | |||
|
|||
- name: Remove Failure label | |||
uses: actions-ecosystem/action-remove-labels@v1 | |||
if: ${{ success() }} | |||
if: ${{ success() && contains(github.event.pull_request.labels.*.name, 'codeowners-addition-failure') }} |
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.
notice a quiet failure caused by the workflow attempting to remove a label that wasn't there.
if [ ! ${{ contains(toJSON(github.event.pull_request.requested_teams.*.name), 'backend-review-group') }} ]; then | ||
echo "exempt=true" >> $GITHUB_OUTPUT | ||
echo "PR is exempt from backend approval." | ||
else | ||
echo "exempt=false" >> $GITHUB_OUTPUT | ||
echo "PR requires backend approval." | ||
fi |
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.
Is this true? In CODEOWNERS, files either have backend-review-group listed, OR they have a lighthouse team, octo-identity, or mobile? 🤔 no... I just found this line: spec/lib/token_validation @department-of-veterans-affairs/lighthouse-dash @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
With the logic here, a PR that changes files in this dir would hit the else
block.
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 the solution is to remove backend-review-group
from those lines in codeowners 🤔
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 this would be an example of a CODEOWNERS issue. If they own it, our team doesn't need to be on it. If we should be involved in the review, then it'll work as expected. I think these cases will iron themselves out. I can't think of a good reason for why both would be needed yet we shouldn't be a required approver.
Summary
test-failure
ANDtest-passing
.test-failure
andtest-passing
are both appearing becausefailure()
returns IF a failure happened, andsuccess()
triggers upon a successful finish, so if a spec fails, retries, and succeeds BOTH of those methods return true. There are some issues with race conditions as well. When a label is added in the CodeChecks workflow, the other checks that are triggered by thelabeled
orunlabeled
event run immediately, so those may add back a label unintentionally (several workflows add and remove the same labels`Backend PR Labeler
Require backend-review-group approval / check-approval-requirements
requiring a manual re-run and sometimes showing up twice:(pull_request)
vs(pull_request_review)
.pull_request
andpull_request_review
) run as two separate checks. If a commit is pushed (pull_request
event) and doesn't have an approval (naturally), it'll fail. Upon receiving a review, the check will run (pull_request_review
event), and potentially pass, but that doesn't trigger the existing, failedpull_request
event to re-run. This is why we'll see one failed and one passing, and the failed one needs to be re-runrequire-backend-review
label (like above), potential boolean syntax (should be"true"
nottrue
),NOTE: All additions to
backend-pr-labeler
andbackend-pr-approver
were part of this in iteration. I had to merge small PRs to master to test theworkflow_run
trigger.Related issue(s)