-
Notifications
You must be signed in to change notification settings - Fork 390
Description
Please make sure you have searched for information in the following guides.
- Search the issues already opened: https://github.com/GoogleCloudPlatform/google-cloud-node/issues
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js
- Check our Troubleshooting guide: https://github.com/googleapis/google-cloud-node/blob/main/docs/troubleshooting.md
- Check our FAQ: https://github.com/googleapis/google-cloud-node/blob/main/docs/faq.md
- Check our libraries HOW-TO: https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md
- Check out our authentication guide: https://github.com/googleapis/google-auth-library-nodejs
- Check out handwritten samples for many of our APIs: https://github.com/GoogleCloudPlatform/nodejs-docs-samples
A screenshot that you have tested with "Try this API".
time gsutil ls gs://gcp-public-data-arco-era5/ar/model-level-1h-0p25deg.zarr-v1/hybrid (example bucket) gives this:
real 0m1.896s
user 0m0.383s
sys 0m0.152s
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.
https://github.com/AndyClausen/storage-performance-issue-example
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
Scenario 1 - requests hang forever:
- run
gcloud auth revoketo make sure you're not logged into gcloud normally - run
gcloud auth application-default loginand log in - run
bun ito install deps - run
bun start
Scenario 2 - everything works:
- run
gcloud auth loginand log in - run
gcloud auth application-default loginand log in - run
bun ito install deps - run
bun start
Scenario 3 - requests hang for about 15 seconds:
- run
gcloud auth loginusing an account that is set up to require re-authentication after a period of time - wait for said amount of time
- run
gcloud auth application-default loginand log in - run
bun ito install deps - run
bun start
A clear and concise description of what the bug is, and what you expected to happen.
There's something going on with authentication. If I log in to gcloud with ADC only, requests hang seemingly forever. If I log in with regular auth and ADC, everything works fine and it uses ADC. If I log in with regular auth and wait for the token to expire, and log in with ADC freshly, it hangs for around 15 seconds.
It's a bit difficult to reproduce the last scenario, but the first two should be simple.
The reproduction repo uses getFiles as an example, and the example bucket is just some public bucket I found from a quick google search.
A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
I would expect the library to ignore regular auth and just use ADC, but it seems like it's checking regular auth credentials first for some reason, even though it ends up just using ADC. This is not an issue with gsutil, so I don't know why it is with this library.