Skip to content

refactor(storage): extract storage into an independent Go module - #159

Merged
sthanikan2000 merged 1 commit into
mainfrom
refactor/storage-independent-module
Aug 23, 2026
Merged

refactor(storage): extract storage into an independent Go module#159
sthanikan2000 merged 1 commit into
mainfrom
refactor/storage-independent-module

Conversation

@sthanikan2000

Copy link
Copy Markdown
Collaborator

Summary

  • Gives storage its own go.mod (github.com/OpenNSW/core/storage), matching the pattern already used for authn, authz, shared, remote, secret, database, payment, pagination, trace, and uiprojector.
  • No source changes. storage keeps its current authn dependency for now — this is purely a module-boundary change, sequenced deliberately before refactor(storage)!: decouple storage from authn via a Principal/Extractor interface #158 (the authn-decoupling breaking change).
  • Adds a storage-module CI job mirroring authn-module, and lists /storage in dependabot.yml.
  • Root's go.mod/go.sum drop authn and its transitive golang-jwt/jwt/v5 dependency, since storage was the only in-repo consumer and now carries that requirement itself.

Why this order

Landing this first lets storage ship as a non-breaking v0.1.0: existing downstream importers only need to add an explicit require github.com/OpenNSW/core/storage vX.Y.Z to their own go.modno code changes. The authnPrincipal/Extractor interface change (#158, already open) is a real breaking API change (new required constructor param, new error return), so it's deferred to a follow-up release (e.g. v0.2.0) that downstream repos can pick up on their own schedule, after they've already absorbed the module split.

Once this merges and storage/v0.1.0 is tagged, #158 will be rebased on top of it.

Test plan

  • cd storage && go build ./... && go vet ./... && go test ./... -v — all pass, module builds standalone
  • Root go build ./... and go mod tidy — clean, root module unaffected
  • .github/workflows/ci.yml YAML validated; new storage-module job mirrors authn-module exactly
  • Pre-commit/pre-push hooks (gitleaks, race tests) passed locally

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6610bc5a-d5ca-446f-a661-daab28bf504c


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.

❤️ Share

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

@sthanikan2000
sthanikan2000 force-pushed the refactor/storage-independent-module branch from 70281aa to 95adeab Compare August 23, 2026 13:01
storage is the last remaining candidate matching the pattern already used
for authn, authz, shared, remote, secret, database, payment, pagination,
trace, and uiprojector: give it its own go.mod so it can be versioned and
released independently of the root module.

No source changes — storage keeps its current authn dependency for now, so
this is purely a module-boundary change. Existing importers of
github.com/OpenNSW/core/storage need to add an explicit
`require github.com/OpenNSW/core/storage vX.Y.Z` to their own go.mod, but no
code changes are needed on their end.

Adds a storage-module CI job (mirroring authn-module) and lists /storage in
dependabot.yml. Root's go.mod/go.sum drop authn and its transitive
golang-jwt/jwt/v5 dependency, since storage was the only in-repo consumer
and it now carries that requirement itself.

Deliberately sequenced before the authn-decoupling change (#158): this lets
storage ship as a non-breaking v0.1.0 first, so downstream repos can pick up
the independent module before separately opting into the breaking
Principal/Extractor interface change later.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sthanikan2000
sthanikan2000 force-pushed the refactor/storage-independent-module branch from 95adeab to 5162fcd Compare August 23, 2026 13:07
@sthanikan2000
sthanikan2000 merged commit c9fbcdb into main Aug 23, 2026
19 checks passed
@sthanikan2000
sthanikan2000 deleted the refactor/storage-independent-module branch August 23, 2026 13:11
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