Skip to content

[mergebot] Fix for pagination error - #95333

Closed
clee2000 wants to merge 1 commit into
masterfrom
csl/trymergefix1
Closed

clee2000 wants to merge 1 commit into
masterfrom
csl/trymergefix1

Conversation

@clee2000

Copy link
Copy Markdown
Contributor

Fix for weird bug that happens very rarely. My solution is to retrieve all checksuites before going to retrieve their checkruns.

Sometimes cs_cursor=edges[edge_idx - 1]["cursor"] if edge_idx > 0 else None, is None when it shouldn't be because of how we reset checksuites = get_next_checksuites(checksuites) on every loop.

Ex
page 1 of checksuites contains some stuff
page 2 of checksuites: pull {a bunch of checkruns}
cs_cursor gets set to none for the pull checksuite on page 2 because checksuites = get_next_checksuites(checksuites) resets the edges on every loop. Then the checkruns can't be retrieved.

@pytorch-bot

pytorch-bot Bot commented Feb 22, 2023 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 3 Failures, 1 Pending

As of commit ce5753f:

NEW FAILURES - The following jobs have failed:

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 Feb 22, 2023
@clee2000
clee2000 marked this pull request as ready for review February 22, 2023 23:15
@clee2000
clee2000 requested a review from a team as a code owner February 22, 2023 23:15
@clee2000 clee2000 changed the title [mergebot] Fix for weird pagination error [mergebot] Fix for weird error Feb 22, 2023
@clee2000 clee2000 changed the title [mergebot] Fix for weird error [mergebot] Fix for pagination error Feb 22, 2023

@huydhn huydhn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@clee2000

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -f "lint passed"

@pytorchmergebot

Copy link
Copy Markdown
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

cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 25, 2023
Fix for weird bug that happens very rarely.  My solution is to retrieve all checksuites before going to retrieve their checkruns.

Sometimes `cs_cursor=edges[edge_idx - 1]["cursor"] if edge_idx > 0 else None,` is None when it shouldn't be because of how we reset `checksuites = get_next_checksuites(checksuites)` on every loop.

Ex
page 1 of checksuites contains some stuff
page 2 of checksuites: pull {a bunch of checkruns}
cs_cursor gets set to none for the pull checksuite on page 2 because `checksuites = get_next_checksuites(checksuites)` resets the edges on every loop.  Then the checkruns can't be retrieved.

Pull Request resolved: pytorch/pytorch#95333
Approved by: https://github.com/huydhn
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 25, 2023
Fix for weird bug that happens very rarely.  My solution is to retrieve all checksuites before going to retrieve their checkruns.

Sometimes `cs_cursor=edges[edge_idx - 1]["cursor"] if edge_idx > 0 else None,` is None when it shouldn't be because of how we reset `checksuites = get_next_checksuites(checksuites)` on every loop.

Ex
page 1 of checksuites contains some stuff
page 2 of checksuites: pull {a bunch of checkruns}
cs_cursor gets set to none for the pull checksuite on page 2 because `checksuites = get_next_checksuites(checksuites)` resets the edges on every loop.  Then the checkruns can't be retrieved.

Pull Request resolved: pytorch/pytorch#95333
Approved by: https://github.com/huydhn
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 5, 2023
Fix for weird bug that happens very rarely.  My solution is to retrieve all checksuites before going to retrieve their checkruns.

Sometimes `cs_cursor=edges[edge_idx - 1]["cursor"] if edge_idx > 0 else None,` is None when it shouldn't be because of how we reset `checksuites = get_next_checksuites(checksuites)` on every loop.

Ex
page 1 of checksuites contains some stuff
page 2 of checksuites: pull {a bunch of checkruns}
cs_cursor gets set to none for the pull checksuite on page 2 because `checksuites = get_next_checksuites(checksuites)` resets the edges on every loop.  Then the checkruns can't be retrieved.

Pull Request resolved: pytorch/pytorch#95333
Approved by: https://github.com/huydhn
pruthvistony added a commit to ROCm/pytorch that referenced this pull request May 2, 2023
jhavukainen pushed a commit to kulinseth/pytorch that referenced this pull request Mar 15, 2024
Fix for weird bug that happens very rarely.  My solution is to retrieve all checksuites before going to retrieve their checkruns.

Sometimes `cs_cursor=edges[edge_idx - 1]["cursor"] if edge_idx > 0 else None,` is None when it shouldn't be because of how we reset `checksuites = get_next_checksuites(checksuites)` on every loop.

Ex
page 1 of checksuites contains some stuff
page 2 of checksuites: pull {a bunch of checkruns}
cs_cursor gets set to none for the pull checksuite on page 2 because `checksuites = get_next_checksuites(checksuites)` resets the edges on every loop.  Then the checkruns can't be retrieved.

Pull Request resolved: pytorch#95333
Approved by: https://github.com/huydhn
@github-actions
github-actions Bot deleted the csl/trymergefix1 branch August 24, 2024 01:56
pytorchmergebot pushed a commit that referenced this pull request Nov 19, 2026
…eve_checksuites (#203140)

✴️ iz2: Both tests have been `@skip`-ped for over a year, so they cover nothing.

`test_merge_ghstack_into` is revived. It is the only test of how `merge_ghstack_into` lands a ghstack: merged PRs are skipped but listed as dependencies, each open PR is cherry-picked and then its message amended, bottom-up, and only the open PRs are returned. It broke because the stack in its fixtures has since merged, so all four PRs read as closed and nothing was cherry-picked. The test now mocks `is_closed` to the state it describes, and mocks `find_matching_merge_rule` and the lower PR's check runs (the real ones need check-run pages the fixtures lack) while asserting the arguments the lower PR is checked with; the waivers test now asserts its whole rule-check call. Expected messages match the fixtures' current text. Sixteen mutations of `merge_ghstack_into` each make the ghstack tests fail.

`test_gql_retrieve_checksuites` is deleted. GitHub no longer returns check suites for its PR (the fixture has none), and the bug it was added for in #95333 is still caught: reverting that fix makes `test_get_classifications_similar_failures` and `test_get_classifications_wrong_workflow_name` fail.

Meta's internal CI runs this file too and has had both tests stuck as disabled since the target briefly failed to import in October: a test that only skips never passes enough to be re-enabled.

Test plan: `python -m unittest test_trymerge` passes (277 tests); internal `trymerge_test` (fbcode and xplat) goes from 275 pass, 2 skip to 276 pass, 0 skip.

Pull Request resolved: #203140
Approved by: https://github.com/jeanschmidt, https://github.com/huydhn
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.

3 participants