fix(redshift): remove a stale cluster container before creating it (#4537)

* fix(redshift): remove a stale cluster container before creating it

* fix(redshift): keep legacy-named containers when starting a cluster

* test(redshift): drop the zero-ETL cluster teardown
This commit is contained in:
Kenshin Okinaka authored and GitHub committed 2026-09-27 20:15:22 -04:00
1 parent a43dcfa689
commit 5fc38e33cb
3 files changed
+40 -13

No files matched your search

@@ -67,6 +67,9 @@ public class RedshiftContainerManager {
public RedshiftContainerHandle start(String accountId, String clusterIdentifier, String masterUsername, String masterPassword) {
String image = config.services().redshift().imageVersion();
String containerName = containerName(accountId, clusterIdentifier);
// Only the current name: no volume backs this container, so removing a legacy-named survivor
// would destroy cluster data that adoptOrStart does not look for.
lifecycleManager.removeIfExists(containerName);
List<String> envVars = List.of(
"POSTGRES_USER=" + masterUsername,