fix: auto-resolve stuck distribution deletions
This commit is contained in:
parent
1797c4a826
commit
2bf4282416
3 changed files with 33 additions and 4 deletions
|
@ -54,7 +54,7 @@ class TerraformAutomation(BaseAutomation):
|
|||
returncode, logs = self.tf_apply(
|
||||
self.working_dir, refresh=self.always_refresh or full
|
||||
)
|
||||
self.tf_posthook(prehook_result=prehook_result)
|
||||
self.tf_posthook(prehook_result=prehook_result, logs=logs)
|
||||
return returncode == 0, logs
|
||||
|
||||
def tf_apply(
|
||||
|
@ -143,7 +143,7 @@ class TerraformAutomation(BaseAutomation):
|
|||
)
|
||||
return tfcmd.returncode, tfcmd.stdout.decode("utf-8")
|
||||
|
||||
def tf_posthook(self, *, prehook_result: Any = None) -> None:
|
||||
def tf_posthook(self, *, prehook_result: Any = None, logs: Optional[str] = None) -> None:
|
||||
"""
|
||||
This hook function is called as part of normal automation, after the
|
||||
completion of :func:`tf_apply`.
|
||||
|
@ -151,6 +151,7 @@ class TerraformAutomation(BaseAutomation):
|
|||
The default, if not overridden by a subclass, is to do nothing.
|
||||
|
||||
:param prehook_result: the returned value of :func:`tf_prehook`
|
||||
:param logs: any available logs from the apply stage
|
||||
:return: None
|
||||
"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue