Skip to content

feature/DEVSU-2656 email notification#447

Merged
sshugsc merged 10 commits into
developfrom
feature/DEVSU-2656-email-notification
Jun 27, 2025
Merged

feature/DEVSU-2656 email notification#447
sshugsc merged 10 commits into
developfrom
feature/DEVSU-2656-email-notification

Conversation

@sshugsc

@sshugsc sshugsc commented May 21, 2025

Copy link
Copy Markdown
Contributor

DEVSU-2656:

  • Add notification endpoints to swagger
  • Use query params for notification GET
  • Only user self and admin can POST/DELETE notifications

@sshugsc sshugsc self-assigned this May 21, 2025
@sshugsc sshugsc requested review from bnguyen-bcgsc and elewis2 June 3, 2025 22:50
@codecov-commenter

codecov-commenter commented Jun 3, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.

Project coverage is 77.07%. Comparing base (5ea6d17) to head (baba63b).

Files with missing lines Patch % Lines
app/libs/email.js 0.00% 0 Missing and 3 partials ⚠️
app/routes/notification/notification.js 70.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #447      +/-   ##
===========================================
+ Coverage    77.04%   77.07%   +0.02%     
===========================================
  Files          183      183              
  Lines         6395     6399       +4     
  Branches       758      761       +3     
===========================================
+ Hits          4927     4932       +5     
+ Misses        1382     1379       -3     
- Partials        86       88       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

bnguyen-bcgsc
bnguyen-bcgsc previously approved these changes Jun 4, 2025
Comment thread app/queue.js Outdated
const job = await emailQueue.add('job', data, EMAIL_REMOVE_CONFIG);
try {
await db.models.notificationTrack.create({
await db.models.notificationTrack.findOrCreate({where: {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this means a new record won't be created each time a notification is required - a new one is needed each time there's a new task because this table lets us track whether the queue is working. We should replace this with eg Arena for monitoring bullmq tasks - and clear out the backlog in this table - but in the meantime using findOrCreate here instead of create means the record is not useful.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agree. it should use create instead of findOrCreate.

@bnguyen-bcgsc bnguyen-bcgsc requested a review from elewis2 June 16, 2025 21:54
bnguyen-bcgsc
bnguyen-bcgsc previously approved these changes Jun 16, 2025
elewis2
elewis2 previously approved these changes Jun 27, 2025
Comment thread app/routes/swagger/schemas.js Outdated
Comment thread app/routes/swagger/schemas.js Outdated
@sshugsc sshugsc dismissed stale reviews from elewis2 and bnguyen-bcgsc via 6d12ab8 June 27, 2025 21:37
@sshugsc sshugsc requested a review from elewis2 June 27, 2025 21:39
@sshugsc sshugsc merged commit 3ad793c into develop Jun 27, 2025
6 checks passed
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.

4 participants