Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

fix: ignore Braze frequency capping for ent emails #157

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

iloveagent57
Copy link
Contributor

@iloveagent57 iloveagent57 commented Jan 6, 2022

Anyone merging to this repository is expected to release and monitor their changes; if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released.

Merge checklist:

  • Any new requirements are in the right place (do not manually modify the requirements/*.txt files)
    • base.in if needed in production
    • test.in for test requirements
    • make upgrade && make requirements have been run to regenerate requirements
  • Version bumped

Post merge:

  • Tag pushed and a new version released
    • Note: Assets will be added automatically. You just need to provide a tag (should match your version number) and title and description.
  • After versioned build finishes in GitHub CI, verify version has been pushed to PyPI
    • Each step in the release build has a condition flag that checks if the rest of the steps are done and if so will deploy to PyPi.
      (so basically once your build finishes, after maybe a minute you should see the new version in PyPi automatically (on refresh))
  • PR created in ecommerce to upgrade dependencies (including ecommerce-worker)
    • This must be done after the version is visible in PyPi as make upgrade in ecommerce will look for the latest version in PyPi.
    • Note: the ecommerce-worker constraint in ecommerce must also be bumped to the latest version in PyPi.
  • Deploy ecommerce
  • Deploy ecomworker on GoCD.
    • While some functions in ecommerce-worker are run via ecommerce, others are handled by a standalone AMI and must be
      released via GoCD.

@@ -300,6 +300,11 @@ def send_message( # pylint: disable=dangerous-default-value
):
"""
Sends the message via Braze Rest API /messages/send
The "override_frequency_capping" key in the request payload is important;
it tells Braze to ignore the global campaign message frequency cap
for the message we're sending in this method. Since this is a transactional

Choose a reason for hiding this comment

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

nit: an extra space here

'recipient_subscription_state': 'all',
'messages': {
'email': email
}
}
if campaign_id:

Choose a reason for hiding this comment

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

might not matter in the context of ecommerce-worker since all messages are probably transactional, but should override_frequency_capping be passed in rather than rely on the existence of campaign_id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, IDK. To me, send_message() is only for transactional emails, and those should never be subject to the frequency cap. I could state the assumption clearly in the docstring, maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually, I guess the docstring already states this pretty clearly.

@iloveagent57 iloveagent57 merged commit 8facf88 into master Jan 6, 2022
@iloveagent57 iloveagent57 deleted the aed/override-freq-cap branch January 6, 2022 20:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants