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

Fix post_bulk annual limit validation #2384

Merged
merged 4 commits into from
Dec 9, 2024
Merged

Conversation

whabanks
Copy link
Contributor

@whabanks whabanks commented Dec 9, 2024

Summary | Résumé

This PR fixes incorrect annual limit validation when posting bulk emails via the API. We were counting SMS + Email notifications when validating if a job would put the service over their Email annual limit.

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

  1. Set email and sms annual limits to 10
  2. Send 5 SMS messages
  3. Send 5 Email messages
  4. Via the API create a bulk email send of 4
  5. Verify it succeeds and does not result in error messages containing negative annual limit counts.

Release Instructions | Instructions pour le déploiement

None.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

- Add more specific logging messages when validating a job
@whabanks whabanks merged commit 1fd9036 into main Dec 9, 2024
5 checks passed
@whabanks whabanks deleted the fix/annual-limit-validators branch December 9, 2024 20:06
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