Repository navigation
test: fix three failures on main from #1455 and #1459 behaviour changes - #1464
Merged
Merged
Conversation
added 3 commits
October 13, 2026 00:41
…ce that owns Docker resources #1455 made update_service refuse a rename of any local service that already owns Docker resources under its current name, before its container is stopped, because a volume cannot follow a rename. The rename-conflict test still renamed the running original service onto an occupied destination and expected ServiceResourceConflict, which that guard now preempts. Assert the guard itself on the original service, and reach the destination-occupied check from a stopped service that owns no resources, where it is still the check that refuses. The original container, its data and the occupied container are asserted untouched in both cases. Signed-off-by: David Viejo <dviejokfs@temps.sh>
…ackup #1455 refuses POST /backups/external-services/{id}/run with 409 RESTART_CONFIRMATION_REQUIRED when the backup would restart a PostgreSQL service whose WAL archiving is off, unless the request carries confirm_restart=true. The backup-restore and pitr scenarios provision such a service and sent no confirmation, so the recovery shard failed at the backup step. Send confirm_restart=true from both scenarios. The committed @temps-sdk/api request type predates the field, so a small typed helper extends the generated type instead of editing generated code. Signed-off-by: David Viejo <dviejokfs@temps.sh>
#1459 stopped offering 'Rollback to this' for the deployment that is already serving traffic (canRollbackTo requires !is_current), which is covered by unit tests. The deployments-layout spec still opened the menu of the current deployment and expected the entry. Assert that the current deployment offers Redeploy but no rollback, and that a stopped, non-current deployment does offer it. Signed-off-by: David Viejo <dviejokfs@temps.sh>
📓 Changelog previewThis is what your commits will add to the generated ## [Unreleased]
### Testing
- **providers:** Expect the data-safety refusal when renaming a service that owns Docker resources
- **e2e:** Confirm the database restart when taking the first WAL-G backup
- **web:** Assert rollback on a stopped deployment, not the current one |
|
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
Three jobs were red on
mainin the "Rust Tests" workflow (run 38302551181, head 117ecd4). Each one traces to a deliberate behaviour change that merged without its tests being updated. In all three the product behaviour is right and the test (or scenario client) encoded the old behaviour, so this PR changes tests/scenarios only — no product code, no weakened assertions, no skips or retries.deployments-layout)None of these is a flake: all three are deterministic. (The
deployments-layoutfailure had also been red on the earliermainruns forccda4ea99anda883ff161.)1.
concurrent_duplicate_service_names_preserve_original_databaseRoot cause. #1455 added
ensure_rename_keeps_datatoupdate_service: a rename of a local service that already owns Docker resources is refused withDataSafetyRefusalbefore its container is stopped, because a volume cannot follow a rename. The test renamed the running original service onto an occupied destination and expectedServiceResourceConflict, which the new guard now preempts (panic at thematches!(conflict, ServiceResourceConflict)assertion).Fix. The test now asserts both behaviours:
DataSafetyRefusalnaming that service;ensure_new_local_service_resources_unused) is reached from a stopped service row that owns no Docker resources, where it is still the check that refuses, withServiceResourceConflict.The existing assertions that the original container, its data (
name_guard_marker) and the occupied container are untouched are kept.Verification. Docker available locally (Colima). On the unmodified test:
FAILEDwith the identical panic atservices.rs:18155. With the fix:cargo test --lib -p temps-providers --features docker-tests concurrent_duplicate_service_names_preserve_original_databasepasses (~8–10 s, real containers).rustfmt --checkclean,cargo check --lib -p temps-providersno warnings.2.
deployments-layoutspecs (content separate at 1920px…320px)Root cause. #1459 made
canRollbackTorequire!is_current(rolling back to the deployment that is already live would only redeploy it), with unit tests indeployment-rollback.test.ts. The spec opened the menu of#3733, which its fixture marksis_current: true, and expectedRollback to this. Failed on every width and on retry because it never depended on timing.Fix. The spec now asserts that the current deployment offers
Redeploybut no rollback entry, then opens the menu of#3732(statusstopped, not current) and assertsRollback to thisis visible. That is the case #1459 set out to enable, so the spec now covers it end to end.Verification. Built the console bundle and served it locally with the API mocked as the spec does. The previous spec fails against it with the same
getByRole('menuitem', { name: 'Rollback to this' })timeout as CI; the updated spec passes at all six widths (bunx playwright test e2e/anonymous/deployments-layout.spec.ts --project=chromium-anonymous).3.
backup-restore-scenario(Scenarios / recovery)Root cause. #1455 makes
POST /backups/external-services/{id}/runanswer409 RESTART_CONFIRMATION_REQUIREDwhen the backup would restart a PostgreSQL service whose WAL archiving is off, unless the body carriesconfirm_restart: true(the console and CLI ask the operator first). The scenario provisions exactly such a fresh service and sent no confirmation, so it failed at trigger a real backup. The shard stops at the first failing scenario, sopitr-scenario(same call, same service shape) would have failed next and is fixed here too. The other restore scenarios use engines for whichbackup_restart_reasonis alwaysNone, andpg-upgrade-scenariotakes its backup internally, so neither is affected.Fix.
apps/temps-e2e/src/lib/backup-run.tsadds a typedconfirmedFullBackup()helper and both scenarios use it. The committed@temps-sdk/apirequest type predatesconfirm_restart(the package is not regenerated with each API change), so the helper extends the generated type rather than hand-editing generated code. A full regeneration ofpackages/apiis a separate, much larger change. README step updated.Verification. I did not run the full scenario shard locally (it needs the release binary, MinIO and a registry). Verified: the 409 body in the CI log matches the handler (
run_external_service_backup) andconfirm_restartis anOption<bool>read there; the helper typechecks against the committed@temps-sdk/apitypes (and a negative case fails as expected). The scenarios themselves are exercised by this PR's CI.Notes
Integration Tests (docker-providers)job passed 1124/1125; the only failure was Release 0.0.1 #1 above.