Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(backup): Add DateAddedComparator #54009

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Conversation

azaslavsky
Copy link
Contributor

This comparator accounts for the fact that old JSON exports may have zero millisecond timestamps formatted without the .000, as Python is wont to do in its natural datetime serializer. We have since replaced this default behavior with more consistent behavior that always includes the milliseconds, but to work with old exports, we still need to use this comparator.

Closes getsentry/team-ospo#155

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 2, 2023
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #54009 (a781ed9) into master (021fc81) will increase coverage by 0.01%.
Report is 4 commits behind head on master.
The diff coverage is 93.65%.

❗ Current head a781ed9 differs from pull request most recent head c9dbf65. Consider uploading reports for the commit c9dbf65 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #54009      +/-   ##
==========================================
+ Coverage   79.60%   79.62%   +0.01%     
==========================================
  Files        4983     4985       +2     
  Lines      210545   210743     +198     
  Branches    35853    35890      +37     
==========================================
+ Hits       167599   167795     +196     
+ Misses      37800    37798       -2     
- Partials     5146     5150       +4     
Files Changed Coverage Δ
src/sentry/backup/comparators.py 92.72% <93.65%> (+0.13%) ⬆️

... and 22 files with indirect coverage changes

@azaslavsky azaslavsky marked this pull request as ready for review August 2, 2023 22:40
@azaslavsky azaslavsky requested a review from a team as a code owner August 2, 2023 22:40
Base automatically changed from azaslavsky/backup/move_helpers to master August 2, 2023 23:19
This comparator accounts for the fact that old JSON exports may have
zero millisecond timestamps formatted without the `.000`, as Python is
wont to do in its natural datetime serializer. We have since replaced
this default behavior with more consistent behavior that always includes
the milliseconds, but to work with old exports, we still need to use
this comparator.

Closes getsentry/team-ospo#155
@azaslavsky azaslavsky merged commit 4c700a2 into master Aug 3, 2023
54 of 55 checks passed
@azaslavsky azaslavsky deleted the azaslavsky/backups/date_added branch August 3, 2023 16:52
@github-actions github-actions bot locked and limited conversation to collaborators Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable JSON comparation of Sentry models
2 participants