Skip to content

Commit b00c9db

Browse files
authored
chore(deploy): remove orphaned internal/deploy package (#1246)
* chore(deploy): remove orphaned internal/deploy package 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 * chore(deploy): clean up stale golangci noctx exclusion for deleted internal/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. * ci: bump golangci-lint timeout from 5m to 10m 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. * fix(deps): bump brace-expansion to 1.1.16 (GHSA-3jxr-9vmj-r5cp) 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.
1 parent 2819b3d commit b00c9db

4 files changed

Lines changed: 3 additions & 21 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1
4949
with:
5050
version: v2.10.1
51-
args: --timeout=5m
51+
args: --timeout=10m
5252

5353
- name: Run go vet
5454
run: go vet ./...

‎.golangci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ linters:
113113
- revive
114114
path: internal/api/
115115
text: "avoid meaningless package names"
116-
# noctx: exec.Command calls in deploy/configure CLI helpers intentionally
116+
# noctx: exec.Command calls in configure CLI helpers intentionally
117117
# omit context (CommandRunner interface contract; operator-controlled inputs).
118118
# Suppressed per-file rather than per-line so #nosec G204 can lead the comment.
119119
- linters:
120120
- noctx
121-
path: (internal/deploy/docker|cmd/configure_gcp|cmd/configure_azure)\.go
121+
path: (cmd/configure_gcp|cmd/configure_azure)\.go
122122
# noctx: http.Get and net.Listen in test helpers appropriately use the
123123
# background context; threading a test context through every helper would
124124
# add noise without improving test correctness.

‎go.mod‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,9 @@ require (
9494
github.com/LeanerCloud/CUDly/providers/azure v0.0.0
9595
github.com/LeanerCloud/CUDly/providers/gcp v0.0.0
9696
github.com/aws/aws-lambda-go v1.47.0
97-
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.58.2
98-
github.com/aws/aws-sdk-go-v2/service/ecr v1.54.2
99-
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.38.7
10097
github.com/aws/aws-sdk-go-v2/service/kms v1.50.4
10198
github.com/aws/aws-sdk-go-v2/service/lambda v1.89.0
10299
github.com/aws/aws-sdk-go-v2/service/organizations v1.45.3
103-
github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3
104100
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.40.3
105101
github.com/aws/aws-sdk-go-v2/service/sesv2 v1.42.0
106102
github.com/aws/aws-sdk-go-v2/service/sns v1.34.0
@@ -135,8 +131,6 @@ require (
135131
github.com/Microsoft/go-winio v0.6.2 // indirect
136132
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect
137133
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 // indirect
138-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect
139-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect
140134
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
141135
github.com/cespare/xxhash/v2 v2.3.0 // indirect
142136
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 // indirect

‎go.sum‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,26 +118,16 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d
118118
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo=
119119
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 h1:rWyie/PxDRIdhNf4DzRk0lvjVOqFJuNnO8WwaIRVxzQ=
120120
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22/go.mod h1:zd/JsJ4P7oGfUhXn1VyLqaRZwPmZwg44Jf2dS84Dm3Y=
121-
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.58.2 h1:Sm/sQAe/54oCaXj5/xOtMkMvpDafNZhQ38DsyarIBR0=
122-
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.58.2/go.mod h1:SxEwhpfvzjK0vR8LfHeOkHeIcpaFU5ZgVbuBo3J4w2A=
123121
github.com/aws/aws-sdk-go-v2/service/costexplorer v1.61.0 h1:T9Ms/lReZ3iRFdAtXS9IlhLbWoM2fKUOjJwcgmjT7ig=
124122
github.com/aws/aws-sdk-go-v2/service/costexplorer v1.61.0/go.mod h1:AFQ/jaLX9hhiVPxyNKowOchXlpwIYSfYg8bzuXi2gBA=
125123
github.com/aws/aws-sdk-go-v2/service/ec2 v1.251.2 h1:6TssXFfLHcwUS5E3MdYKkCFeOrYVBlDhJjs5kRJp0ic=
126124
github.com/aws/aws-sdk-go-v2/service/ec2 v1.251.2/go.mod h1:MXJiLJZtMqb2dVXgEIn35d5+7MqLd4r8noLen881kpk=
127-
github.com/aws/aws-sdk-go-v2/service/ecr v1.54.2 h1:2Mdcg3Rphkj48toLpLrckQ9T0ce08GrMfaL0l2anzLY=
128-
github.com/aws/aws-sdk-go-v2/service/ecr v1.54.2/go.mod h1:gwUKatMqrynzKA8L0MDAlvAvGB7LIzmTm6uFRqD+4CU=
129-
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.38.7 h1:NHy1+Jq8gVp8fSLF6Z8SazA+R4Qzsbla/0SbHHReH4Y=
130-
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.38.7/go.mod h1:KxsaVRXo+DeRMHVp65WqyM49XZiS6n74lEGQindkdgA=
131125
github.com/aws/aws-sdk-go-v2/service/elasticache v1.50.3 h1:uiWSUtTWqpvhP7KSEpVpIm0LqOtXtzOx049rmukP/gI=
132126
github.com/aws/aws-sdk-go-v2/service/elasticache v1.50.3/go.mod h1:igTRxVYuxplMPKS5J1AEThtbeFJQhUz845YtDRDzJhY=
133127
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 h1:5EniKhLZe4xzL7a+fU3C2tfUN4nWIqlLesfrjkuPFTY=
134128
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7/go.mod h1:x0nZssQ3qZSnIcePWLvcoFisRXJzcTVvYpAAdYX8+GI=
135-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 h1:JRaIgADQS/U6uXDqlPiefP32yXTda7Kqfx+LgspooZM=
136-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13/go.mod h1:CEuVn5WqOMilYl+tbccq8+N2ieCy0gVn3OtRb0vBNNM=
137129
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 h1:c31//R3xgIJMSC8S6hEVq+38DcvUlgFY0FM6mSI5oto=
138130
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21/go.mod h1:r6+pf23ouCB718FUxaqzZdbpYFyDtehyZcmP5KL9FkA=
139-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 h1:ZlvrNcHSFFWURB8avufQq9gFsheUgjVD9536obIknfM=
140-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21/go.mod h1:cv3TNhVrssKR0O/xxLJVRfd2oazSnZnkUeTf6ctUwfQ=
141131
github.com/aws/aws-sdk-go-v2/service/kms v1.50.4 h1:PgD1y0ZagPokGIZPmejCBUySBzOFDN+leZxCOfb1OEQ=
142132
github.com/aws/aws-sdk-go-v2/service/kms v1.50.4/go.mod h1:FfXDb5nXrsoGgxsBFxwxr3vdHXheC2tV+6lmuLghhjQ=
143133
github.com/aws/aws-sdk-go-v2/service/lambda v1.89.0 h1:e4NAllPs/ygQ7W4dTlAuP5N7QpCT+rTij3S8UOv2DD4=
@@ -152,8 +142,6 @@ github.com/aws/aws-sdk-go-v2/service/rds v1.97.3 h1:YBcCzc0S/DQN6Mg1sUtcyd8TY6T3
152142
github.com/aws/aws-sdk-go-v2/service/rds v1.97.3/go.mod h1:Xe+NMlf/DY/XTXSevASAjGRika9Qt2LnuCDLtos03ms=
153143
github.com/aws/aws-sdk-go-v2/service/redshift v1.58.3 h1:rXoN3hvwUimq8Z6uu2lsYncGPDQS+i70Rp1G0c0C/zk=
154144
github.com/aws/aws-sdk-go-v2/service/redshift v1.58.3/go.mod h1:OfB6wMvsEozZQbEjgqe6J68wF5u7wXNEAdG4FLKLk/Y=
155-
github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3 h1:HwxWTbTrIHm5qY+CAEur0s/figc3qwvLWsNkF4RPToo=
156-
github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3/go.mod h1:uoA43SdFwacedBfSgfFSjjCvYe8aYBS7EnU5GZ/YKMM=
157145
github.com/aws/aws-sdk-go-v2/service/savingsplans v1.31.0 h1:cGxQBpfDQZNtMjGlCd2ALGnKJCjPskOTdCRR+dZceRU=
158146
github.com/aws/aws-sdk-go-v2/service/savingsplans v1.31.0/go.mod h1:Osfg3coILx7t46vKS5OWoov989SA4fCoGwSuYrztNEg=
159147
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.40.3 h1:QYBY43OlvzRPww1gSZ1kihyqzXg32rweA3fql5ubSLA=

0 commit comments

Comments
 (0)