Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

add debug log for api request limit #3452

Merged

Conversation

neerfri
Copy link
Contributor

@neerfri neerfri commented Mar 2, 2015

No description provided.

@@ -302,6 +302,7 @@ def remote_specs
# the gemspecs of those gems, if the non-api sites contain more than
# about 100 gems, we just treat all sites as non-api for speed.
allow_api = idx.size < API_REQUEST_LIMIT && dependency_names.size < API_REQUEST_LIMIT
Bundler.ui.debug "Need to query more then #{API_REQUEST_LIMIT} gems" unless allow_api
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a bit more information?

Need to query more than 200 gems. Downloading full index instead...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure.
My first version included such info, but I've removed it since the current output will be:

$ DEBUG=1 bundle
HTTP GET https://bundler.rubygems.org/api/v1/dependencies
HTTP 200 OK
Need to query more then 100 gems
Fetching source index from https://rubygems.org/

Do you think the following is better?:

$ DEBUG=1 bundle
HTTP GET https://bundler.rubygems.org/api/v1/dependencies
HTTP 200 OK
Need to query more then 100 gems. Downloading full index instead...
Fetching source index from https://rubygems.org/

Copy link
Member

Choose a reason for hiding this comment

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

I like the second one better. Cause and effect.

Also, could you change then to than? Thank you.

@neerfri neerfri force-pushed the add-debug-message-for-api-request-limit branch from 1aed63e to 10995e0 Compare March 3, 2015 06:34
@TimMoore
Copy link
Contributor

TimMoore commented Mar 3, 2015

👍

TimMoore added a commit that referenced this pull request Mar 3, 2015
…st-limit

add debug log for api request limit
@TimMoore TimMoore merged commit 1c6ed5a into rubygems:master Mar 3, 2015
@TimMoore
Copy link
Contributor

TimMoore commented Mar 3, 2015

Thanks!

@neerfri
Copy link
Contributor Author

neerfri commented Mar 3, 2015

My pleasure

@neerfri neerfri deleted the add-debug-message-for-api-request-limit branch March 3, 2015 08:03
@coilysiren coilysiren modified the milestone: Release Archive Oct 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants