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

Speed up, possibly pare down tests #2619

Closed
rfay opened this issue Nov 8, 2020 · 6 comments
Closed

Speed up, possibly pare down tests #2619

rfay opened this issue Nov 8, 2020 · 6 comments
Milestone

Comments

@rfay
Copy link
Member

rfay commented Nov 8, 2020

Is your feature request related to a problem? Please describe.

Tests are taking a really long time to run. Some of the test runs on Windows take more than 2 hours. However, the new arrangement of travis-ci tests, with some parallelization, finishes faster than anything else at this point.

Describe the solution you'd like

  • Run some of the testpkg and testcmd CircleCI tests in parallel, as is done in the travisci.
  • Run the container builds and tests in parallel, instead of running them all sequentially
  • Figure out how to run more relevant tests for certain PRs
  • Consider a way to rerun only tests in the area of a failure; often failures are due to external dependencies, and it would be nice to just run those again.

Anyway, we spend a lot of time and effort and even money on the tests, and it would be nice for them to complete a little sooner and use less resources.

@rfay rfay added this to the v1.17 milestone Nov 8, 2020
@rfay
Copy link
Member Author

rfay commented Jan 8, 2021

To reduce usage of our buildkite test runners, we can

  • Create a dynamic pipeline which only actually executes if golang code has changed
  • Stop using so many buildkite permutations. Just do mac NFS and Windows NFS (and later we'll have WSL2)

The feature request to buildkite for a path filter is buildkite/feedback#243

@rfay
Copy link
Member Author

rfay commented Jan 9, 2021

I turned off all the macOS and Windows tests except one each for the full tests under NFS. We expect people to be using NFS anyway, and so we might as well focus our tests there.

@rfay rfay modified the milestones: v1.17, v1.18 Feb 12, 2021
@rfay rfay modified the milestones: v1.18, v1.19 Jul 14, 2021
@AronNovak
Copy link
Contributor

@rfay Is there anything we can do in order to have green status from the CI overall? Otherwise sane PRs are red due to BuildKite.
Should we try the dynamic pipeline route that you suggested above?

@rfay
Copy link
Member Author

rfay commented Nov 5, 2021

Mostly, the problem is not buildkite, but Docker Desktop, which is flaky in Windows and especially on macOS arm64. It's also where people do most of their work. If you have a specific problem or worry I can help with it. I look at every test situation and retest if I don't know the flaky failure intimately. On important PRs I normally get everything green before pulling. I can easily grant you retest privs on buildkite if you have a specific worry.

@rfay
Copy link
Member Author

rfay commented Dec 22, 2021

I happened to examine a Windows NFS buildkite build and there were some amazing offenders.

TestDdevXdebugEnabled takes more than 11 minutes, TestMutagenSimple takes 17m.

TestComposerVersion 103.60s
TestCmdSnapshotRestore 104.56s
TestHttpsRedirection 109.17s
TestCmdPauseContainers 115.75s
TestPoweroffOnNewVersion 116.53s
TestPortOverride 121.46s
TestGetFreePort 126.91s
TestWebserverType 134.79s
TestDdevFullSiteSetup 137.89s
TestExtraPackages 150.52s
TestDdevImportDB 159.11s
TestCmdMutagen 164.03s
TestDdevRestoreSnapshot 192.21s
TestDdevXhprofEnabled 248.60s
TestDdevAllDatabases 267.51s
TestConfigMariaDBVersion 414.67s
TestDdevStart 454.97s
TestDdevStartUnmanagedSettings 471.01s
TestComposer 560.36s
TestDdevXdebugEnabled 683.87s
TestMutagenSimple 1056.15s

Notes on ways to process:

awk '{gsub(/[\(\)]/, ""); print $3, $4}' <list.txt
sort +1.0 -n

@rfay
Copy link
Member Author

rfay commented Jan 12, 2022

I'm going to close this for now, as a number of things have been addressed and there's always more room for work on this. It's an ongoing priority, not an issue. But the recent improvements are good.

  • Buildkite and circleci don't waste time on docs now
  • The github actions tests are more focused

@rfay rfay closed this as completed Jan 12, 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

No branches or pull requests

2 participants