refactor(appengine): use datetimes for data insertion#1129
Merged
Annopaolo merged 2 commits intoastarte-platform:release-1.2from Mar 17, 2025
Merged
refactor(appengine): use datetimes for data insertion#1129Annopaolo merged 2 commits intoastarte-platform:release-1.2from
Annopaolo merged 2 commits intoastarte-platform:release-1.2from
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-1.2 #1129 +/- ##
===============================================
- Coverage 68.76% 68.64% -0.12%
===============================================
Files 327 329 +2
Lines 7504 7511 +7
===============================================
- Hits 5160 5156 -4
- Misses 2344 2355 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4698640 to
6e9f0b2
Compare
DateTimes internally6e9f0b2 to
a90be74
Compare
a90be74 to
18790f9
Compare
18790f9 to
60b662b
Compare
default Ecto types only allow full second or microsecond precision, but cql timestamps use millisecond precision. To avoid precision errors, a new Ecto DateTime type has been created, which allows millisecond precision (althogh no check is made: Xandra handles that itself). this change reverts some changes made to the tests in b27c5a4, restoring the millisecond precision of the device status Signed-off-by: Francesco Noacco <francesco.noacco@secomind.com>
60b662b to
cf14aae
Compare
using integer timestamps, especially when doing calculations on them, is error prone and we've just recently resolved a bug that was caused by a double "microsecond to millisecond" conversion. elixir has something more solid than that: `DateTime`s. although currently unused, the submillis should now use the correct number of digits. an unused and nonfunctioning function in `IndividualProperty` has been removed Signed-off-by: Francesco Noacco <francesco.noacco@secomind.com>
cf14aae to
cc6f174
Compare
Collaborator
Author
Annopaolo
approved these changes
Mar 17, 2025
5 tasks
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.
using integer timestamps, especially when doing calculations on them,
is error prone and we've just recently resolved a bug that was caused
by a double "microsecond to millisecond" conversion.
elixir has something more solid than that:
DateTimes.default Ecto types only allow full second or microsecond precision,
but cql timestamps use millisecond precision. To avoid precision errors,
a new Ecto DateTime type has been created, which allows millisecond
precision (althogh no check is made: Xandra handles that itself).
although currently unused, the submillis should now use the correct
number of digits.
an unused and nonfunctioning function in
IndividualPropertyhas beenremoved
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes submillis precision probably?
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g. usage docs, diagrams, etc.: