Repository navigation
refactor(notification)!: move notification to its own module, notifications - #282
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
13 of 17 tasks
sthanikan2000
added this pull request to stack #283
October 6, 2026 11:40
sthanikan2000
force-pushed
the
refactor/notifications-module
branch
2 times, most recently
from
October 6, 2026 11:53
46e78b6 to
1b14f6a
Compare
…ations notification lived in core's root module. A fix to it could only reach a consumer through a bump of the whole root module, which today also brings workflow's breaking changes. It is now the independent module github.com/OpenNSW/core/notifications, versioned on its own like storage (#159). The module takes a new path rather than keeping github.com/OpenNSW/core/notification. A consumer pinned to a root-module version that still contains notification/ would otherwise see the same import path in two modules and fail with an ambiguous import, so it could not adopt the module without that root bump. Under a new path it can require the module beside its existing root pin. The package keeps its name, notification, so a consumer changes only its import path and keeps using notification.X. goimports writes the import with the name spelled out, since it differs from the path. Only remote and secret are dependencies, nothing else in core imports it, and its behavior is unchanged. CI gets a Notifications Module job, and dependabot watches the new directory. BREAKING CHANGE: import notification "github.com/OpenNSW/core/notifications" instead of "github.com/OpenNSW/core/notification". The package name and API are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sthanikan2000
force-pushed
the
refactor/notifications-module
branch
from
October 6, 2026 11:53
1b14f6a to
4054392
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves
notificationout of core's root module into its own Go module,github.com/OpenNSW/core/notifications, as was done for storage in #159.notificationcan currently reach a consumer only through a bump of the whole root module. Today that bump also brings workflow's breaking series (refactor(workflow,taskflow)!: rename TaskDone to CompleteStep, TaskType to PluginType, and SubTask* to Step* (1/8) #237, feat(workflow)!: give each TASK node run its own step ID and seq (3/8) #239, feat(workflow)!: make ActivationID the routing key for admin resolution #256).notification/can't add a module at that same path: Go fails withambiguous import: found package … in multiple modules. Under the new path it can require the module next to its existing root pin.No behavior changes.
Type of Change
Changes Made
git mv notification notifications. Every file is recorded as a rename, so history follows.notification. Only the import path changes; code keeps usingnotification.X. Go allows a package name that differs from its path. The repo's formatter (goimports, run by the pre-commit hook and CI) writes such imports with the name spelled out:notification "github.com/OpenNSW/core/notifications".providers/email.go,providers/sms.goand the integration test. Every other Go file is identical tomain.notifications/go.mod:go 1.26, requiringremote v0.8.0andsecret v0.2.0, the package's only dependencies. Nothing else in core imports it.go.mod: aftergo mod tidy,secretbecomes indirect, since onlynotificationused it directly..github/workflows/ci.yml: aNotifications Modulejob, copied fromstorage-module..github/dependabot.yml:"/notifications".Testing
I have tested this change locally
I have added tests that prove my fix is effective or that my feature works
I have tested edge cases
All existing tests pass
notifications:go mod tidy,go vet ./...,go test -race ./...pass.Root:
go mod tidy,go build ./...,go vet ./...,go test ./...pass; the root no longer has notification's two packages.No code anywhere references
github.com/OpenNSW/core/notification.The pre-commit hooks passed, including the
go mod tidycheck.Checklist
Related Issues
Prerequisite for #281.
Screenshots/Demo
N/A
Additional Notes
Breaking: import
notification "github.com/OpenNSW/core/notifications"instead of"github.com/OpenNSW/core/notification". The package name and API are unchanged.Release:
notifications/v0.1.0, goes on the result once both merge, so the first published API already includes the fix.notifications/v0.1.0next to its current root pin, without bumping the root module, and changes only its 7 import lines.