Refactor datetime handling in FileTranscriptStore to eliminate strings#166
Merged
cleemullins merged 2 commits intomainfrom Oct 14, 2025
Merged
Conversation
… tests for consistency
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors datetime handling in the FileTranscriptStore to eliminate unnecessary string conversions that were causing Pydantic serialization warnings. The fix ensures datetime objects are used consistently instead of converting them to ISO string format unnecessarily.
- Removed the
_utc_iso_now()helper function that returned ISO string format - Updated
log_activity()to set timestamps as datetime objects directly - Fixed test code to use datetime objects instead of ISO strings
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/storage/transcript_file_store.py | Removed string conversion helper and updated timestamp assignment to use datetime objects |
| tests/hosting_core/storage/test_file_transcript_storage.py | Updated test variables to use datetime objects instead of ISO strings |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
rodrigobr-msft
approved these changes
Oct 14, 2025
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.
Fixes #165
The File Logger was incorrectly converting datetimes to strings as part of dealing with activty processing. Removed the not-needed conversion (string to datetime) to cleanup the underlying code and tests.
The logged warnings looked like:
This fix is part of my ongoing effort to cleanup all the broken windows in our build and test system.