Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple issues with MetadataCredentials #32

Open
lopatin opened this issue Aug 14, 2024 · 1 comment
Open

A couple issues with MetadataCredentials #32

lopatin opened this issue Aug 14, 2024 · 1 comment

Comments

@lopatin
Copy link

lopatin commented Aug 14, 2024

Hello, first of all thanks for the great library.

I ran into two issues with MetadataCredentials when running on AWS Glue 4.0 with Python 3.10:

  1. Incorrect pattern for strptime.
Failed to update credentials
Traceback (most recent call last):
  File "/home/spark/.local/lib/python3.10/site-packages/aiohttp_s3_client/credentials.py", line 261, in _refresher
    credentials, expires_at = await self._fetch_credentials()
  File "/home/spark/.local/lib/python3.10/site-packages/aiohttp_s3_client/credentials.py", line 309, in _fetch_credentials
    datetime.datetime.strptime(
  File "/usr/local/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/local/lib/python3.10/_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '2024-08-14T09:39:55.439Z' does not match format '%Y-%m-%dT%H:%M:%SZ'
  1. Infinitely waits when calling await credentials.stop(). It seems to wait on the _refresher task to finish, which is a while True loop with no breaks.

I monkey patched both issues on my end to get unblocked, but just wanted to point this out. I'm happy to contribute a fix to the project if the maintainers agree it's something in need.

Thanks,
Alex

@mosquito
Copy link
Collaborator

Feel free to contribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants