Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(records): update records count when marking records as deleted #2935

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

TBonnin
Copy link
Collaborator

@TBonnin TBonnin commented Nov 1, 2024

Describe your changes

we forgot to update the records count when marking records as deleted when track_deletes = true

Copy link

linear bot commented Nov 1, 2024

@@ -263,7 +263,7 @@ export async function upsert({
connection_id: connectionId,
model,
environment_id: environmentId,
count: Math.max(0, delta)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated but max was only useful when the counts were not populated yet for historic data. removing it since it doesn't bring anything

updated_at: now,
sync_job_id: generation
})
.returning('id')) as unknown as string[];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this query hasn't changed. it is just wrapped in the transction

@TBonnin TBonnin force-pushed the tbonnin/nan-1929/fix-marked-as-deleted branch from 55136d3 to 84eb8fe Compare November 1, 2024 19:06
@TBonnin TBonnin enabled auto-merge (squash) November 1, 2024 19:07
@TBonnin TBonnin merged commit a0c922c into master Nov 1, 2024
21 checks passed
@TBonnin TBonnin deleted the tbonnin/nan-1929/fix-marked-as-deleted branch November 1, 2024 19:45
TBonnin added a commit that referenced this pull request Nov 12, 2024
Column is called `Records` cc @bastienbeurier
Count is shorten when greater than 1000. Ex: 1.6K, 3M.
Non-shorten count is always shown in the hover tooltip

![Screenshot 2024-11-01 at 14 13
41](https://github.com/user-attachments/assets/f699e5ac-3480-48c0-ade8-8dd8f37c3f04)

Depends on this [bugfix](#2935) to
be merged first and inaccurate rows in the db to be fixed

## Issue ticket number and link

https://linear.app/nango/issue/NAN-1929/[trial]-show-object-count-in-sync-tab

## Checklist before requesting a review (skip if just adding/editing
APIs & templates)
- [ ] I added tests, otherwise the reason is: 
- [ ] I added observability, otherwise the reason is:
- [ ] I added analytics, otherwise the reason is:
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants