Repository navigation
ci: split TestModule into multiple suites - #8212
Conversation
|
@gerhard The PR isn't mergeable in this state, but several changes need to happen in our GA to make it work. I'll need your advice on this seems it might be counter-productive to spawn multiple engine as you explained
|
gerhard
left a comment
There was a problem hiding this comment.
I went through the code changes, looking good @TomChv 👍
I need to run this locally, and compare the test suites before and after to make sure that everything behaves correctly before approving & merging. Will do it right after the next meeting.
Super excited to see that big TestModule suite getting split into smaller suites. At least things are manageable now! The fact that you are able to run subsets of interest locally is most promising.
Yes, indeed, that is the second part which should be done part of this PR too, for sure. |
Yes because right now I'm not sure all tests are actually run |
|
@TomChv all tests are still running part of I am now going to run the test suites locally, and see how they compare before & after. |
|
I ran diff dagger/test-list.txt dagger.TomChv/test-list.txt
11a12,15
> TestDaggerCLI
> TestDaggerCall
> TestDaggerConfig
> TestDaggerType
14a19
> TestElixir
23a29
> TestGo
30a37
> TestInterface
55a63
> TestPHP
66a75
> TestPythonThis is exactly as expected. New test suites are showing in this branch, but otherwise all other tests are the same. I am now going to run the various test suites and see how they compare. Will add links to all Dagger Cloud traces. |
|
Given the following host
One-by-one - how long does each take?
Note I noticed that all tests passed the first time. No flakes in sight. Grouped - which groups make most sense?
Tip I am using Note I've just hit my first flake. I am not going to re-run it since I want to finish this series of runs, but that combination of test suites is potentially worth investigating. Caution The following test suites combo is making the Engine stall:
|
|
@gerhard Thanks for all these updates! Looks like it has a positive impact on the CI 🚀 |
TestModule into multiple suitesTestModule into multiple suites
5dbcbdc to
13eb2bf
Compare
13eb2bf to
1bed69d
Compare
|
As a recap, we started by splitting This was a good change since it confirmed that most of the test flakes were in This change goes one step further and extracts from
We now have the following pipelines / jobs split from
Going forward, these are the things that we care about:
While we could combine Before merging, I have a question for @sipsma @jedevc: since TestBaseVersion
TestBasic
TestBuiltins
TestCLI
TestCache
TestCacheMapConcurrent
TestCacheMapErrors
TestCacheMapRecursiveCall
TestCall
TestCheckResponse
TestClient
TestConfig
TestContainer
TestCoreModTypeDefs
TestDefToDAG
TestDefaults
TestDirectory
TestElixir
TestEmptyID
TestEngine
TestEngineNameLabel
TestEnums
TestFile
TestFromDir
TestGPU
TestGit
TestGitModuleSourceSymbolic
TestGo
TestHTTP
TestHost
TestIDFormat
TestIDsDoNotContainSensitiveValues
TestIDsReflectQuery
TestImpureIDsReEvaluate
TestInputObjects
TestInterface
TestIntrospection
TestIsSemver
TestLegacy
TestLexicalRelativePath
TestListResults
TestLoadCircleCILabels
TestLoadClientLabels
TestLoadGitHubLabels
TestLoadGitLabLabels
TestLoadGitLabels
TestLoadGitRefEnvLabels
TestLoadJenkinsLabels
TestLoadSecretsToScrubFromEnv
TestLoadSecretsToScrubFromFiles
TestLoadServerLabels
TestLoadingFromID
TestMatchGoImport
TestMatchVersion
TestModule
TestNamespaceObjects
TestNormalizeVersion
TestNullableResults
TestObject
TestObjects
TestOriginToPath
TestPHP
TestParallelism
TestParallelismFlag
TestParseAuthAddress
TestParseDaggerToken
TestParseGit
TestParseMetaGoImports
TestParsePragmaComment
TestParseRefString
TestPassingObjectsAround
TestPlatform
TestPureIDsDoNotReEvaluate
TestPython
TestRegistryAuthProvider
TestRemoteCache
TestRepoRootForImportPath
TestScrubSecretLogLatency
TestScrubSecretWrite
TestSecret
TestSecretScrubWriterWrite
TestSecretStore
TestSecretStoreNotFound
TestService
TestServicesStartConcurrentHappy
TestServicesStartConcurrentSad
TestServicesStartConcurrentSadThenHappy
TestServicesStartHappy
TestServicesStartHappyDifferentServers
TestServicesStartSad
TestSortInputFields
TestSpanName
TestSplitRequiredOptionalArgs
TestTelemetry
TestTrie
TestTrieExtend
TestTrieReinsert
TestType
TestType
TestTypeDefConversions
TestTypescript
TestValidateRepoRoot
TestVersionCompatibility
TestViews
TestViewsCaching
TestViewsIntrospection |
|
I think we should probably keep the same tests in i.e. everything that Something we should do at some point btw - we should make it easier to group suites together. We could do this with the idea of "embedded suites" - we just need to extend That way we can define the logic of "groups of tests" in the integration test code, instead of having the definition in GitHub YAML - which we're trying to move away from. |
|
If we keep the same tests in In the interest of keeping the same test coverage, I will split
Of course, we will keep I think that we could provision smaller runners for this @matipan. Keeping this as is for now, but I want to revisit this since
|
|
I generally think that we need to reconsider whether we even need separate But given that, in the meantime keeping the coverage the same but splitting up |
|
I really like that idea @sipsma! Since |
a2114fe to
45bc1f9
Compare
The point of testdev is to run our CI code itself against the dev engine, which is important to catch any issues pre-release. Otherwise our CI gets broken only once we do the release. So if we only have one we need to have testdev. |
45bc1f9 to
d5e417c
Compare
Got it. Instead of building & running the dev engine in Docker, could we instead use |
|
Potentially we can use this, but now we have an implicit dependency on IMO, the way to do this properly would be to:
This is a pretty substantial rework, but since we can't publish an image/cli from a PR, the default testing environment can't involve consuming the Just consuming |
Signed-off-by: Tom Chauveau <[email protected]>
This splits test-modules further because it's the test suite with the most failures since the last split. The intention is to keep doing this until: - all test suites complete within 10 mins (95%) - all tests suites succeed 99% of the runs Also, since test-modules is now much smaller, and test-everything-else is larger, we need to split test-everything-else into two parts: - test-engine & test-cli - everything else This is an intermediary state until we figure out a better arrangement. The thing that we care about now is stability & time-to-completion. Ideally, all of these should be a single test suite. I also dropped "Dagger" from a bunch of test suites: it's all Dagger. Signed-off-by: Gerhard Lazu <[email protected]> Squash -2 Signed-off-by: Gerhard Lazu <[email protected]>
Signed-off-by: Gerhard Lazu <[email protected]>
- testdev-modules - testdev-module-runtimes - testdev-container So that tests are more likely to succeed. These instance sizes seem excessive, should configure smaller ones as a follow-up. Signed-off-by: Gerhard Lazu <[email protected]>
d5e417c to
8ec2238
Compare
|
@jedevc @gerhard Something like #7771 should avoid the dep on docker in the infra Or if that isn't salvageable for whatever reason, we can try variations on it like:
|
It was making the tests fail. Signed-off-by: Gerhard Lazu <[email protected]>
…8407) So that we can compare the two different workflows side-by-side. This is something that we have learned ~2 weeks after the last test suite split: - #8212 We know that the split suites are faster & more reliable, but without this change, we cannot compare the two workflows side-by-side. All that we know is that the Engine & CLI workflow is failing more often (flakes are now 2x as likely to happen). This change will show us how all the tests, but split differently, compare. This is part of a wider effort captured in: - #8184 Signed-off-by: Gerhard Lazu <[email protected]>
During #8212, testdev was refactored and I missed these important test suites. This puts them back. We should expect it to get slower and more flaky, but at least the coverage will be the same as before. We were still running the same tests in the split testdev-module-runtimes, so were not really missing on anything test coverage-wise, just the comparison between the original testdev and the split one was less accurate. Signed-off-by: Gerhard Lazu <[email protected]>
We introduced an alternative workflow which splits the big test suites into smaller ones that have appropriately-sized CI runners. Context: - #7863 - #8212 Now that we have been running both workflows in parallel for 4 months and have a long-term understanding of their behaviour, we are going to **temporarily** pause the less reliable jobs and save on infra costs. For more details on the two workflows see this original issue description which has been kept up-to-date all these months: - #8184 As a reminder, we are doing this change so that we: - mark a new milestone in this saga which started 6 months ago, in May 2024: #7339 - make progress towards `All our jobs succeed 90% of the time and finish within 10 minutes` (this change effectively makes our longest job be ~11mins) - make all contributors wait less for all PR checks to be green (including re-running jobs which fail intermittently) - save on CI infra costs which have doubled since September and are on track to reach `$10k` just for November Signed-off-by: Gerhard Lazu <[email protected]>









Run a specific suite:
New suite after the split
TypescriptSuite(Done in tests: move TypeScript test to its own suite #8185): Execute all module TypeScript tests (run in 8m)PythonSuite: Execute all module Python tests (run in 8m30s)GoSuite: Execute all module Go tests (run in 5m15s)ElixirSuite: Execute all module Elixir tests (run in 2m15sPHPSuite: Execute all module PhP tests (run in 1m40s)DaggerCallSuite: Execute all tests frommodule_call_test.go(run in 10m)DaggerConfigSuite: Run all tests frommodule_config_test.go(run in 13m)DaggerCLISuite: Run all tests frommodule_cli_test.go(run in 4m30)This is the result of a rename of
module_functionand the move of some CLI related tests frommodule_configtomodule_cliTestInterface: Run all test frommodule_iface_test.go(run in 2m)TestDaggerType: Run all tests related to module’s type (run in 8m)TestModulestill exists but is much smaller.💡 I think there are better way to split the tests, but this is a first draft to gather teams's opinion.
Now I think the ideal would be to run some suite together in the CI, for example having a function
dagger call test sdksthat run all SDK related suite etc...Some suites are still super expensive in compute resources but at least they are all runnable locally now :)
@gerhard let me know what I can do around the CI itself to improve it too!