feat(notifications): migrate to maintained shoutrrr fork - #258
Conversation
Replace unmaintained containrrr/shoutrrr v0.8.0 (last release August 2023) with nicholas-fedor/shoutrrr v0.16.3. Closes #126. - Validate URLs with a direct call to service Initialize. The router in the fork hides the real error and echoes credentials from the raw URL. The direct call keeps the error and omits the URL. This also removes the v0.8.0 panics on malformed opsgenie and teams URLs. - Use CreateSenderWithOptions with a shared HTTP client. The fork deprecates CreateSender. - Keep the ntfy shim for its lenient query-key parsing. Remove the stale Content-Type and credential rationale (fixed upstream in v0.11.1). Honor the disabletls key from the fork. - Fix broken UI examples (teams, slack, rocketchat, email -> smtp). Add the new services. Document the Teams Power Automate migration. - Remove dead MigrateDiscordWebhook.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe notification system now uses a maintained Shoutrrr fork, shared HTTP clients, explicit URL validation, expanded ntfy handling, and a larger web service catalog. Documentation and repository ignore rules were also updated. ChangesNotification integration migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant NewNotifierFromURLs
participant createSender
participant ShoutrrrRouter
participant notificationHTTPClient
participant NtfyServer
NewNotifierFromURLs->>createSender: create and validate sender
createSender->>ShoutrrrRouter: initialize service URL
createSender->>notificationHTTPClient: configure shared client
NtfyServer-->>notificationHTTPClient: receive notification request
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@ai_docs/shoutrrr-fork-migration.md`:
- Around line 1-33: Move the migration guide content from the current ai_docs
location into the docs directory, preserving its follow-ups and open questions.
Update any references to the guide as needed, and keep the README limited to a
concise summary if it currently links or describes this migration.
In `@web/src/api/notifications.ts`:
- Line 242: Update the Opsgenie example in the notification URL definitions to
include a valid host authority and API key path, replacing the current
`opsgenie://APIKEY` format with the established `api.opsgenie.com` host pattern.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 49b21056-3f9e-4f9e-b234-11016cd3fcf4
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (8)
README.mdai_docs/shoutrrr-fork-migration.mdgo.modinternal/notifications/notifications.gointernal/notifications/ntfy.gointernal/notifications/ntfy_test.gointernal/notifications/validate_test.goweb/src/api/notifications.ts
opsgenie://APIKEY parses the key as the host and fails validation. The correct form puts the API key in the path after the host.
The directory holds local working notes. Ignore the whole directory instead of single files.
Replaces unmaintained containrrr/shoutrrr v0.8.0 (last release: August 2023) with the maintained fork nicholas-fedor/shoutrrr v0.16.3. Closes #126. URL validation now initializes the service directly, so the API returns the real cause and does not echo credentials. This change also removes two v0.8.0 panics on malformed opsgenie and teams URLs. The ntfy shim stays, because its lenient query-key parsing keeps stored URLs alive. The UI gains 9 services and corrected examples (teams, slack, rocketchat, email → smtp). One user-facing break: Microsoft retired the old Teams connectors, so
teams://channels stop delivering. Users must create them again with a Power Automate webhook URL (see the README warning). The release notes need a callout for this.Tests:
go build ./...,go test ./..., andpnpm -C web buildpass.pnpm -C web lintfails on develop already (23 errors, none in changed files). No screenshot: the only UI change is new entries and corrected examples in the service dropdown.Summary by CodeRabbit
New Features
Bug Fixes
Documentation