mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(codeartifact): clear managed Reposilite state after teardown (#7078)
Clear managed endpoint and token state only after strict container removal succeeds. Retain ownership on failure for cleanup retry and preserve external endpoints. Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
1 parent
0de2b7fdd8
commit
01ecd4f8da
2 files changed
+97
-3
No files matched your search
+6
-2
@@ -167,12 +167,16 @@ public class ReposiliteSidecarManager implements ContainerTeardown {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopManagedContainers() {
|
||||
public synchronized void stopManagedContainers() {
|
||||
if (containerId == null) {
|
||||
return;
|
||||
}
|
||||
LOG.info("Stopping Reposilite sidecar container");
|
||||
lifecycleManager.stopAndRemove(containerId, null);
|
||||
lifecycleManager.stopAndRemoveStrict(containerId, null);
|
||||
containerId = null;
|
||||
resolvedUrl = null;
|
||||
resolvedTokenName = null;
|
||||
resolvedTokenSecret = null;
|
||||
}
|
||||
|
||||
private static String trimTrailingSlash(String url) {
|
||||
|
||||
Reference in new issue
Block a user