Skip to content

Conversation

@crusaderky
Copy link
Collaborator

@crusaderky crusaderky commented Mar 31, 2022

test_report.html is a great tool to answer the questions

  • Did this test just become flaky in my branch, or was it already flaky in main?
  • Did a test become flaky all of a sudden?

However, I find it less usable to answer the questions

  • How flaky is CI nowadays?
  • If I want to reduce CI flakiness, which tests should I focus on?

This PR:

  • Creates a variant report showing only tests that failed twice over the last week, as opposed to once over the last ~2.5 weeks
  • Allows quickly generating custom reports from the command line

Known issue:
the sticker on the README file is identical for the short and long variant of the report

Sample output:
Screenshot from 2022-03-31 14-00-19

@crusaderky crusaderky self-assigned this Mar 31, 2022
@mrocklin
Copy link
Member

Ooh, I am excited about this +1

@ian-r-rose ian-r-rose self-requested a review March 31, 2022 15:59
@github-actions
Copy link
Contributor

github-actions bot commented Mar 31, 2022

Unit Test Results

       18 files  ±0         18 suites  ±0   9h 30m 20s ⏱️ - 24m 59s
  2 703 tests ±0    2 621 ✔️ ±0       81 💤 ±0  1 ±0 
24 163 runs  ±0  22 875 ✔️ +1  1 287 💤 ±0  1  - 1 

For more details on these failures, see this check.

Results for commit ac28cfd. ± Comparison against base commit 2ff681c.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@ian-r-rose ian-r-rose left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @crusaderky!

.mypy_cache/

reports/
test_report.*
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this will hit the short report?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, fixed

r = get_from_github(next_page)
artifacts = workflows + r.json()["workflow_runs"]
r = get_from_github(next_page, params=params)
artifacts += r.json()["artifacts"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch, I suppose we were never getting to the second page

ndownloaded = 0
print(f"Downloading and parsing {nartifacts} artifacts...")

with shelve.open("test_report") as cache:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Today I learned about shelves. I guess this should do a good job of ameliorating rate limiting as well. We may still start running into rate limiting issues since this doesn't cache everything, so we should keep an eye on it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess this should do a good job of ameliorating rate limiting as well.

The shelf is on a local file which is lost every time you restart the test, so no.
Storing the cache somewhere more permanent would let us show the full 90 days instead of just ~20, but

  • it would also require some sort of expiration logic
  • regenerating the cache from scratch (for whatever reason) on the full 120 days would be challenging, as it would hit the rate limiter.

We may still start running into rate limiting issues since this doesn't cache everything

Yes, we're downloading the list of workflows and artifacts twice now. I hope that's not the tipping point...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, we're downloading the list of workflows and artifacts twice now. I hope that's not the tipping point...

Ooh, this might be an issue then, we were fairly close to the rate limit as is.

Copy link
Collaborator Author

@crusaderky crusaderky Mar 31, 2022

Choose a reason for hiding this comment

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

(edit) nevermind, we're already not downloading the artifact list for workflow 51+

@crusaderky crusaderky merged commit e601e79 into dask:main Mar 31, 2022
@crusaderky crusaderky deleted the test_report branch March 31, 2022 18:42
mrocklin pushed a commit to mrocklin/distributed that referenced this pull request Mar 31, 2022
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.

3 participants