mirror of
https://github.com/siderolabs/omni.git
synced 2026-05-05 06:36:12 +02:00
fix: check config patch creation time as well as updated on orphan check
Some checks failed
default / default (push) Has been cancelled
default / e2e-backups (push) Has been cancelled
default / e2e-forced-removal (push) Has been cancelled
default / e2e-scaling (push) Has been cancelled
default / e2e-short (push) Has been cancelled
default / e2e-short-secureboot (push) Has been cancelled
default / e2e-templates (push) Has been cancelled
default / e2e-upgrades (push) Has been cancelled
default / e2e-workload-proxy (push) Has been cancelled
Some checks failed
default / default (push) Has been cancelled
default / e2e-backups (push) Has been cancelled
default / e2e-forced-removal (push) Has been cancelled
default / e2e-scaling (push) Has been cancelled
default / e2e-short (push) Has been cancelled
default / e2e-short-secureboot (push) Has been cancelled
default / e2e-templates (push) Has been cancelled
default / e2e-upgrades (push) Has been cancelled
default / e2e-workload-proxy (push) Has been cancelled
In the config patch cleanup controller, we falsely assumed that the resource update time was set to be the same as the creation time. This in very rare cases caused the cleanup controller started by the runtime in the tests to prune the config patch created by the test itself, failing it sporadically. This should fix the rare test flake we have: ```text #66 4.431 grpc_test.go:266: #66 4.431 Error Trace: /src/internal/backend/grpc/grpc_test.go:266 #66 4.431 Error: Received unexpected error: #66 4.431 rpc error: code = NotFound desc = resource ConfigPatches.omni.sidero.dev(default/1@undefined) doesn't exist #66 4.431 Test: TestGrpcSuite/TestCrud ``` Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
This commit is contained in:
parent
f3783edcb0
commit
05aad4d86f
@ -179,7 +179,7 @@ func (ctrl *ConfigPatchCleanupController) isOrphan(ctx context.Context, r contro
|
||||
return false, nil
|
||||
}
|
||||
|
||||
if time.Since(configPatch.Metadata().Updated()) < ctrl.DeleteOlderThan {
|
||||
if time.Since(configPatch.Metadata().Updated()) < ctrl.DeleteOlderThan || time.Since(configPatch.Metadata().Created()) < ctrl.DeleteOlderThan {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user