Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed delays for HTTP retries rather than exponential delays #1967

Merged
merged 9 commits into from
Jul 31, 2020

Conversation

larohra
Copy link
Contributor

@larohra larohra commented Jul 25, 2020

Description

This PR addresses the issue where we can see upto 5mins of provisioning delay due to exponential delays in the restutil logic. Now, we will only have sequential delays. Changed the defaults to be at par with the Windows Guest Agent.

Issue #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing.

Quality of Code and Contribution Guidelines

@codecov
Copy link

codecov bot commented Jul 25, 2020

Codecov Report

Merging #1967 into develop will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1967      +/-   ##
===========================================
- Coverage    69.60%   69.59%   -0.02%     
===========================================
  Files           85       85              
  Lines        11998    11993       -5     
  Branches      1677     1676       -1     
===========================================
- Hits          8351     8346       -5     
  Misses        3273     3273              
  Partials       374      374              
Impacted Files Coverage Δ
azurelinuxagent/common/utils/restutil.py 90.58% <100.00%> (-0.19%) ⬇️

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 ac67184...9a03625. Read the comment docs.

kevinclark19a
kevinclark19a previously approved these changes Jul 30, 2020
@larohra
Copy link
Contributor Author

larohra commented Jul 30, 2020

restutil.http_get("http://foo.bar", retry_delay=retry_delay_in_sec, max_retry=max_retry)
duration = datetime.utcnow() - start_time

self.assertEqual(max_retry, mock_resp.call_count, "Did not Retry the required amount of time")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "times" in "Did not Retry the required amount of times"

narrieta
narrieta previously approved these changes Jul 31, 2020
Copy link
Member

@narrieta narrieta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (small typo)

@larohra larohra dismissed stale reviews from narrieta and kevinclark19a via 6b95313 July 31, 2020 18:55
@larohra larohra merged commit 0991c3a into Azure:develop Jul 31, 2020
@larohra larohra deleted the reduce-http-retries branch July 31, 2020 20:27
@pgombar pgombar mentioned this pull request Aug 28, 2020
6 tasks
pgombar added a commit to pgombar/WALinuxAgent that referenced this pull request Nov 5, 2020
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.

3 participants