mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
chore(cloudformation): remove the unused hasPendingRollbackCleanup hook (#4515)
This commit is contained in:
1 parent
d73e33fe4b
commit
123941dd03
6 files changed
-38
No files matched your search
-7
@@ -218,13 +218,6 @@ public class CfnResourceDispatcher {
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
/** Whether an opted-in provisioner still tracks cleanup owed by an UPDATE_FAILED resource. */
|
||||
public boolean hasPendingRollbackCleanup(StackResource resource) {
|
||||
return registry.forType(resource.getResourceType())
|
||||
.map(owner -> owner.hasPendingRollbackCleanup(resource))
|
||||
.orElse(false);
|
||||
}
|
||||
|
||||
/** Only an opted-in provisioner may keep a failed update attempt in place of the previous resource. */
|
||||
public boolean retainsFailedUpdateState(StackResource resource) {
|
||||
return registry.forType(resource.getResourceType())
|
||||
|
||||
-9
@@ -51,15 +51,6 @@ public interface CfnResourceProvisioner {
|
||||
return rollbackUpdate(resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a failed update still tracks cleanup that this provisioner's ownership-aware delete
|
||||
* owes. The engine no longer consults it: {@code DeleteStack} deletes every
|
||||
* {@code UPDATE_FAILED} resource that has a physical id.
|
||||
*/
|
||||
default boolean hasPendingRollbackCleanup(StackResource resource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* True when this provisioner keeps the failed update attempt's own identity and tracking for
|
||||
* its {@code rollbackUpdate}, so the engine must not restore the previous resource over it.
|
||||
|
||||
-6
@@ -187,12 +187,6 @@ public class LogsLogStreamCfnProvisioner implements CfnResourceProvisioner {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPendingRollbackCleanup(StackResource resource) {
|
||||
return "true".equals(resource.getAttributes().get(CfnRollback.ROLLBACK_OWNED_ATTR))
|
||||
|| resource.getAttributes().containsKey(CLEANUP_ATTR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasReplacementUpdate(StackResource resource) {
|
||||
return resource.getAttributes().containsKey(CLEANUP_ATTR);
|
||||
|
||||
-10
@@ -340,16 +340,6 @@ public class LogsMetricFilterCfnProvisioner implements CfnResourceProvisioner {
|
||||
&& (!snapshot.path("replacement").asBoolean() || ownership(priorState(snapshot)) == Ownership.UNOWNED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPendingRollbackCleanup(StackResource resource) {
|
||||
return resource.getAttributes().containsKey(SNAPSHOT)
|
||||
|| resource.getAttributes().containsKey(STATE_ATTR)
|
||||
|| resource.getAttributes().containsKey(UNCERTAIN_ATTR)
|
||||
|| resource.getAttributes().containsKey(GROUP_ATTR)
|
||||
|| resource.getAttributes().containsKey(NAME_MODE_ATTR)
|
||||
|| "true".equals(resource.getAttributes().get(CfnRollback.ROLLBACK_OWNED_ATTR));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retainsFailedUpdateState(StackResource resource) {
|
||||
return resource.getAttributes().containsKey(SNAPSHOT);
|
||||
|
||||
Reference in new issue
Block a user