Closed mbruggs closed 2 years ago
Thanks for the PR! I hadn't noticed this myself since I'm usually using AWS credentials for testing.
Thanks @jreadey. Out of curiosity, I was wondering why curl is used here rather than, for example, the python requests
libray?
Don't remember exactly what the rational was - likely it was just some code I copied for the token renewal.
If you'd like to submit a PR to remove the curl usage, you are most welcome to. I'd suggest making the _renewToken call async and using aiohttp to make the request. This will avoid bringing in a requests dependency. But then a new complication is that we wouldn't want multiple get_object tasks all fetching the token at the same time. So you'd want to have something like this in renewToken():
async with asyncio.Lock:
aiohttp.get() # make request to fetch token
Thanks for the detailed reply. I'm not using the token functionality at the moment so don't have a good test setup but if I do start then I'll look into it 🙂
Thanks for all the work on HSDS!
Previously, curl's progress bar was printed to the logs which made the logs hard to read. Instead, use curl's '--no-progress-meter' flag to supress the output without hiding warnings or errors.
For example, I had lines like the one below.