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

Test suite occasionally fails with issue number mismatch #30

Closed
Tracked by #22
chadwhitacre opened this issue Jan 29, 2021 · 4 comments
Closed
Tracked by #22

Test suite occasionally fails with issue number mismatch #30

chadwhitacre opened this issue Jan 29, 2021 · 4 comments

Comments

@chadwhitacre
Copy link
Member

Environment

GHA test suite (run manually atm).

Steps to Reproduce

  1. Run test suite for validating new issues in GHA.

Expected Result

Test suite is consistently green.

Actual Result

Test suite is occasionally red with an error like this:

download-and-extract backed right off the edge!

and a mismatch in the expected and actual issue number in the downloaded log file.

Notes

We make an assumption that run_number == issue_number - 1 (offset vs. ordinal), which holds most of the time. We make this assumption because there doesn't seem to be a way to request the logs for a workflow run based directly on the issue number for the issue event that triggered the run, and it's going to be less download-y to start with run_number and radiate outwards in the list of all recent workflow runs than some other strategy (such as always starting with the most recent run and working backwards). The way I see to resolve this bug is to implement the radiating outwards. ☺️ But! I'm open to other solutions ... best would be a way to determine with certainty from the list of runs which run is the one we want.

@chadwhitacre
Copy link
Member Author

Screen Shot 2021-01-29 at 11 33 00 AM

@chadwhitacre chadwhitacre changed the title Fix issue download race condition in test suite Test suite occasionally fails with issue number mismatch Jan 29, 2021
@BYK
Copy link
Contributor

BYK commented Jan 29, 2021

Asked publicly to GitHub, now it's their turn: https://github.community/t/api-to-get-workflow-run-associated-with-an-issue/158405

@chadwhitacre
Copy link
Member Author

chadwhitacre commented Jan 29, 2021

Gets worse as the test case count goes up (makes sense). Using max-parallel needs to limit the damage for now.

chadwhitacre added a commit that referenced this issue Feb 1, 2021
- close tickets that are unchanged templates
- use the new `gh issue comment` cli (#25)
- serialize to work around race condition in tests (#30)
chadwhitacre added a commit that referenced this issue Feb 1, 2021
@chadwhitacre
Copy link
Member Author

This is fixed. If/when we care we can improve log downloading to allow for parallelizing the tests.

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

No branches or pull requests

2 participants