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

use 30 secs timeout for put vmagent log api #2662

Merged
merged 4 commits into from
Sep 9, 2022

Conversation

nagworld9
Copy link
Contributor

@nagworld9 nagworld9 commented Sep 3, 2022

Description

exercise 30 secs timeout to reduce latency failure rates on PUT VMagent log api.
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.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

@codecov
Copy link

codecov bot commented Sep 3, 2022

Codecov Report

Merging #2662 (1314115) into develop (ef996e2) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop    #2662   +/-   ##
========================================
  Coverage    71.96%   71.96%           
========================================
  Files          103      103           
  Lines        15679    15679           
  Branches      2486     2486           
========================================
  Hits         11283    11283           
  Misses        3879     3879           
  Partials       517      517           
Impacted Files Coverage Δ
azurelinuxagent/common/protocol/hostplugin.py 87.23% <ø> (ø)
azurelinuxagent/common/utils/restutil.py 84.14% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

1 comment

@@ -310,7 +310,7 @@ def redact_sas_tokens_in_urls(url):


def _http_request(method, host, rel_uri, port=None, data=None, secure=False,
headers=None, proxy_host=None, proxy_port=None, redact_data=False):
headers=None, proxy_host=None, proxy_port=None, redact_data=False, timeout=10):
Copy link
Member

Choose a reason for hiding this comment

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

We defining the default timeout in multiple places. We should probably do that on the higher level functions (e.g. http_put) and make a mandatory parameter in the other methods (http_request, _http_request)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would force us to change every http_* API call (GET, POST, etc). I'm okay to do that too.

Copy link
Member

Choose a reason for hiding this comment

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

yes, I think that is a better API interface (which requires more code changes, but hey...) :)

Copy link
Member

Choose a reason for hiding this comment

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

(Unless you think otherwise)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sometimes better things come with price. I'm gonna pay for it if things are clean :)

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.

thanks for the update

@nagworld9 nagworld9 merged commit 12f444b into Azure:develop Sep 9, 2022
@nagworld9 nagworld9 deleted the putlogapi-timeout branch September 9, 2022 22:19
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