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

datetime format #1197

Open
swelborn opened this issue Dec 10, 2024 · 2 comments
Open

datetime format #1197

swelborn opened this issue Dec 10, 2024 · 2 comments

Comments

@swelborn
Copy link
Collaborator

Error that caused recent job_worker crash:

2024-12-10T22:15:32.918684056Z Traceback (most recent call last):
2024-12-10T22:15:32.918686965Z   File "/usr/local/lib/python3.9/site-packages/mode/services.py", line 843, in _execute_task
2024-12-10T22:15:32.918689936Z     await task
2024-12-10T22:15:32.918693036Z   File "/usr/local/lib/python3.9/site-packages/faust/app/base.py", line 966, in _wrapped
2024-12-10T22:15:32.918696586Z     return await task()
2024-12-10T22:15:32.918699016Z   File "/usr/local/lib/python3.9/site-packages/faust/app/base.py", line 1019, in around_timer
2024-12-10T22:15:32.918701426Z     await fun(*args)
2024-12-10T22:15:32.918703676Z   File "/app/job_worker.py", line 539, in monitor_jobs
2024-12-10T22:15:32.918706006Z     jobs += extract_jobs(response_json)
2024-12-10T22:15:32.918708196Z   File "/app/job_worker.py", line 454, in extract_jobs
2024-12-10T22:15:32.918710436Z     _submit = datetime.strptime(submit, settings.SFAPI_SUBMIT_TIME_FORMAT)
2024-12-10T22:15:32.918712696Z   File "/usr/local/lib/python3.9/_strptime.py", line 568, in _strptime_datetime
2024-12-10T22:15:32.918714986Z     tt, fraction, gmtoff_fraction = _strptime(data_string, format)
2024-12-10T22:15:32.918717216Z   File "/usr/local/lib/python3.9/_strptime.py", line 352, in _strptime
2024-12-10T22:15:32.918719456Z     raise ValueError("unconverted data remains: %s" %
2024-12-10T22:15:32.918721726Z ValueError: unconverted data remains: .000-08:00
@swelborn
Copy link
Collaborator Author

This likely originated from a change in SFAPI backend that changed the timestamps from the following format:

"%Y-%m-%dT%H:%M:%S"

to this:

"%Y-%m-%dT%H:%M:%S.%f%z"

(adding ms and tz info). For now, we added this to configmap to change default setting.

@swelborn
Copy link
Collaborator Author

We eventually reverted back to "cached" = False

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

1 participant