Repository navigation
ci: keep the dependency cache, deflake readiness tests, and drop file-content tests - #12602
Merged
Merged
Conversation
Every CI / Native job on #12598 restored no Rust dependency cache and recompiled about 860 crates, taking 20-28 minutes instead of 13-19. The setup action added a hash of the root Cargo.toml to the part of the key that rust-cache also uses to restore older caches, so any root manifest change, here a new workspace member, left nothing to restore. PR runs don't save caches, so every push started cold until v1 saved a new one. That hash existed because rust-cache didn't see the dev profiles in the root manifest. The profiles now live in .cargo/config.toml, which the action hashes itself, and the extra key is just the platform. Manifest and lockfile changes now restore the platform's previous cache and rebuild only what changed; a profile change still selects a fresh key. A new test failed first on the hashFiles key and the root profiles. Validation: the CI workflow tests pass. A clean build still compiles workspace crates with debuginfo=1 and sha2 with opt-level=3, and the existing target directory needed no rebuild. The docs check passes. The warm-cache effect shows only in CI.
macOS CI on the v1 push of 7da9a23 failed standalone_proxy_readiness_rechecks_identity_and_credentials_without_sdk_or_gateway: an apply that should succeed reported 'service readiness check timed out'. Both standalone readiness tests waited at most 1 second, and each check makes several round trips through the SSH fixture, which starts a new process each time. Delaying each fixture call by 0.4 s reproduced the failure locally. The proxy test now waits up to 30 seconds. Its expected failures (stopped container, changed identity, missing key, changed model) return immediately, so the longer wait costs nothing when the fixture is fast. The managed test waits 3 seconds: its loading phase fails only when the wait expires, so a long wait would make every run slower. Validation: with a 0.4 s delay per fixture call both tests now pass, and the managed test also passes at 0.6 s. Without a delay they passed three runs in a row: the proxy test in about 9 s as before, the managed test in about 8 s instead of 6 s.
Contributor
Several tests asserted what a file says rather than what the code does, so they failed on any edit and passed regardless of whether the behavior worked. The cache-key test added in the previous commit was one of them. Removed: - CI files: the dependency-cache key and profile location, the workflow step list, the setup action's text, and the URL format of the nextest, protoc and Docker provider pins. - The proxy Dockerfile's text. - Version agreement between versions.json, Cargo.toml dependency revisions and documentation links. The build reads image defaults from versions.json, so the test only compared a file with itself. - Lists of resource kinds and TLS modes that must not exist. - Hashes of the hosted v0 fixtures, and the two v0.yaml manifests that existed only to be hashed. The parity tests still compare the v0 exports with the authored v1 documents. The OpenShell telemetry test runs code, so it stays, renamed to telemetry.rs. Tests that read data files as inputs to the code under test stay. Fixture notices and the hosted scenario pages no longer mention the removed checks. No test failed first: this only removes tests. Validation: cargo ci passes every step (1028 tests, then 90 lifecycle tests), clippy is clean, and the docs check passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes found while looking into why #12598's CI took 20–28 minutes instead of 13–19.
1.
ci: restore the dependency cache after workspace manifest changesCI / Nativejob on build: trim agent images and move host tooling to Rust #12598 restored no Rust dependency cache and recompiled about 860 crates..github/actions/setup-rustaddedhashFiles('Cargo.toml')to the cache key, in the partSwatinem/rust-cachealso uses to restore older caches.f639c20ed2)..cargo/config.toml, which rust-cache hashes itself;2.
test(e2e): give standalone readiness checks room on slow runnersstandalone_proxy_readiness_rechecks_identity_and_credentials_without_sdk_or_gatewayon thev1push of7da9a23d6c, with "service readiness check timed out" on an apply that should succeed.3.
test: remove tests that check file contents instead of behaviorversions.json,Cargo.tomldependency revisions and docs links (the build reads image defaults fromversions.json, so that test compared a file with itself);v0.yamlmanifests that existed only to be hashed. The parity tests still compare the v0 exports with the v1 documents.telemetry.rs), and tests that read data files as inputs to the code under test.Validation (Linux ARM64)
cargo ci: passes every step on the final commit: 1028 tests, then 90 lifecycle tests.debuginfo=1andsha2withopt-level=3. The existing target directory needed no rebuild.What to expect in this PR's CI
v1run saves caches under the new key, and later PRs restore them even when they changeCargo.toml.