Repository navigation
feat(traits): add updated_at to Trait - #8665
gagantrivedi wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to Traits gain a nullable last-updated timestamp. The timestamp is set when traits are created or changed and kept when they are unchanged. No concrete regression or data-integrity risk was found, so the change appears ready to merge.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8665 +/- ##
========================================
Coverage 98.84% 98.85%
========================================
Files 1653 1666 +13
Lines 68219 68787 +568
========================================
+ Hits 67429 67997 +568
Misses 790 790 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Docker builds report
|
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #21515 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-16 — run #21515 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #21515 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #21515 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Visual Regression20 screenshots compared. See report for details. |
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to Flagsmith/edge-proxy-rs#14
Adds a nullable
updated_atcolumn toenvironments_trait. The Edge Proxy will write traits straight to Core's database and resolve concurrent writes (retries, multiple regions) with last-write-wins on this timestamp. Core's own trait writes need to stamp it as well, so the proxy compares against real values.Trait.updated_at:DateTimeField(auto_now=True, null=True).Identity.update_traits(): setsupdated_atexplicitly on changed traits, sincebulk_update()skipsauto_now; added toBULK_UPDATE_FIELDS.traits.0003_trait_updated_at: adds the column as a plain nullableDateTimeField, then alters it toauto_now=True. Existing rows stay NULL (no backfill)How did you test this code?
update_traitsstampsupdated_aton changed and new traits and leaves unchanged traits alone.