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

Fix telemetry timeout #1500

Merged
merged 4 commits into from
Aug 4, 2021

Conversation

AstroProfundis
Copy link
Contributor

What problem does this PR solve?

The timeout setting (hard coded 2s) was not taking affect. It was introduced in #1327

What is changed and how it works?

  • Disable telemetry in local_install.sh as offline installations does not need telemetry at all (they typically don't have access to the Internet)
  • Add support of context in the HTTPClient in utils to handle timeout correctly.

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

Code changes

  • Has exported function/method change

Related changes

  • Need to cherry-pick to the release branch

Release notes:

NONE

@AstroProfundis AstroProfundis added this to the v1.5.4 milestone Jul 27, 2021
@AstroProfundis AstroProfundis self-assigned this Jul 27, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 27, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lucklove

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 27, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2021

Codecov Report

Merging #1500 (236a92a) into master (35abe88) will increase coverage by 29.96%.
The diff coverage is 79.54%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1500       +/-   ##
===========================================
+ Coverage   26.16%   56.13%   +29.96%     
===========================================
  Files         267      292       +25     
  Lines       23926    26072     +2146     
===========================================
+ Hits         6261    14635     +8374     
+ Misses      16842     9428     -7414     
- Partials      823     2009     +1186     
Flag Coverage Δ
cluster 43.99% <75.00%> (?)
dm 26.31% <33.33%> (?)
integrate 50.75% <75.00%> (+34.64%) ⬆️
playground 13.79% <37.50%> (?)
tiup 16.11% <19.04%> (+0.01%) ⬆️
unittest 22.71% <4.54%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/mirror.go 50.08% <0.00%> (ø)
components/cluster/command/root.go 45.62% <0.00%> (+17.51%) ⬆️
components/playground/main.go 46.38% <0.00%> (+43.96%) ⬆️
pkg/cluster/template/install/local_install.sh.go 0.00% <ø> (ø)
pkg/utils/http_client.go 70.14% <78.94%> (+34.96%) ⬆️
pkg/cluster/api/pdapi.go 61.98% <92.85%> (+61.98%) ⬆️
cmd/root.go 73.42% <100.00%> (ø)
pkg/cluster/api/dmapi.go 62.77% <100.00%> (+62.77%) ⬆️
pkg/cluster/spec/util.go 82.02% <100.00%> (+64.04%) ⬆️
pkg/repository/store/txn.go 61.74% <100.00%> (ø)
... and 223 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 35abe88...236a92a. Read the comment docs.

pkg/utils/http_client.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 3, 2021
Copy link
Member

@lucklove lucklove left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 3, 2021
@AstroProfundis
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 236a92a

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 4, 2021
@ti-chi-bot ti-chi-bot merged commit ef79639 into pingcap:master Aug 4, 2021
@AstroProfundis AstroProfundis deleted the fix-telemetry-timeout branch August 4, 2021 03:43
AstroProfundis added a commit that referenced this pull request Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants