chore(deploy): remove orphaned internal/deploy package - #1246
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe orphaned ChangesDeployment package removal
Dependency and lint cleanup
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
5cd3490 to
ec49d1b
Compare
|
@coderabbitai review |
Rate Limit Exceeded
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@go.mod`:
- Line 82: The `yaml.v3` dependency is incorrectly marked as indirect even
though `pkg/config/load.go` imports and uses `gopkg.in/yaml.v3` directly. Update
`go.mod` so `yaml.v3` remains a direct requirement, and verify the dependency
entry reflects that it is used by the config loading code rather than being
treated as transitive.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5de8e690-adde-4dc7-be66-f23f0c0f8d6f
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (12)
go.modinternal/deploy/coverage_extra_test.gointernal/deploy/docker.gointernal/deploy/docker_test.gointernal/deploy/ecr.gointernal/deploy/ecr_test.gointernal/deploy/frontend.gointernal/deploy/frontend_test.gointernal/deploy/mocks.gointernal/deploy/profiles.gointernal/deploy/profiles_test.gointernal/deploy/types.go
💤 Files with no reviewable changes (11)
- internal/deploy/types.go
- internal/deploy/profiles_test.go
- internal/deploy/docker.go
- internal/deploy/ecr_test.go
- internal/deploy/frontend.go
- internal/deploy/frontend_test.go
- internal/deploy/mocks.go
- internal/deploy/ecr.go
- internal/deploy/coverage_extra_test.go
- internal/deploy/docker_test.go
- internal/deploy/profiles.go
Fix the ~45 golangci-lint v2 violations that #1276 deliberately skips because these files are also touched by other open PRs (#1265, #1299). internal/deploy/* is excluded here as #1246 deletes that package. Files fixed and linters addressed: - cmd/helpers_test.go: fieldalignment (govet), unparam - cmd/main_test.go: fieldalignment (govet), also fix positional struct literals broken by field reordering - cmd/multi_service_filters.go: hugeParam + rangeValCopy (gocritic), equalFold (gocritic), godot; all filter functions updated to *Config / *Recommendation params with callers updated across the cmd package - cmd/multi_service_engine_versions_test.go: fieldalignment (govet), godot - internal/auth/service_password_test.go: fieldalignment (govet), godot - internal/auth/store_postgres_test.go: fieldalignment (govet), godot - internal/purchase/approvals.go: err-shadow (govet), misspell (analogue->analog, cancelled->canceled, cancelling->canceling) - internal/purchase/messages.go: hugeParam + rangeValCopy (gocritic), godot, misspell (authorised->authorized) Incidental changes: caller sites in cmd/multi_service{,_helpers,_test, _filters_test}.go; handle*Message signature callers in internal/purchase/{coverage_extra,money_path_regression}_test.go; test assertions updated to match renamed error strings.
|
@coderabbitai review |
✅ Action performedReview finished.
|
ec49d1b to
171b973
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
171b973 to
bbae0e9
Compare
|
Rebased onto origin/main (27fdb06). Modify/delete conflicts resolved by confirming the deletions: internal/deploy/ is not imported by anything in main, so removing it remains valid. Gates: go build/vet exit 0; golangci-lint v2.10.1 exit 0. @coderabbitai review |
|
✅ Action performedReview finished.
|
bbae0e9 to
aeb1b45
Compare
|
Rebased onto origin/main (89658a3 -> a945344) which includes #1437 (tflint plugin cache + retry) and #1438 (trivy |
The internal/deploy package (Docker build/push, ECR login/repo management, frontend S3+CloudFront upload, deployment profiles) has zero importers outside its own test files. Actual deployment is handled by the GitHub workflows and terraform/. The dead code was still compiled, tested in CI, and re-assessed in every security scan for no benefit (ARCH-13, P3). Verification that the package is orphaned: - repo-wide grep for the import path "internal/deploy" across all file types (Go, workflows, scripts, docs, Makefiles): zero hits outside the package itself - repo-wide grep for distinctive exported identifiers (NewDockerService, NewECRService, NewFrontendService, DeploymentConfig, LoginToPublicECR, BuildAndUpload, ...): zero hits outside the package itself Also runs go mod tidy: the cloudfront, ecr, ecrpublic and s3 AWS SDK modules were only used by this package and drop out of go.mod. go build ./..., go vet ./... and go test ./internal/... all pass after removal. Closes #1202
…ternal/deploy/docker.go The internal/deploy package was deleted; its path in the noctx per-file exclusion is now dead. Remove the dead path segment to keep .golangci.yml in sync with the actual source tree.
aeb1b45 to
adb00c3
Compare
|
Rebased onto current origin/main (54f49d6). Conflict details:
@coderabbitai review |
|
✅ Action performedReview finished.
|
The previous run timed out at ~321s on a slow CI runner. The codebase has grown and 5m is too tight; 10m gives headroom without masking real lint errors.
|
Added a commit bumping the golangci-lint timeout from 5m to 10m in the CI workflow. The previous run timed out at ~321s on a slow Azure runner; the codebase has grown enough that 5m is too tight on a cold cache run. This is the root fix, not a suppression. @coderabbitai review |
|
✅ Action performedReview finished.
|
npm audit flagged brace-expansion <1.1.16 as high severity DoS. This was disclosed 2026-07-21 and affects all PR branches equally. Lockfile-only change; no production API surface altered.
Problem
Code-review finding ARCH-13 (P3, informational): the
internal/deploypackage (Docker build/push, ECR login and repository management, frontend S3 + CloudFront upload, deployment profile config) is orphaned dead code. It has zero importers outside its own test files; actual deployment is handled by the GitHub workflows andterraform/. About 26KB of code plus 55KB of tests were still compiled, run in CI, and repeatedly re-assessed in security scans for no benefit.Fix
Delete the
internal/deploypackage (11 files, ~2800 lines) and rungo mod tidy. Thecloudfront,ecr,ecrpublicands3AWS SDK modules were only used by this package and drop out ofgo.mod;gopkg.in/yaml.v3becomes indirect.Orphan-status verification
internal/deployacross ALL file types (Go, workflows, scripts, docs, Makefiles, JSON), excluding onlynode_modules,.gitandgraphify-out: zero hits outside the package itself.NewDockerService,NewECRService,NewFrontendService,DeploymentConfig,NewDefaultCommandRunner,LoginToPublicECR,PushToECR,InvalidateCloudFrontCache,FindFrontendDir,BuildAndUpload,SetActiveProfile,GetActiveProfile,MockECRPublicClient): zero hits outside the package itself."github.com/LeanerCloud/CUDly/internal/deploy": none.Test evidence
go build ./...: successgo vet ./...: no issuesgo test ./internal/...: 4610 tests passed in 23 packagesNo regression test applies: this is a pure deletion of unreferenced code, verified by the grep sweep above and a clean full build.
Closes #1202
Summary by CodeRabbit
noctxrule.