Repository navigation
Fix doubled UTC offset in aws_session_expiration - #120
Merged
victorskl merged 1 commit intoSep 11, 2026
Merged
Conversation
Since ce9b8b9 (v1.2.1), update_aws_cli_v1_credentials appends '+0000' to an aware datetime isoformat() which already ends in '+00:00', producing values like 2020-06-14T17:13:26+00:00+0000 that parse_credentials_file_session_expiry cannot parse back. A later run that eager-syncs a source_profile then crashes with ValueError. Write the expected '+0000' format directly via strftime, and normalise legacy values when parsing (doubled offset and fractional seconds) so credentials files written by v1.2.1 through v1.4.0 keep working after upgrade. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #120 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 620 622 +2
=========================================
+ Hits 620 622 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
victorskl
approved these changes
Sep 11, 2026
victorskl
left a comment
Owner
There was a problem hiding this comment.
Thank you for bug fix.
I will follow up with release soon.
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 #119. Writes the expected
+0000format directly viastrftime, and normalizes legacy values when parsing (doubled offset written by v1.2.1 through v1.4.0, and fractional seconds) so existing credentials files keep working after upgrade.strftimealso truncates sub-second precision on write, which only ever makes the stored expiry earlier, and keeps the historical+0000on-disk format that all existing fixtures use.Tests: regression tests for the legacy doubled-offset and fractional values with exact-instant assertions, a deterministic write-then-parse round trip (the write/parse pair was previously only tested against hand-seeded values), and an integration test reproducing the crash through
update_profile->eager_sync_source_profile. Full suite passes, coverage stays 100%.🤖 Generated with Claude Code