Repository navigation
fix(ingestion): support ISO datetime strings in convert_timestamp for test bounds - #36144
Merged
Merged
Conversation
Contributor
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
5 of 19 tasks
|
Khairajani
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Describe your changes:
Updated
convert_timestampinmetadata/utils/time_utils.pyto accept ISO-8601 datetime strings (including space-separated timestamps and trailingZ/offsets) alongside the existing epoch seconds and milliseconds strings. Timezone-naive datetimes are treated as UTC, and a helpfulValueErroris raised with the offending value when parsing fails.Running the
columnValuesToBeBetweendata quality test on datetime/timestamp columns failed when bounds were configured as ISO strings (such as'2022-12-01T00:00:00'or'2022-08-09 08:08:34.433967').convert_timestampassumed the string was numeric, so it raisedValueError: could not convert string to float. The test suite then reported an execution error instead of evaluating the column values.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
columnValuesToBeBetweenon datetime/timestamp columns with ISO-string bounds is evaluated instead of erroring.Unit tests
ingestion/tests/unit/metadata/utils/test_time_utils.pyT-separated, space-separated with microseconds,Z, explicit timezone offsets, bare dates, whitespace trimming) and invalid inputs.Backend integration tests
openmetadata-integration-tests/for new/changed API endpoints.Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording:
Not applicable — backend-only work in an ingestion utility; no UI changes.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable).
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review: I reviewed the final diff against
REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.Decision check: if this PR decides something the next contributor could undo — a schema field, REST path or format another component or repo must agree with, a new default or limit, an ordering that must hold, or a rule stated only in this description — it adds a record under
docs/decisions/(see itsREADME.md). This description is gone fromgit logafter the squash-merge.Bug fix: I have added a test that covers the exact scenario we are fixing.
Fixes COLLATE-INGESTION-W7
@sentry <feedback>: Autofix iterates on these changes@sentry stop iterating: Autofix stops iterating on this runThis PR was automatically generated by Sentry. You can adjust this setting at any time.


Confidence Score: 5/5
The PR appears safe to merge.Summary
convert_timestampnow accepts ISO datetime strings alongside epoch seconds and milliseconds.No actionable issues were found. Tests were inspected, not executed.
Reviews (1) · Last reviewed commit: "fix(ingestion): support ISO datetime str..." · Reviewed by Greptile