openova/core/services/provisioning/handlers
e3mrah ff0e90156d
fix(provisioning): re-read parent kustomization on commit retry — prevent slug-resurrection race (#1034)
Live race seen 2026-05-06: bookcheck teardown committed at T (removed
the slug from tenants/kustomization.yaml + pruned its directory).
Multitest provision's first commit attempt at T-2s got a ref-race
rejection, the github client's retry replayed the SAME files map (which
held the pre-teardown parent kustomization with bookcheck still in it),
and the retry's commit at T+5s overwrote the teardown's removal. Result:
the parent kustomization listed bookcheck but the directory was gone,
Flux's tenants Kustomization wedged in build-failure loop, and EVERY
subsequent tenant change was blocked until manually unblocked.

Add CommitFilesWithPruneAndRebuild — same as CommitFilesWithPrune but
takes a `rebuild(ctx) (files, error)` callback invoked at the start of
each attempt. Wire both consumer paths (provision + teardown) through
it; each rebuild re-reads parent kustomization.yaml against the current
HEAD and re-applies UpdateParentKustomization / RemoveTenantFromParentKustomization
fresh. Static tenant-scoped manifests still flow through unchanged.

CommitFilesWithPrune is preserved as a thin wrapper for callers that
ship truly static files (e.g. day-2 app installs scoped to a tenant
subdir, no parent merge involved).

Co-authored-by: hatiyildiz <hatice@openova.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 03:28:35 +04:00
..
backing_services.go feat(consolidation): move 8 SME backend services + shared module to public repo 2026-04-28 12:30:32 +02:00
consumer.go fix(provisioning): re-read parent kustomization on commit retry — prevent slug-resurrection race (#1034) 2026-05-06 03:28:35 +04:00
day2_cancels_test.go feat(consolidation): move 8 SME backend services + shared module to public repo 2026-04-28 12:30:32 +02:00
day2_cancels.go feat(consolidation): move 8 SME backend services + shared module to public repo 2026-04-28 12:30:32 +02:00
handlers.go fix(bp-catalyst-platform+bp-newapi): unblock alice signup gates 2-6 on Sovereigns (#915) (#951) 2026-05-05 15:27:23 +04:00
jobs.go feat(consolidation): move 8 SME backend services + shared module to public repo 2026-04-28 12:30:32 +02:00
kubeconfig_reconciler.go feat(consolidation): move 8 SME backend services + shared module to public repo 2026-04-28 12:30:32 +02:00
pod_truth_reconciler.go feat(consolidation): move 8 SME backend services + shared module to public repo 2026-04-28 12:30:32 +02:00
routes.go feat(consolidation): move 8 SME backend services + shared module to public repo 2026-04-28 12:30:32 +02:00