Repository navigation
Fix timezone issue for ingestion - #647
Open
FlorianBracq wants to merge 2 commits into
Open
FlorianBracq wants to merge 2 commits into
FlorianBracq wants to merge 2 commits into
Conversation
Aasav Badera (aasavbadera)
force-pushed
the
issue/fix-timezone-aware-datetimes
branch
from
November 17, 2026 06:35
0cba41e to
b9cc656
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Comparing the naive cached timestamp with a timezone-aware timestamp raises a TypeError on the second resource lookup, breaking even the first file or stream ingestion.
1 open issue
What changed in this PR
This PR updates the ingestion SDK’s timestamp handling to use timezone-aware UTC and address Python 3.12+ datetime.utcnow() deprecation warnings.
Changes:
- Uses timezone-aware UTC for blob ingestion message creation timestamps.
- Updates resource refresh comparisons and authorization-cache timestamps to use timezone-aware UTC.
| File | Description |
|---|---|
| azure-kusto-ingest/azure/kusto/ingest/ingestion_blob_info.py | Adds UTC timezone information to ingestion message creation timestamps. |
| azure-kusto-ingest/azure/kusto/ingest/_resource_manager.py | Updates refresh comparisons and authorization-cache timestamp handling. |
Review effort: Max
Aasav Badera (aasavbadera)
force-pushed
the
issue/fix-timezone-aware-datetimes
branch
from
November 20, 2026 08:17
b9cc656 to
3fd5c48
Compare
Keep resource cache writes and comparisons in aware UTC. Cover successive resource lookups and cache-expiry boundaries, verify UTC ingestion message serialization, and format the PR changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6f4a536a-7f7a-4d39-b60e-96db0cb49c1c
This branch has not been deployed
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.

When using pyhon >= 3.12, DeprecationWarning are visible with messages such as:
Fixed
Replace datetime.utcnow() with datetime.now(tz=dt.timezone.utc)