-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Translate annotation line numbers from merge to head #55569
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 74fc3f8 (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. |
Codecov Report
@@ Coverage Diff @@
## master #55569 +/- ##
=======================================
Coverage 77.42% 77.42%
=======================================
Files 1891 1895 +4
Lines 187544 187529 -15
=======================================
+ Hits 145199 145201 +2
+ Misses 42345 42328 -17 |
@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Co-authored-by: Nikita Shulga <nikita.shulga@gmail.com>
@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: This PR - adds a `tools/translate_annotations.py` script that - parses annotations into JSON using the regexes that we were previously passing to [`pytorch/add-annotations-github-action`](https://github.com/pytorch/add-annotations-github-action) and - uses `git diff-index` to translate the line numbers for those annotations from the PR `merge` onto the PR `head`, since (as of pytorch#54967) we now run CI on the former instead of the latter; - modifies the `flake8-py3` and `clang-tidy` jobs to use that script and thus upload JSON in their artifacts instead of raw text; and - modifies the "Add annotations" workflow to specify `mode: json` to allow it to use those preprocessed annotations. Depends on pytorch/add-annotations-github-action#18. Pull Request resolved: pytorch#55569 Test Plan: You can run the unit tests with this command: ``` python tools/test/test_translate_annotations.py ``` I also tested the entire system together in my personal sandbox repo. Reviewed By: malfet Differential Revision: D27662161 Pulled By: samestep fbshipit-source-id: ecca51b79b9cf00c90fd89f0d41d0c7b89d69c63
This PR
tools/translate_annotations.py
script thatpytorch/add-annotations-github-action
andgit diff-index
to translate the line numbers for those annotations from the PRmerge
onto the PRhead
, since (as of Clarify and document commit choice for CI jobs #54967) we now run CI on the former instead of the latter;flake8-py3
andclang-tidy
jobs to use that script and thus upload JSON in their artifacts instead of raw text; andmode: json
to allow it to use those preprocessed annotations.Depends on pytorch/add-annotations-github-action#18.
Test plan:
You can run the unit tests with this command:
I also tested the entire system together in my personal sandbox repo.