Open baxen opened 2 years ago
I'm not sure exactly where the check would go, but if you put it in a PR, then we have something concrete to talk about..
Added a quick PR to show what I mean - this wouldn't move when the check happens but instead use a refresh to do the check. I don't see any way in the google Credentials
object to check if it is valid without actually just trying to connect.
Do you think you'll have a chance to work further on that PR and get it passing?
Updated the PR - sorry for the delay! I think this will fix the issue we are seeing, but I am not sure if it will have side effects (e.g. i see some additional complexity when the same refresh
is called below in maybe_refresh
, but don't have enough context to know if we need it here as well)
Our workflows using gcsfs==2022.7.1 are seeing a new error connecting from google cloud environments
I am pretty sure this was introduced in https://github.com/fsspec/gcsfs/commit/42aa3ddeae19a029d1699ac5ac0b7fd33aa7d6a8
Reading through the google auth library, the
valid
method is first checking ifself.token
is None.self.token
is always initialized to None, and as far as I can tell is only updated after calling.refresh
. So I believe this check will always fail, despite this running in an environment where these credentials would be valid.I could open a PR, this would probably be fixed by running a
.refresh
just before the check, if it is appropriate to run a blocking connection check at this time in the flow.