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

fix: ensure created_after_date is formatted string before date comparison #93

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

jmeridth
Copy link
Member

@jmeridth jmeridth commented Apr 11, 2024

Fixes #92

Pull Request

Proposed Changes

Stop validating created_after_date as just a 10 character string and
regex validate it as YYYY-DD-MM (where each is a digit in the string)

  • change tests to specifically cover case with CREATED_AFTER_DATE env var string is 2020-01-01

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, or breaking

@jmeridth jmeridth added the enhancement New feature or request label Apr 11, 2024
@jmeridth jmeridth self-assigned this Apr 11, 2024
@jmeridth jmeridth requested a review from zkoppert as a code owner April 11, 2024 01:59
@jmeridth jmeridth marked this pull request as draft April 11, 2024 02:07
…ison

Fixes #92

Stop validating created_after_date as just a 10 character string and
regex validate it as YYYY-DD-MM (where each is a digit in the string)

- [x] add tests to specifically cover case with string is 2020-01-01

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth changed the title fix: ensure created_after_date is string before date comparison fix: ensure created_after_date is formatted string before date comparison Apr 11, 2024
@jmeridth jmeridth marked this pull request as ready for review April 11, 2024 03:05
@jmeridth jmeridth added bug Something isn't working and removed enhancement New feature or request labels Apr 11, 2024
env.py Outdated Show resolved Hide resolved
add created_after_date content to error message

Signed-off-by: jmeridth <jmeridth@gmail.com>
Co-authored-by: Zack Koppert <zkoppert@github.com>
@jmeridth jmeridth merged commit 420f960 into main Apr 11, 2024
19 checks passed
@jmeridth jmeridth deleted the jm-date-issue-fix branch April 11, 2024 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: fromisoformat: argument must be str
2 participants