Skip to content

chore(alerts): plumb alertPublisher into resources BED-9195 - #3122

Merged
mistahj67 merged 1 commit into
mainfrom
BED-9195
Aug 12, 2026
Merged

chore(alerts): plumb alertPublisher into resources BED-9195#3122
mistahj67 merged 1 commit into
mainfrom
BED-9195

Conversation

@mistahj67

@mistahj67 mistahj67 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

  • Plumbs the alerts publisher to the resources to be leveraged for alerts

Describe your changes in detail

Motivation and Context

Resolves BED-9195

Why is this change required? What problem does it solve?

How Has This Been Tested?

Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.

Screenshots (optional):

Types of changes

  • Chore (a change that does not modify the application functionality)

Checklist:

Summary by CodeRabbit

  • New Features
    • Added alert event publishing across API and management workflows.
    • Alert notifications are now supported during relevant authentication and account-management operations.
    • Improved consistency of alert delivery as services and API routes initialize.
    • Centralized alert handling provides more reliable notifications across supported application workflows.

@mistahj67 mistahj67 self-assigned this Aug 7, 2026
@mistahj67 mistahj67 added the api A pull request containing changes affecting the API code. label Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The API now creates an alert event publisher during service initialization and passes it through route registration, V2 resources, and management resources. API test setup supplies the dependency to management resource construction.

Changes

Alert publisher wiring

Layer / File(s) Summary
Resource dependency contracts
cmd/api/src/api/v2/model.go, cmd/api/src/api/v2/auth/auth.go
Resources and ManagementResource now expose and store an alerts.Publisher. Their constructors accept the dependency.
Service and route propagation
cmd/api/src/services/entrypoint.go, cmd/api/src/api/registration/registration.go, cmd/api/src/api/registration/v2.go
Service startup creates an alert event publisher and passes it through route registration into V2 resources and management resources.
Test resource construction
cmd/api/src/api/v2/apitest/test.go, cmd/api/src/api/v2/auth/*_test.go
API test setup creates an alert event publisher. Authentication, OIDC, SAML, and SSO fixtures provide the expanded constructor arguments.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: go, infrastructure

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: wiring the alerts publisher into resources.
Description check ✅ Passed The description identifies the change, ticket, change type, and checklist, but provides limited motivation and no specific testing details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch BED-9195

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added go Pull requests that update go code infrastructure A pull request containing changes affecting the infrastructure code. labels Aug 7, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/api/src/api/v2/auth/auth.go`:
- Line 38: Remove the unused database/types import from auth.go, while retaining
the database/types/null import used by the file.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: bb9ae1f6-f07d-42cd-b5dd-c0893da74852

📥 Commits

Reviewing files that changed from the base of the PR and between ecccc9f and a40546f.

📒 Files selected for processing (6)
  • cmd/api/src/api/registration/registration.go
  • cmd/api/src/api/registration/v2.go
  • cmd/api/src/api/v2/apitest/test.go
  • cmd/api/src/api/v2/auth/auth.go
  • cmd/api/src/api/v2/model.go
  • cmd/api/src/services/entrypoint.go

Comment thread cmd/api/src/api/v2/auth/auth.go Outdated
@mistahj67
mistahj67 force-pushed the BED-9195 branch 2 times, most recently from 12f7754 to cd6947a Compare August 8, 2026 00:16
@mistahj67 mistahj67 changed the title chore: plumb alertPublisher into resources BED-9195 chore(alerts): plumb alertPublisher into resources BED-9195 Aug 8, 2026
@mistahj67
mistahj67 force-pushed the BED-9195 branch 3 times, most recently from e38f56a to 78c166c Compare August 10, 2026 20:33

@sirisjo sirisjo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested locally, LGTM!

@mistahj67
mistahj67 merged commit 0e02edf into main Aug 12, 2026
13 of 14 checks passed
@mistahj67
mistahj67 deleted the BED-9195 branch August 12, 2026 17:32
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api A pull request containing changes affecting the API code. go Pull requests that update go code infrastructure A pull request containing changes affecting the infrastructure code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants