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

Apply isFailureFromPrevMergeCommit logic to all similar failures #5323

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

huydhn
Copy link
Contributor

@huydhn huydhn commented Jun 12, 2024

Fixes #5188

This is to address the mismatch reported in #5188 where some legit failures from the previous merge commit are marked as flaky. We already have the logic to gate against this in isFailureFromPrevMergeCommit. The bug here is that if a match from a subsequent broken trunk commit was found before isFailureFromPrevMergeCommit was applied, the match was returned right away.

There are 2 fixes here:

  • Correctly apply isFailureFromPrevMergeCommit to all potential matches. Even if one failure shows up from the previous merge commit, the failure will be treated as a new failure.
  • I also move the getPRMergeCommits function call out of hasSimilarFailures because this is the same for all failures in the PR, so we don't need to call it multiple times for each failures.

Testing

pytorch/pytorch#124045

BEFORE

❌ 9 New Failures, 3 Unrelated Failures

As of commit 0b8801e63882c96a3d8650d3076ffbc96cad37c6 with merge base c59a2369bec99dbbc088ac5477efe1ab6adc7ec8 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

AFTER

❌ 12 New Failures

As of commit 0b8801e63882c96a3d8650d3076ffbc96cad37c6 with merge base c59a2369bec99dbbc088ac5477efe1ab6adc7ec8 (image):

NEW FAILURES - The following jobs have failed:

pytorch/pytorch#128464

BEFORE

❌ 1 New Failure, 2 Unrelated Failures

As of commit b245737edbb1a5372b3b63df870aed9746e94958 with merge base 5d8c7f39d46699d8f8e92512309ea3499a29c08a (image):

NEW FAILURE - The following job has failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

AFTER

❌ 1 New Failure, 2 Unrelated Failures

As of commit b245737edbb1a5372b3b63df870aed9746e94958 with merge base 5d8c7f39d46699d8f8e92512309ea3499a29c08a (image):

NEW FAILURE - The following job has failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

@huydhn huydhn requested a review from clee2000 June 12, 2024 02:28
Copy link

vercel bot commented Jun 12, 2024

@huydhn is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 12, 2024
Copy link

vercel bot commented Jun 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
torchci ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 14, 2024 10:54pm

@huydhn
Copy link
Contributor Author

huydhn commented Jun 12, 2024

Spot check some more reverted PRs

pytorch/pytorch#127693

⏳ 20 Pending, 2 Unrelated Failures

As of commit 0b36b0301cc77abf86ab9ad0764f945bc1046f95 with merge base f681e3689b857b8811f19d60d439bfb3fb2dd2d3 (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

@huydhn
Copy link
Contributor Author

huydhn commented Jun 12, 2024

pytorch/pytorch#128374

⏳ 17 Pending, 4 Unrelated Failures

As of commit bfce8c548f25a3a20e7bb33fe59d8fbbd99cf7f8 with merge base 7afffdf48b596d6d8b7e71fb72ded6402d0dce41 (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

@@ -52,6 +52,7 @@ describe("Test various utils used by Dr.CI", () => {
await hasSimilarFailures(
job,
emptyBaseCommitDate,
[],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry is there any testing for this? am i just looking in the wrong place

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me add a test for this, moving mergeCommits is actually a boon here because I can now easily mock it

@huydhn huydhn merged commit 4efc01f into pytorch:main Jun 14, 2024
7 checks passed
@huydhn huydhn deleted the handle-reverted-pr branch June 14, 2024 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dr CI] Classification on revert not accurate
3 participants