Skip to content

Conversation

@jimleroyer
Copy link
Member

Do not merge yet

We need to perform some data transformations prior to merge this so that numbers are reported the same before and after the change.

Summary | Résumé

Removing specific filters for heartbeat notifications. This won't be needed as we moved the heartbeat notifications into a dedicated service and after we rework the existing heartbeat in the database so they are associated with the new service.

Related task:
https://app.zenhub.com/workspaces/notify-planning-core-6411dfb7c95fb80014e0cab0/issues/gh/cds-snc/notification-planning-core/560

Test instructions | Instructions pour tester la modification

Test the dashboards that were affected with the filters, make sure these before and after the changes report the same numbers for previous periods of time.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the specific heartbeat notification filters from the statistics gathering and dashboard rendering functions, as heartbeat notifications are now handled by a dedicated service. Key changes include:

  • Removing the filter_heartbeats parameter from get_latest_stats in app/utils.py.
  • Updating get_stats_by_month in app/notify_client/service_api_client.py to omit heartbeat filtering.
  • Adjusting view calls in app/main/views/index.py to stop passing the filter_heartbeats parameter.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
app/utils.py Removed heartbeat filtering in the get_latest_stats function.
app/notify_client/service_api_client.py Updated the API call by removing the filter_heartbeats parameter.
app/main/views/index.py Removed heartbeat filtering when rendering activity and articles.
Comments suppressed due to low confidence (1)

app/main/views/index.py:291

  • Ensure tests for the activity view are updated to confirm consistent statistics reporting after the removal of heartbeat filtering.
return render_template("views/activity.html", **get_latest_stats(get_current_locale(current_app)))

@github-actions
Copy link

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