Skip to content

feat (JobDB): pydantic datetime validation #477

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ryuwd
Copy link
Contributor

@ryuwd ryuwd commented Apr 13, 2025

Validate provided datetimes to check they are aware and convert them to UTC if needed.

@ryuwd ryuwd changed the title Bring epoch calculation and date validation in line with DIRAC fix (JobLoggingDB): corrected epoch calculation and stricter validation of datetimes Apr 13, 2025
@ryuwd ryuwd marked this pull request as ready for review April 14, 2025 08:42
@ryuwd
Copy link
Contributor Author

ryuwd commented Apr 14, 2025

I believe most of this is superseded by #479 but it would be worth keeping the pydantic validators, maybe even expanding the pydantic validation to ensure this doesn't get messed up easily again

@fstagni
Copy link
Contributor

fstagni commented May 12, 2025

@ryuwd is this PR still needed?

@ryuwd
Copy link
Contributor Author

ryuwd commented May 13, 2025

This can probably be kept but it needs to be adapted after various fixes were made. I will get around to it soon

@ryuwd ryuwd force-pushed the roneil-fix-joblogging-offset branch from c02fb80 to 92d7943 Compare July 3, 2025 10:25
@ryuwd ryuwd changed the title fix (JobLoggingDB): corrected epoch calculation and stricter validation of datetimes fix (JobDB): validation of datetimes Jul 3, 2025
@ryuwd ryuwd changed the title fix (JobDB): validation of datetimes fix (JobDB): pydantic datetime validation Jul 3, 2025
@ryuwd ryuwd force-pushed the roneil-fix-joblogging-offset branch from 92d7943 to 74e9829 Compare July 3, 2025 10:31
@ryuwd ryuwd changed the title fix (JobDB): pydantic datetime validation feat (JobDB): pydantic datetime validation Jul 3, 2025
@ryuwd ryuwd force-pushed the roneil-fix-joblogging-offset branch from 5451048 to 7c449e4 Compare July 3, 2025 10:36
simplify validator

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
@ryuwd ryuwd force-pushed the roneil-fix-joblogging-offset branch from 7c449e4 to acc2e3c Compare July 3, 2025 10:41
@ryuwd ryuwd marked this pull request as ready for review July 3, 2025 10:45
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

Successfully merging this pull request may close these issues.

3 participants