Skip to content

Conversation

benank
Copy link
Contributor

@benank benank commented Mar 11, 2022

In some cases where retries are applied to an operation, the ending condition (used to log an error or throw an exception) is never reached because python ranges are exclusive of the ending bound. This PR fixes this issue and adds a -1 to the conditions so that the previously unreachable code is now used.

@benank benank requested review from a team, kjohn-msft and rane-rajasi and removed request for a team March 11, 2022 17:32
@kjohn-msft
Copy link
Collaborator

Please ensure all unit tests are run in both core and ext, and pass as expected.

@codecov
Copy link

codecov bot commented Mar 11, 2022

Codecov Report

Merging #118 (fb91a05) into master (adc2192) will increase coverage by 0.51%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
+ Coverage   79.79%   80.30%   +0.51%     
==========================================
  Files          86       86              
  Lines       11549    11610      +61     
==========================================
+ Hits         9215     9323     +108     
+ Misses       2334     2287      -47     
Impacted Files Coverage Δ
src/core/src/bootstrap/EnvLayer.py 70.82% <100.00%> (+4.50%) ⬆️
src/core/src/core_logic/PatchAssessor.py 98.36% <100.00%> (+9.83%) ⬆️
...rc/core/src/service_interfaces/LifecycleManager.py 72.64% <100.00%> (+5.12%) ⬆️
src/core/src/service_interfaces/StatusHandler.py 89.23% <100.00%> (+1.31%) ⬆️
src/core/tests/Test_LifecycleManagerArc.py 94.59% <100.00%> (ø)
src/core/tests/Test_LifecycleManagerAzure.py 94.79% <100.00%> (+0.47%) ⬆️
src/core/tests/Test_PatchAssessor.py 96.87% <100.00%> (ø)
src/core/tests/Test_StatusHandler.py 99.62% <100.00%> (+0.03%) ⬆️
src/core/tests/Test_ZypperPackageManager.py 96.04% <100.00%> (+0.16%) ⬆️
src/extension/src/EnvLayer.py 59.37% <100.00%> (+5.00%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update adc2192...fb91a05. Read the comment docs.

@benank benank merged commit 7259905 into master Mar 11, 2022
@benank benank deleted the bankiel-fix-retry-1 branch March 11, 2022 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants