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 for rate limits should be optional #22823

Merged
merged 1 commit into from Apr 7, 2019

Conversation

@robbiet480
Copy link
Member

robbiet480 commented Apr 7, 2019

Description:

Server support for rate limits should have been optional. It was not. This fixes it.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
@codecov

This comment has been minimized.

Copy link

codecov bot commented Apr 7, 2019

Codecov Report

Merging #22823 into dev will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #22823      +/-   ##
==========================================
+ Coverage   93.82%   93.83%   +<.01%     
==========================================
  Files         448      448              
  Lines       36529    36529              
==========================================
+ Hits        34275    34276       +1     
+ Misses       2254     2253       -1
Impacted Files Coverage Δ
homeassistant/components/uk_transport/sensor.py 94.16% <0%> (+0.72%) ⬆️

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 8c17b2f...16791f5. Read the comment docs.

@awarecan

This comment has been minimized.

Copy link
Contributor

awarecan commented Apr 7, 2019

Your fix is confusing me. HTTP 429 is the error for exceeding rate limit, you should always log it as rate limit violation.

Another suggest, you should check first, if condition met, then call log_rate_limits

@robbiet480

This comment has been minimized.

Copy link
Member Author

robbiet480 commented Apr 7, 2019

Your fix is confusing me. HTTP 429 is the error for exceeding rate limit, you should always log it as rate limit violation.

We always log remaining rate limits, not just when a 429 happens.

@awarecan awarecan merged commit 02b7fd9 into dev Apr 7, 2019
23 checks passed
23 checks passed
build Workflow: build
Details
ci/circleci: pre-install-all-requirements Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.5.5 Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.6 Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.7 Your tests passed on CircleCI!
Details
ci/circleci: pylint Your tests passed on CircleCI!
Details
ci/circleci: static-check Your tests passed on CircleCI!
Details
ci/circleci: test 3.5.5 Your tests passed on CircleCI!
Details
ci/circleci: test 3.6 Your tests passed on CircleCI!
Details
ci/circleci: test 3.7 Your tests passed on CircleCI!
Details
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing 8c17b2f...16791f5
Details
codecov/project 93.83% (target 90%)
Details
codeowners-mention codeowners-mention
Details
codeowners-mention codeowners-mention
Details
codeowners-mention codeowners-mention
Details
codeowners-mention codeowners-mention
Details
codeowners-mention codeowners-mention
Details
codeowners-mention codeowners-mention
Details
codeowners-mention codeowners-mention
Details
codeowners-mention codeowners-mention
Details
codeowners-mention codeowners-mention
Details
codeowners-mention codeowners-mention
Details
@ghost ghost removed the in progress label Apr 7, 2019
@delete-merged-branch delete-merged-branch bot deleted the mobile_app-rate-limits-fix branch Apr 7, 2019
unibeck pushed a commit to unibeck/home-assistant that referenced this pull request Apr 7, 2019
pvizeli added a commit that referenced this pull request Apr 8, 2019
@pvizeli pvizeli mentioned this pull request Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.