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

Implement traffic drop notifications #4300

Merged
merged 15 commits into from
Jul 11, 2024
Merged

Implement traffic drop notifications #4300

merged 15 commits into from
Jul 11, 2024

Conversation

aerosol
Copy link
Member

@aerosol aerosol commented Jul 2, 2024

Changes

This PR implements traffic drop notifications, similar to already implemented spike notifications.

Postgres migration included that extends the spike_notifications table with a type field indicating whether the notification is tracking drops or spikes. Table name should be probably left intact - since we don't have a way to run a migration renaming it.

  • Extract migration to a separate PR

It's important we don't send out drop notifications if e.g. traffic is barred via payment issues, hence the worker looks owner's accept_traffic_until up.

BTW the PR makes it no longer possible to set a negative threshold.

Tests

  • Automated tests have been added
  • This PR does not require tests

Changelog

  • Entry has been added to changelog
  • This PR does not make a user-facing change

Documentation

  • Docs have been updated
  • This change does not need a documentation update

Dark mode

  • The UI has been tested both in dark and light mode
  • This PR does not change the UI

@aerosol aerosol force-pushed the drop-notifications branch from 4a843f6 to a08f3e2 Compare July 2, 2024 14:39
@aerosol aerosol changed the title wip Implement traffic drop notifications Jul 2, 2024
@aerosol aerosol requested a review from a team July 2, 2024 14:44
@aerosol aerosol added the preview label Jul 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

Preview environment👷🏼‍♀️🏗️
PR-4300

@aerosol aerosol force-pushed the drop-notifications branch from 0534a31 to 2353076 Compare July 11, 2024 09:08
@aerosol aerosol removed the preview label Jul 11, 2024
@aerosol aerosol marked this pull request as ready for review July 11, 2024 09:20
Copy link
Contributor

@ukutaht ukutaht left a comment

Choose a reason for hiding this comment

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

Changes look good to me.

Since we're in a sort of housekeeping mode I would propose some further clean-ups for things that were touched in this PR:

  • Make the settings/email-reports page a Liveview
  • Remove Double dependency from traffic_change_notifier_tests.exs file

@aerosol aerosol merged commit d56bb2b into master Jul 11, 2024
10 checks passed
@aerosol aerosol deleted the drop-notifications branch July 11, 2024 12:55
RobertJoonas pushed a commit that referenced this pull request Jul 12, 2024
* Expose current visitors 12h aggregate

* Remove unused site association

* Distinct drop/spike notification factories

* Rename modules accordingly + implement drop handling

* Rename periodic oban service

* Implement drop email

* Rest of the owl

* Update changelog

* Update moduledoc

* Update moduledoc

* Min threshold to 1

* Threshold 1

* Remove merge artifact

* Put panel behind a feature flag

* Format
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