diff --git a/cou/steps/plan.py b/cou/steps/plan.py index cc179814..c6158e84 100644 --- a/cou/steps/plan.py +++ b/cou/steps/plan.py @@ -81,9 +81,8 @@ async def generate_plan(analysis_result: Analysis, backup_database: bool) -> Upg coro=analysis_result.model.wait_for_idle( # NOTE (rgildein): We need to DEFAULT_TIMEOUT so it's possible to change if # a network is too slow, this could cause an issue. - # Since the default timeout is 10 seconds, we need to add 1 second to it to make - # sure that timeout is greater than idle_period. At the same time, we are using max - # function to ensure lower timeout used it here is always at least 11. + # We are using max function to ensure timeout is always at least 11 (1 second + # higher than the idle_period to prevent false negative). timeout=max(DEFAULT_TIMEOUT + 1, 11), idle_period=10, raise_on_blocked=True, diff --git a/cou/utils/juju_utils.py b/cou/utils/juju_utils.py index 3fc52ae9..031934a6 100644 --- a/cou/utils/juju_utils.py +++ b/cou/utils/juju_utils.py @@ -464,9 +464,9 @@ async def wait_for_idle( to avoid false positives. :type idle_period: int :param apps: Applications to wait, defaults to None - :type apps: Optional[list[str]], optional + :type apps: Optional[list[str]] :param raise_on_blocked: If any unit or app going into "blocked" status immediately raises - WaitForApplicationsTimeout. + WaitForApplicationsTimeout, defaults to False. :type raise_on_blocked: bool """