dockerfile-image-update icon indicating copy to clipboard operation
dockerfile-image-update copied to clipboard

Use rateLimiter

Open tarishij17 opened this issue 2 years ago • 5 comments

tarishij17 avatar Sep 28 '22 14:09 tarishij17

Thanks for the contribution! It looks like @tarishij17 is an internal user so signing the CLA is not required. However, we need to confirm this.

salesforce-cla[bot] avatar Sep 28 '22 14:09 salesforce-cla[bot]

Codecov Report

Merging #588 (68b93e2) into main (4d77f25) will decrease coverage by 0.49%. The diff coverage is 76.54%.

:exclamation: Current head 68b93e2 differs from pull request most recent head 2767e3f. Consider uploading reports for the commit 2767e3f to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #588      +/-   ##
============================================
- Coverage     82.43%   81.94%   -0.50%     
- Complexity      302      312      +10     
============================================
  Files            23       25       +2     
  Lines          1076     1152      +76     
  Branches        135      147      +12     
============================================
+ Hits            887      944      +57     
- Misses          155      164       +9     
- Partials         34       44      +10     
Impacted Files Coverage Δ
.../dockerfileimageupdate/subcommands/impl/Child.java 86.95% <57.14%> (-13.05%) :arrow_down:
...dockerfileimageupdate/subcommands/impl/Parent.java 82.00% <60.00%> (-9.67%) :arrow_down:
...ce/dockerfileimageupdate/subcommands/impl/All.java 83.75% <64.70%> (-5.65%) :arrow_down:
...kerfileimageupdate/utils/DockerfileGitHubUtil.java 85.71% <75.00%> (-0.19%) :arrow_down:
.../salesforce/dockerfileimageupdate/CommandLine.java 64.16% <100.00%> (+4.35%) :arrow_up:
...esforce/dockerfileimageupdate/utils/Constants.java 100.00% <100.00%> (ø)
...orce/dockerfileimageupdate/utils/PullRequests.java 100.00% <100.00%> (ø)
...force/dockerfileimageupdate/utils/RateLimiter.java 100.00% <100.00%> (ø)

codecov[bot] avatar Sep 29 '22 10:09 codecov[bot]

@tarishij17 Can you point to the unit test that validates that PR's are cut only at the rate configured by the rate limiter? It looks like the current unit tests were updated but no new ones were added.

cjneasbi avatar Oct 03 '22 15:10 cjneasbi

@tarishij17 Can you point to the unit test that validates that PR's are cut only at the rate configured by the rate limiter? It looks like the current unit tests were updated but no new ones were added.

I haven't added them yet. I wanted to have first review in place to incorporate any major changes before adding any unit tests.. will be adding in next commit.

tarishij17 avatar Oct 04 '22 11:10 tarishij17

  • can we keep the limit configurable and have a default number a little higher?
  • does it make sense to stop the execution(or have an option) if a limit is reached for a given hour? with 30 PRs per hour we may not even come out of single execution if we keep on updating for the next hour

jeetchoudhary avatar Oct 04 '22 17:10 jeetchoudhary

Thanks for the contribution! Unfortunately we can't verify the commit author(s): tok-sfci343. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce.com Contributor License Agreement and this Pull Request will be revalidated.

salesforce-cla[bot] avatar Nov 23 '22 09:11 salesforce-cla[bot]