Conversation
Move the KEDA external scaler from src/asya-crew/cmd/scaler-pubsub into a standalone src/asya-scalers component built as the (previously placeholder) ghcr.io/deliveryhero/asya-scalers image. Drop the scaler build stage from the asya-crew Dockerfile. Also fixes publish-readiness gaps now that the images are public: - wire src/asya-scalers into Makefile (setup/test-unit/build-go/clean/cov) and the ci.yml unit-tests matrix (the scaler was tested nowhere before) - point the crossplane chart scaler image at asya-scalers (was asya-crew) - add asya-state-proxy-go/py to release.yml tag-latest loop + summary - update dependabot gomod dir and the scaler reference doc Signed-off-by: Artem Yushkovskiy <7501517+atemate@users.noreply.github.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 44 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request migrates the KEDA external pubsub scaler from the asya-crew component into a standalone asya-scalers directory and Docker image. The changes include updating the root Makefile, Dependabot configuration, Helm chart values, and documentation, as well as removing the scaler build steps from the asya-crew Dockerfile and implementing a new multi-stage Dockerfile and Makefile for asya-scalers. No review comments were provided, so there is no feedback to address.
…otobuf Match the module path to the directory/image now that the scaler is a top-level component (github.com/deliveryhero/asya/asya-scalers, consistent with asya-sidecar and asya-state-proxy-go). Regenerated the externalscaler protobuf with protoc v5.29.5 / protoc-gen-go v1.36.11 / protoc-gen-go-grpc v1.6.1 so the embedded go_package matches; the binary stays scaler-pubsub. Signed-off-by: Artem Yushkovskiy <7501517+atemate@users.noreply.github.com>
Drop to the distroless nonroot user (uid/gid 65532) in the final stage so the container does not run as root. The scaler binds only an unprivileged gRPC port and writes nothing to disk, so no root capabilities are needed. Resolves the Codacy root-execution finding. Signed-off-by: Artem Yushkovskiy <7501517+atemate@users.noreply.github.com>
The pubsub-gcs-pg e2e profile ran the KEDA scaler from the asya-crew image with command [/scaler-pubsub], but that binary now lives in asya-scalers. The scaler pod crash-looped (exec: /scaler-pubsub: no such file or directory), KEDA could not reach the external scaler, and the deploy timed out with context deadline exceeded. Build and kind-load asya-scalers in deploy.sh and point the profile's scaler image at ghcr.io/deliveryhero/asya-scalers. Signed-off-by: Artem Yushkovskiy <7501517+atemate@users.noreply.github.com>
|
Fixed the Root cause: the Fix:
No other e2e profile references the scaler image; No actionable inline review comments — gemini-code-assist left a summary only, and Codacy is now |
Code Metrics ReportCode Coverage ReportCoverage includes: unit, component, integration, and e2e tests Metrics tracked:
Legend:
Details | | main (c5d09de) | #506 (1a86cc0) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 52.9% | 52.9% | -0.1% |
| Files | 49 | 49 | 0 |
| Lines | 6887 | 6887 | 0 |
- | Covered | 3646 | 3644 | -2 |
| Code to Test Ratio | 1:0.4 | 1:0.4 | 0.0 |
| Code | 34098 | 34098 | 0 |
| Test | 15393 | 15393 | 0 |
+ | Test Execution Time | 5m43s | 5m42s | -1s |Code coverage of files in pull request scope (19.3% → 18.6%)
Reported by octocov |
Now that
asya-scalersandasya-state-proxy-{go,py}are public on ghcr, this removes the publish-readiness shims.Changes
src/asya-crew/cmd/scaler-pubsub→src/asya-scalers(git renames, history preserved), built as the previously-placeholderghcr.io/deliveryhero/asya-scalersimage. Drops the scaler build stage from theasya-crewDockerfile.src/asya-scalersto the Makefile (setup/test-unit/build-go/clean/cov) and theci.ymlunit-tests matrix — the scaler tests previously ran nowhere.pubsub.keda.scaler.image.repositorynow points atasya-scalers(was temporarilyasya-crew); binary still selected viacommand: ["/scaler-pubsub"].asya-state-proxy-go/pyto the tag-latestloop and release summary (they were built+pushed but never tagged latest nor advertised).Verification
go test ./...,go vet,gofmtclean insrc/asya-scalersmake -C src/asya-scalers test-unit/buildwork (multi-package coverage merge needs a complete Go toolchain — present in CI)helm templaterendersimage: ghcr.io/deliveryhero/asya-scalers:<appVersion>+command: ["/scaler-pubsub"]asya-scalers(25.8MB distroless) andasya-crewimages build; crew confirmed to ship/dlq-workerand no longer/scaler-pubsubAint: dqpob