Skip to content

Conversation

@ajtmccarty
Copy link
Contributor

IFC-1374

the new Timestamp using whenever strips trailing zeros from serialized instances. This can cause our database-level datetime comparison logic to break b/c we use string comparison on timestamp fields and a later timestamp with no trailing 0s can appear as earlier incorrectly

small cypher example
╒════════════════════════════════════════════════════════╕
│"2025-03-12T16:33:54.7Z" > "2025-03-12T16:33:54.710000Z"│
╞════════════════════════════════════════════════════════╡
│true │
└────────────────────────────────────────────────────────┘

@ajtmccarty ajtmccarty requested a review from a team March 12, 2025 17:13
@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@@                 Coverage Diff                  @@
##           infrahub-develop     #301      +/-   ##
====================================================
+ Coverage             70.56%   70.92%   +0.36%     
====================================================
  Files                    86       87       +1     
  Lines                  7867     7879      +12     
  Branches               1523     1527       +4     
====================================================
+ Hits                   5551     5588      +37     
+ Misses                 1920     1895      -25     
  Partials                396      396              
Flag Coverage Δ
integration-tests 22.70% <0.00%> (+0.93%) ⬆️
python-3.10 45.23% <100.00%> (+0.07%) ⬆️
python-3.11 45.20% <100.00%> (+0.04%) ⬆️
python-3.12 45.20% <100.00%> (+0.07%) ⬆️
python-3.13 45.23% <100.00%> (+0.09%) ⬆️
python-3.9 44.10% <100.00%> (+0.07%) ⬆️
python-filler-3.12 24.57% <0.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/timestamp.py 82.35% <100.00%> (+0.35%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ajtmccarty ajtmccarty merged commit 41f6b85 into infrahub-develop Mar 12, 2025
17 checks passed
@ajtmccarty ajtmccarty deleted the ajtm-03122025-timestamp-serialization branch March 12, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants