Skip to content

Fix contact-rollups record deletion#40925

Merged
hacodeorg merged 1 commit into
stagingfrom
ha/fix-contact-rollups-deletion
Jun 4, 2021
Merged

Fix contact-rollups record deletion#40925
hacodeorg merged 1 commit into
stagingfrom
ha/fix-contact-rollups-deletion

Conversation

@hacodeorg

@hacodeorg hacodeorg commented Jun 3, 2021

Copy link
Copy Markdown
Contributor

FND-1584. This is a follow-up of #40683.

The process to delete contact-rollups records and Pardot prospects has been failing silently since 1/2021. There are 6K+ records marked for deletion in ContactRollupsPardotMemory that are not deleted.

ContactRollupsPardotMemory.where.not(marked_for_deletion_at: nil).count  #6340

This means we still keep data from users who requested us to delete their info in both our system (ContactRollups) and an external system (Pardot). There are 2 reasons:

  1. Invalid email address caused the deletion process to fail, as reported in Honeybadger #79757239.
  2. The error was silent because we save exception in a LogCollector instance but did not report it to Honeybadger. (The Honeybadger above is created recently as a result of this fix.)

Testing story

Manually test the fix in Rails console using the invalid email from the Honeybadger above.

require 'cdo/contact_rollups/v2/pardot'
PardotV2.retrieve_pardot_ids_by_email(invalid_email)
PardotV2.delete_prospects_by_email(invalid_email)

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

Report contact_rollups exceptions to Honeybadger.
@hacodeorg hacodeorg requested a review from bencodeorg June 3, 2021 00:54
@hacodeorg hacodeorg marked this pull request as ready for review June 3, 2021 00:54
@hacodeorg hacodeorg requested a review from a team June 3, 2021 00:54

@clareconstantine clareconstantine left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for looking into this, Ha!

@hacodeorg hacodeorg merged commit bc0774c into staging Jun 4, 2021
@hacodeorg hacodeorg deleted the ha/fix-contact-rollups-deletion branch June 4, 2021 00:56
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