Avoid memoizing network-related false negatives of GCECredentials.on_gce? (#137)
This commit is contained in:
parent
9232aa3176
commit
edaa784d3d
|
@ -58,7 +58,11 @@ ERROR_MESSAGE
|
||||||
DefaultCredentials.from_well_known_path(scope) ||
|
DefaultCredentials.from_well_known_path(scope) ||
|
||||||
DefaultCredentials.from_system_default_path(scope)
|
DefaultCredentials.from_system_default_path(scope)
|
||||||
return creds unless creds.nil?
|
return creds unless creds.nil?
|
||||||
raise NOT_FOUND_ERROR unless GCECredentials.on_gce?(options)
|
unless GCECredentials.on_gce?(options)
|
||||||
|
# Clear cache of the result of GCECredentials.on_gce?
|
||||||
|
GCECredentials.unmemoize_all
|
||||||
|
raise NOT_FOUND_ERROR
|
||||||
|
end
|
||||||
GCECredentials.new
|
GCECredentials.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue