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(jobs): logs track_deletes results #3493

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

bodinsamuel
Copy link
Collaborator

Changes

  • logs track_deletes results per model
  • throw if we can't find a job

@bodinsamuel bodinsamuel self-assigned this Feb 10, 2025
...existingResult,
[model]: {
added: Number(added) + Number(incomingResult?.added),
updated: Number(updated) + Number(incomingResult?.updated)
updated: Number(updated) + Number(incomingResult?.updated),
deleted: deletedValue + incomingDeletedValue
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure why it was done conditionally, maybe it's wrong, let me know

Copy link
Member

Choose a reason for hiding this comment

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

Think this was from legacy as we didn't want to show deletes at all since that wasn't a thing in the initial implementation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

is it also what we send back in the webhook? Can customers have logic not expecting deleted attributes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We always send at least deleted: 0 in the webhook by default (see: webhooks/lib/sync.ts:101)
So I don't think it's an issue here

@bodinsamuel bodinsamuel requested a review from a team February 10, 2025 12:17
@bodinsamuel bodinsamuel requested a review from TBonnin February 10, 2025 13:33
...existingResult,
[model]: {
added: Number(added) + Number(incomingResult?.added),
updated: Number(updated) + Number(incomingResult?.updated)
updated: Number(updated) + Number(incomingResult?.updated),
deleted: deletedValue + incomingDeletedValue
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it also what we send back in the webhook? Can customers have logic not expecting deleted attributes?

@bodinsamuel bodinsamuel enabled auto-merge (squash) February 11, 2025 09:26
@bodinsamuel bodinsamuel merged commit 96fe249 into master Feb 11, 2025
16 checks passed
@bodinsamuel bodinsamuel deleted the sam/25_02_10/fix/log-track-delete branch February 11, 2025 09:31
# 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.

4 participants