chore(deps): migrate to descope/backend monorepo#488
Conversation
|
🐕 Review complete — View session on Shuni Portal 🐾 |
There was a problem hiding this comment.
🐕 Shuni's Review
Mechanical migration from individual descope/common + descope/authzservice modules to the descope/backend monorepo, plus a go-sdk v1.18→v1.19 bump. Verified no stale descope/common or descope/authzservice paths remain in source.
Sniffed out 1 issue:
- 1 🟢 LOW: inconsistent path migration in
manualLicense.json
See inline comment. Good bones! Woof!
There was a problem hiding this comment.
Pull request overview
Migrates authzcache from the separate github.com/descope/common and github.com/descope/authzservice modules to the consolidated github.com/descope/backend monorepo, updating code imports and build/CI glue accordingly (prerequisite for downstream ABAC/CEL work).
Changes:
- Replaced Go import paths across runtime code, tests, mocks, and generated protobuf outputs to use
github.com/descope/backend/.... - Updated build/lint tooling references (Makefile, hooks, CI workflows, and GitHub composite actions) to point at the new vendored monorepo paths.
- Updated Go module dependencies (
go.mod/go.sum), including bumpinggithub.com/descope/go-sdktov1.19.0.
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/lint/.golangci.yml | Updates depguard messaging to the new monorepo masker import path. |
| pkg/authzcache/test/mocks/authzcacheclient.go | Swaps authzservice proto import to the monorepo path for tests/mocks. |
| pkg/authzcache/proto/v1/authzcache.pb.gw.go | Regenerates/updates grpc-gateway bindings to import monorepo authzservice protos. |
| pkg/authzcache/proto/v1/authzcache.pb.go | Regenerates/updates protobuf Go output to import monorepo authzservice protos. |
| pkg/authzcache/proto/v1/authzcache_grpc.pb.go | Regenerates/updates gRPC stub code to import monorepo authzservice protos. |
| pkg/authzcache/errors/errortypes.go | Updates common context/errors imports to monorepo paths. |
| pkg/authzcache/errors/errortypes_test.go | Updates test imports to monorepo common/errors path. |
| pkg/authzcache/client/client.go | Updates client dependencies (config/context/grpcclient) to monorepo paths. |
| pkg/authzcache/client/client_test.go | Updates test imports to monorepo context/grpcclient paths. |
| internal/services/remote/remote.go | Updates authzservice errors import to monorepo path. |
| internal/services/remote/remote_test.go | Updates common/context import to monorepo path. |
| internal/services/metrics/reporter.go | Updates common context/utils imports to monorepo paths. |
| internal/services/metrics/reporter_test.go | Updates utils import to monorepo path. |
| internal/services/caches/projectauthzcache.go | Updates common context/monitoredlru imports to monorepo paths. |
| internal/services/authz.go | Updates common/context import to monorepo path. |
| internal/services/authz_test.go | Updates common/context import to monorepo path. |
| internal/middlewares/projectidparser.go | Updates middleware dependencies (context/httpgateway/middlewares) to monorepo paths. |
| internal/middlewares/projectidparser_test.go | Updates test imports to monorepo context/utils paths. |
| internal/controllers/controller.go | Updates authzservice proto + common/context imports to monorepo paths. |
| internal/controllers/controller_test.go | Updates authzservice proto import to monorepo path. |
| internal/config/config.go | Updates common/config import to monorepo path. |
| cmd/authzcache/main.go | Updates common config/context/server imports to monorepo paths. |
| .hooks/pre-commit | Updates lint script sourcing paths to monorepo vendored location. |
| Makefile | Updates included dev Makefile path to monorepo vendored/GOPATH location. |
| .github/workflows/release-please.yml | Updates default Dockerfile path to monorepo vendored location. |
| .github/workflows/ci.yml | Updates tag quoting style and Dockerfile path to monorepo vendored location. |
| .github/actions/pack/action.yml | Updates default “common repo path” and Dockerfile defaults to monorepo vendored location. |
| manualLicense.json | Updates ignored module paths for license tooling to monorepo-related entries. |
| go.mod | Replaces descope/common (and implicit authzservice) with descope/backend dependency and adjusts direct/indirect requirements. |
| go.sum | Updates checksums consistent with the dependency migration and SDK bump. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Temporary, safe rollback to restore authzcache docker builds, which have been red on every push to main since #488 (5/11). #488 switched the module from the standalone github.com/descope/authzservice + github.com/descope/common to the github.com/descope/backend monorepo, so CI began building with the monorepo-shaped service Dockerfile (COPY . -> /monorepo, WORKDIR .../monorepo/$repo_name) which cannot build this standalone repo: package cmd/authzcache/main.go is not in std This reverts to the previously-proven build path: the vendored github.com/descope/common standalone Dockerfile that built every working pre-5/11 image. Dependencies (incl. go-sdk rolled back to v1.19.0) return to their pre-migration pins. The #566 lookup fix is preserved and compiles. Generated proto and go.mod/go.sum restored to the pre-migration state; builds and test-compiles clean. Re-migrate to the monorepo once the shared service Dockerfile supports standalone consumers. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(deps): migrate to descope/backend monorepo Re-applies the PR #488 migration that was reverted in PR #579 because the monorepo's vendored Dockerfile assumes a monorepo source layout (`COPY . monorepo/`, then `WORKDIR monorepo/$repo_name`) and breaks when used against a standalone repo with `cmd/authzcache/main.go` at root, producing `package cmd/authzcache/main.go is not in std`. This version routes CI through the repo-root standalone `./Dockerfile`, which builds in-place for the standalone module layout and is unaffected by the monorepo path assumptions. The vendored monorepo Dockerfile is left untouched (it works for actual monorepo services). Changes: - Replace `github.com/descope/common` and `github.com/descope/authzservice` imports with their `github.com/descope/backend` equivalents across source, generated proto code, and tests - Repoint Makefile, pre-commit hook, golangci config, and license manifest to the backend monorepo paths - Point ci.yml, release-please.yml, and the pack composite action at `./Dockerfile` instead of the vendored monorepo Dockerfile - Regenerate go.mod / go.sum for the consolidated dependency * ci: add docker-build validation job Validates the docker image builds on every PR (and push) so build failures are caught before merge to main rather than after a release-please PR is cut. Uses the standalone ./Dockerfile and the same build args as the production publish job, but does not push to any registry. The pack and publish-dockerhub jobs now depend on docker-build, so a failed build short-circuits any registry publishing.
Related Issues
Resolves: https://github.com/descope/etc/issues/15531
Required for:
https://github.com/descope/etc/issues/15115
Related PRs
Downstream PRs
In a Nutshell
authzservice+commonmodules withdescope/backendmonorepogo-sdkv1.18.0 → v1.19.0Description
Migrates authzcache from individual
github.com/descope/authzserviceandgithub.com/descope/commonmodule references to the consolidatedgithub.com/descope/backendmonorepo. This is a prerequisite for ABAC/CEL conditional check support (PR #464), which depends on updated proto definitions only available in the monorepo.Must