Repository navigation
refactor: rename Go module to unlocked-core (EN-187) - #1249
Conversation
|
Important Review skippedToo many files! This PR contains 170 files, which is 70 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configuration
⛔ Files ignored due to path filters: 6
📒 Files selected for processing: 170
You can disable this status message by setting the
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 |
corypride
left a comment
There was a problem hiding this comment.
Approving. Verified locally on Go 1.26.9:
- All four modules (backend, migrations, seeder, provider-middleware) build with
GOWORK=off, andgo mod tidy -diffandgo mod verifyare clean. - Backend
go test ./...passes, andgo vet/gofmtare clean. - govulncheck is clean on this branch.
mainon Go 1.26.6 still shows GO-2026-6617, so this PR is what fixes it. - unlocked-contracts v0.1.0 matches the old constants exactly: all 9 features (same order in
features.All), the 4 roles plusAdminRoles, and the 9 job types, with the samePubName/IsVideoJob/IsLibraryJobbehavior. Since the models are type aliases, stored values and NATS subjects don't change. - The rename commit is import lines only.
Question before merge: since the repo rename, GitHub's OIDC token says repo:UnlockedLabs/unlocked-core:…. Does the trust policy on the AWS_IAM_ROLE role allow that, or does it still only allow UnlockEdv2? If it's the old name, the first push to main will fail at "Configure AWS credentials" and no images will build. I couldn't check this myself because I don't have iam:ListRoles.
Non-blocking: the rename left the github.com/UnlockedLabs/... imports inside the stdlib import group, so goimports -l now flags 128 files (1 on main). Adding a commit that runs go run golang.org/x/tools/cmd/goimports@latest -w backend provider-middleware would keep everyone's organize-imports-on-save from reshuffling them during the post-rename rebases.
|
Thanks @corypride IAM is covered: GithubActionsBuildPushEcr already allows repo:UnlockedLabs/unlocked-core:*, and I’ll remove the old UnlockEdv2 line once the first main build lands in ECR. I also gave you access to that role, so you can check it yourself: run this on your shell: Added your goimports commit. It only reorders imports (128 files), and everything still builds and passes. Merging once CI is green. |
Pre-Submission PR Checklist
Heads up: update Go to 1.26.9
This PR requires Go 1.26.9 (was 1.26.6) to fix GO-2026-6617. Once it merges, VS Code and gopls show
go.work requires go >= 1.26.9until you update. The terminal downloads it automatically, but VS Code doesn't.To update (Linux, Go in
/usr/local/go):Then in VS Code: Go: Install/Update Tools → Developer: Reload Window. On a Mac, use the installer from https://go.dev/dl/.
Description of the change
Renames the Go module so other repos can import core (EN-187), and fixes a Go vulnerability the scan flagged.
backend/go.mod:UnlockEdv2→github.com/UnlockedLabs/unlocked-core/backend, with all imports updated (mechanical, no logic changes).provider-middleware, migrations and seeder now
require+replace => ../backend, so they build withoutgo.work.New CI step builds every module with
GOWORK=off.CI repo checks,
merge.shand doc links point atunlocked-core.GO-2026-6617: Go 1.26.6 → 1.26.9 (
go.modfiles,go.work, CI, provider-middleware Dockerfile) andgolang.org/x/netv0.57.0 → v0.60.0.Related issues: EN-187
Additional context
unlocked-contracts v0.1.0.unlocked-core, ormainstops building images.git remote set-url origin git@github.com:UnlockedLabs/unlocked-core.git, rebase open branches, and in Go branches replace"UnlockEdv2/with"github.com/UnlockedLabs/unlocked-core/backend/in imports.go.modfiles and.github/. The.gochanges are import lines only.