Skip cloud credential method when NO_GCE_CHECK=true#803
Skip cloud credential method when NO_GCE_CHECK=true#8030x2b3bfa0 wants to merge 1 commit intofsspec:mainfrom
NO_GCE_CHECK=true#803Conversation
When auto-detecting credentials (method=None), skip the "cloud" method if the NO_GCE_CHECK environment variable is set to "true". This avoids unnecessary metadata server requests in environments where GCE is known to be unavailable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
NO_GCE_CHECK=true
|
While this clearly gives the option to skip the slow creds step, if a user knows to pass this environment variable, then they probably should know which of the credentials types they need, no? |
Indeed! However, there might be cases where the choice of enabling this environment variable isn't up to the user, but up to the platform running the user's code, or to some intermediary library. 🫣 |
|
Fair enough. @ankitaluthra1 , any thoughts on yet-another-envvar? Perhaps this can be a simple keyword argument (in init), so it can be set via the fsspec config system? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #803 +/- ##
==========================================
+ Coverage 75.98% 76.34% +0.36%
==========================================
Files 14 14
Lines 2665 2668 +3
==========================================
+ Hits 2025 2037 +12
+ Misses 640 631 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
For consistency with googleapis/google-auth-library-python#1610, see fsspec/filesystem_spec#1768 for context.