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

🧯 Update contact modified_on after populate dynamic group task #464

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

rowanseymour
Copy link
Contributor

No description provided.

@rowanseymour rowanseymour requested a review from nicpottier July 23, 2021 16:03
@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #464 (9d81dcb) into main (7e0dded) will increase coverage by 0.05%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #464      +/-   ##
==========================================
+ Coverage   56.59%   56.65%   +0.05%     
==========================================
  Files         123      123              
  Lines        8594     8600       +6     
==========================================
+ Hits         4864     4872       +8     
+ Misses       2953     2951       -2     
  Partials      777      777              
Impacted Files Coverage Δ
core/models/groups.go 58.75% <66.66%> (+2.90%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e0dded...9d81dcb. Read the comment docs.

changed = append(changed, adds...)
changed = append(changed, removals...)

err = UpdateContactModifiedOn(ctx, db, changed)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this all belongs on AddContactsToGroups and DeleteContactsFromGroups instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so as those methods don't even hit the contacts_contact table and the other places we use them are when we're processing events/handlers/hooks and we've optimized updating modified_on for each contact.

Copy link
Member

Choose a reason for hiding this comment

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

Ok. Ya, just feels likely we are going to make this bug again elsewhere when we change contact group membership elsewhere by calling this method, but I suppose we can just try to be extra careful.

@rowanseymour rowanseymour merged commit 59585f8 into main Jul 26, 2021
@rowanseymour rowanseymour deleted the pop_dyn_group_fix branch July 26, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants