Skip to content

Conversation

@jcscottiii
Copy link
Collaborator

Updates the Subscriber and DeliveryJob types (and their corresponding Spanner adapters and tests) to include ChannelID. This identifier is needed for the Email Worker to report delivery status (success/failure) back to the NotificationChannelState table.

Changes:

  • Worker Types: Added ChannelID to EmailSubscriber and EmailDeliveryJob.
  • Event Types: Added ChannelID to EmailJobEvent.
  • Spanner Adapter: Updated FindSubscribers to populate ChannelID from the query results.
  • Pub/Sub Adapter: Updated PublishEmailJob to pass the ID through.
  • Email Worker: Initial scaffolding for sender package (interfaces/mocks) that will utilize this ID.

@jcscottiii jcscottiii requested a review from jrobbins December 29, 2025 16:15
Updates the `Subscriber` and `DeliveryJob` types (and their corresponding
Spanner adapters and tests) to include `ChannelID`. This identifier is
needed for the Email Worker to report delivery status (success/failure)
back to the `NotificationChannelState` table.

Changes:
- **Worker Types**: Added `ChannelID` to `EmailSubscriber` and `EmailDeliveryJob`.
- **Event Types**: Added `ChannelID` to `EmailJobEvent`.
- **Spanner Adapter**: Updated `FindSubscribers` to populate `ChannelID` from
  the query results.
- **Pub/Sub Adapter**: Updated `PublishEmailJob` to pass the ID through.
- **Email Worker**: Initial scaffolding for `sender` package (interfaces/mocks)
  that will utilize this ID.
@jcscottiii jcscottiii force-pushed the jcscottiii/email-worker-pt1 branch from 4a02bc8 to d4f7e59 Compare December 29, 2025 16:43
slog.ErrorContext(ctx, "failed to record channel failure", "channel_id", job.ChannelID, "error", dbErr)
}

// Return error to NACK the message and retry sending?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FYI: Better error handling happens in this PR: #2144

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