Skip to content

[llvm][utils] skip revert-checking reverts across branches #134108

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

gburgessiv
Copy link
Member

e2ba1b6 references that it reverts a commit that's not a parent of e2ba1b6.

Functionally, this can (and demonstrably does) work(*), but from the standpoint of the revert checker, it's nonsense. Print a logging.error when it's detected.

Tested by running the revert checker against a commit range that includes the aforementioned commit; the logging.error was fired appropriately.

(*) - the specifics here are:

  • the SHA that was referenced was on a non-main branch, but
  • the commit from the non-main branch was merged into the non-main branch from main
  • ...so the functional commit being reverted was originally landed on main, but the SHA referenced from main was from a branch that was cut before the reverted-commit was landed on main

e2ba1b6 references that it reverts a
commit that's not a parent of e2ba1b6.

Functionally, this can (and demonstrably does) work(*), but from the
standpoint of the revert checker, it's nonsense. Print a `logging.error`
when it's detected.

Tested by running the revert checker against a commit range that
includes the aforementioned commit; the logging.error was fired
appropriately.

(*) - the specifics here are:
- the _SHA_ that was referenced was on a non-main branch, but
- the commit from the non-main branch was merged into the non-main
  branch from main
- ...so the _functional_ commit being reverted was originally landed on
  main, but the _SHA_ referenced from main was from a branch that was
  cut before the reverted-commit was landed on main
@gburgessiv gburgessiv force-pushed the llvmutils-skip-revert-checking-reverts-across-branches branch from 1faab91 to 9d09f33 Compare April 2, 2025 19:07
@ajordanr-google ajordanr-google self-requested a review April 2, 2025 20:27
Copy link
Contributor

@ajordanr-google ajordanr-google left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for addressing the comment!

@gburgessiv
Copy link
Member Author

Thanks for the quick review!

This script is just for devs to run, so not covered by premerge checks, so I'm landing with those still pending.

@gburgessiv gburgessiv merged commit a858565 into llvm:main Apr 2, 2025
8 of 10 checks passed
jrguzman-ms pushed a commit to msft-mirror-aosp/platform.external.toolchain-utils that referenced this pull request Apr 17, 2025
This integrates the changes made in
llvm/llvm-project#134108

BUG=b:407969361
TEST=None (though tested upstream before landing)

Change-Id: I405a4124728a1c80b27777aa038dfa5c0f2e7387
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/6428392
Tested-by: George Burgess <[email protected]>
Reviewed-by: Jordan Abrahams-Whitehead <[email protected]>
Auto-Submit: George Burgess <[email protected]>
Commit-Queue: Jordan Abrahams-Whitehead <[email protected]>
@gburgessiv gburgessiv deleted the llvmutils-skip-revert-checking-reverts-across-branches branch May 2, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants