Closed adolfo-ab closed 2 weeks ago
The pull request introduces enhancements to the ocp_utilities/operators.py
file, focusing on timeout management for operator installation processes. A new constant, TIMEOUT_15MIN
, is added to extend the timeout options. The wait_for_operator_install
function's default timeout is updated to this new constant. Additionally, the timeout handling in the wait_for_install_plan_from_subscription
function is modified to use a TimeoutWatch
instance for dynamic tracking of remaining time. The updates ensure that status checks respect the new timeout limits while maintaining existing error handling and logging.
File | Change Summary |
---|---|
ocp_utilities/operators.py | Added constant TIMEOUT_15MIN . Updated wait_for_operator_install to use TIMEOUT_15MIN as default timeout. Modified timeout handling in wait_for_install_plan_from_subscription to utilize TimeoutWatch for dynamic tracking. Updated wait_for_status calls to respect new timeout limits. Error handling and logging preserved. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Report bugs in Issues
The following are automatically added:
.pre-commit-config.yaml
exists in the repo.Available user actions:
/wip
to the PR, To remove it from the PR comment /wip cancel
to the PR./hold
, To un-block merging of PR comment /hold cancel
./verified
to the PR, to un-verify comment /verified cancel
to the PR.
verified label removed on each new commit push./cherry-pick <target branch to cherry-pick to>
in the PR.
/cherry-pick branch1 branch2
)/build-and-push-container
in the PR (tag will be the PR number).
/build-and-push-container --build-arg OPENSHIFT_PYTHON_WRAPPER_COMMIT=<commit_hash>
/<label name>
, to remove, use /<label name> cancel
/assign-reviewers
/check-can-merge
/verified
Short description:
Use TimeoutWatch in wait_for_operator_install() function
More details:
Right now, there are 3 functions with timeouts in wait_for_operator_install. We pass a single timeout to this function, that we only use in one of these 3 wait functions. By using TimeoutWatch, we allow the user to define the total time he's willing to wait, and use the remaining time as timeout of subsequent wait functions.
What this PR does / why we need it:
Improves timeout login in wait_for_operator_install.
Which issue(s) this PR fixes:
Special notes for reviewer:
Bug:
Summary by CodeRabbit
New Features
Improvements