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

[GHF] Better check for internal diffs #104344

Closed
wants to merge 4 commits into from
Closed

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Jun 28, 2023

Stack from ghstack (oldest at bottom):

During revert, use title of "Meta Internal-Only Changes Check" to determine whether or not internal diff is associated with the PR. When PR is merged/closed, "Meta Internal-Only Changes Check" status is always success, but title message can differ:

  • "There is no internal Diff connected, this can be merged now" means that there are no internal change associated with PR (or it was landed via GitHub First workflow)
  • "The internal Diff has landed, this can be merged now" meaning that PR has associated internal DIFF, and OSS and internal reverts must happen in sync using internal tooling. (Or a revert PR can be authored in OSS)

Add regression test for #100652 that was originated from the internal diff, but was merged as OSS PR.

Fixes #104232

cc @albanD

During revert, use title of "Meta Internal-Only Changes Check" to
determine whether or not internal diff is associated with the PR.

Fixes #104232

[ghstack-poisoned]
@malfet malfet requested a review from a team as a code owner June 28, 2023 13:39
@pytorch-bot
Copy link

pytorch-bot bot commented Jun 28, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/104344

Note: Links to docs will display an error until the docs builds have been completed.

✅ 1 Unrelated Failure

As of commit fb87b85:

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Jun 28, 2023
malfet added a commit that referenced this pull request Jun 28, 2023
During revert, use title of "Meta Internal-Only Changes Check" to
determine whether or not internal diff is associated with the PR.

Fixes #104232

ghstack-source-id: 741925e1b044c24f1c62e557d8a616e5dcd2e813
Pull Request resolved: #104344
@malfet malfet requested a review from bigfootjon June 28, 2023 14:18
During revert, use title of "Meta Internal-Only Changes Check" to determine whether or not internal diff is associated with the PR.

Fixes #104232

cc albanD

[ghstack-poisoned]
malfet added a commit that referenced this pull request Jun 28, 2023
During revert, use title of "Meta Internal-Only Changes Check" to
determine whether or not internal diff is associated with the PR.

Fixes #104232

ghstack-source-id: 3fbd5594b8d38d13c0b4a239ef432be1484dc33b
Pull Request resolved: #104344
During revert, use title of "Meta Internal-Only Changes Check" to determine whether or not internal diff is associated with the PR.

Fixes #104232

cc albanD

[ghstack-poisoned]
malfet added a commit that referenced this pull request Jun 28, 2023
During revert, use title of "Meta Internal-Only Changes Check" to
determine whether or not internal diff is associated with the PR.

Fixes #104232

ghstack-source-id: 2c0e4b3035341b0aa8cf4cfa6d0f1fa9a1fd57e7
Pull Request resolved: #104344
Copy link
Member

@bigfootjon bigfootjon left a comment

Choose a reason for hiding this comment

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

Please import this to fbsource to verify that the internal test suite will continue to work. I assume it will but this has been annoying to fix in the past

if self.get_diff_revision() is None:
return False
checks = self.get_checkrun_conclusions()
if checks is None or checkrun_name not in checks:
return False
return checks[checkrun_name].status != "SUCCESS"

def has_no_connected_diff(self) -> bool:
Copy link
Member

Choose a reason for hiding this comment

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

Returning a negative of a boolean value reduces readability, IMO replace this with has_connected_diff

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, but is it safe to say, that has_connect_diff() is true if status is anything but "There is no internal Diff connected, this can be merged now"?

.github/scripts/test_trymerge.py Outdated Show resolved Hide resolved
During revert, use title of "Meta Internal-Only Changes Check" to determine whether or not internal diff is associated with the PR.

Fixes #104232

cc albanD

[ghstack-poisoned]
malfet added a commit that referenced this pull request Jun 28, 2023
During revert, use title of "Meta Internal-Only Changes Check" to
determine whether or not internal diff is associated with the PR.

Fixes #104232

ghstack-source-id: ff64c5271a0265ff45fee441176ab9ec715537a5
Pull Request resolved: #104344
@malfet
Copy link
Contributor Author

malfet commented Jun 28, 2023

Please import this to fbsource to verify that the internal test suite will continue to work. I assume it will but this has been annoying to fix in the past

@bigfootjon I've not change any of the existing APIs nor added new dependencies, so imo it should be fine, but just to be on the safe side: https://www.internalfb.com/intern/sandcastle/job/18014399493129784/

@malfet
Copy link
Contributor Author

malfet commented Jun 28, 2023

@pytorchbot merge -f "Lint and relevant internal tests are green"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants