Repository navigation
Conversation
| # entrypoint), mcs-controller and mcs-admin, with the CRDs the controller | ||
| # needs in /opt/global-discovery-mcs/crds. Build it from this directory. | ||
|
|
||
| # Base stage - common setup for all stages |
There was a problem hiding this comment.
This comment only labels the immediately following AS base stage and narrates its role; the stage name and subsequent FROM base uses already convey that structure.
🤖 AI Fix
Remove this redundant base-stage comment.
There was a problem hiding this comment.
Removed the six comments that only restated the stage names (base, copy source, lint, install make, build, runtime) in one pass, in #17615 and re-cut here. Kept the ones that explain a choice: the buildx TARGETOS/TARGETARCH args, the layer-caching order, and what the tester stage runs.
| COPY go.mod go.sum ./ | ||
| RUN go mod download | ||
|
|
||
| # Copy source code |
There was a problem hiding this comment.
# Copy source code merely restates the following COPY . . instruction and preserves no rationale or constraint.
🤖 AI Fix
Remove the comment above COPY . ..
| # Copy source code | ||
| COPY . . | ||
|
|
||
| # Lint stage |
There was a problem hiding this comment.
The AS linter declaration already identifies this as the lint stage, so this heading adds no lasting information.
🤖 AI Fix
Remove the redundant lint-stage comment.
| # Test stage: unit tests, the envtest suite and the coverage gate | ||
| FROM base AS tester | ||
|
|
||
| # Install make if not present |
There was a problem hiding this comment.
The following apt-get install ... make command already states exactly what this comment narrates; there is no non-obvious reason recorded here.
🤖 AI Fix
Remove the comment above the make installation command.
|
|
||
| RUN make test | ||
|
|
||
| # Build stage |
There was a problem hiding this comment.
The named AS builder stage makes this label self-evident, so the comment only repeats the code.
🤖 AI Fix
Remove the redundant build-stage comment.
|
|
||
| # Build stage | ||
| FROM base AS builder | ||
|
|
There was a problem hiding this comment.
The shipped-image build cannot succeed in this change: neither the reviewed head nor the supplied base contains cmd/mcs-registry, cmd/mcs-controller, or cmd/mcs-admin, yet this loop unconditionally builds all three. The newly enabled PR and post-merge image jobs therefore fail with a missing-package/directory error and can never publish the image.
🤖 AI Fix
Gate the image build jobs until all three command packages and their runtime implementation are present.
There was a problem hiding this comment.
Expected: this PR is slice 1 of 8 of #17615 and the three cmd/ packages and config/crd arrive in #17631 and #17633 (see the Depends-on section). The image job is gated on the global_discovery_mcs filter and will only pass once those slices are merged; the complete tree in #17615 builds and was validated there.
| go build -trimpath -ldflags="-s -w" -o /out/${cmd} ./cmd/${cmd} || exit 1; \ | ||
| done | ||
|
|
||
| # Runtime stage |
There was a problem hiding this comment.
This heading only announces the final runtime stage immediately before its FROM instruction and records no rationale or constraint.
🤖 AI Fix
Remove the redundant runtime-stage comment.
❌ Dynamo PR CI failed — run 41132757117 (attempt 1) on
|
| Other | Jobs |
|---|---|
| Global Discovery MCS | ❌ 1 |
Failure details
1 job failed: the Global Discovery MCS image build cannot copy config/crd/bases because the directory is missing from the Docker build context.
❌ Global Discovery MCS: Dockerfile COPY "/config/crd/bases": not found
Job: Global Discovery MCS · Failed step: Build and push the MCS registry image · Logs: gh run view --job 124329481717 -R ai-dynamo/dynamo --log-failed
#17 [linux/amd64 stage-4 3/4] COPY config/crd/bases /opt/global-discovery-mcs/crds/
#17 ERROR: failed to calculate checksum of ref laqrivy22t3zxhgib21qvq3cm::1ybgsmbvubzdra94taw0zcwf2: "/config/crd/bases": not found
Dockerfile:59
--------------------
57 | WORKDIR /
58 | COPY --from=builder /out/mcs-registry /out/mcs-controller /out/mcs-admin /
59 | >>> COPY config/crd/bases /opt/global-discovery-mcs/crds/
60 | USER 65532:65532
61 |
--------------------
ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref laqrivy22t3zxhgib21qvq3cm::1ybgsmbvubzdra94taw0zcwf2: "/config/crd/bases": not found
##[error]Process completed with exit code 1.
The image build fails at Dockerfile line 59 when BuildKit resolves the final-stage COPY config/crd/bases /opt/global-discovery-mcs/crds/. The source directory is absent from the build context; the preceding Go builder and binary-copy stages shown in the log were cached.
For agents
{"pr": 17629, "run_id": 41132757117, "run_attempt": 1, "head_sha": "bfaf1601804f1689e995aa216d8d4c03ea5b6edb",
"failures": [{"job": "Global Discovery MCS", "job_id": 124329481717, "failed_step": "Build and push the MCS registry image", "signature": "Dockerfile:59 COPY config/crd/bases: \"/config/crd/bases\": not found", "tests": [], "log_cmd": "gh run view --job 124329481717 -R ai-dynamo/dynamo --log-failed"}]}Posted automatically by Devin for run 41132757117. Updated on every full-CI run of this PR.
sttts
left a comment
There was a problem hiding this comment.
Detailed inline review feedback. Correctness findings, non-blocking suggestions, and coverage requests are identified separately in the comments.
| working-directory: deploy/global-discovery-mcs | ||
| run: | | ||
| docker version | ||
| make test-integration |
There was a problem hiding this comment.
Coverage request: provide an explicit CI path for the three-cluster suite
The new end-to-end suite currently depends on manual execution
The added checks run unit/envtest, generated-file validation, DynamoDB-local integration and chart tests. They do not invoke the three-cluster suite introduced in #17636, directly or through the inspected shared targets.
That leaves the cross-cluster lifecycle and Global Discovery Service integration outside the automated execution path.
Requested change
Please provide an explicit path for running this suite in CI. If running it on every relevant PR is too expensive, a scheduled or manually dispatched workflow with a documented merge policy would still make execution and evidence reproducible.
Preserve diagnostic artifacts and distinguish documented gaps from passed assertions.
Validation
Show that the intended workflow runs the suite and fails when an e2e assertion fails. For automatic execution, verify that relevant controller/chart changes select the job.
This is a CI coverage request, not a claim that envtest is skipped or that production behavior is already broken.
There was a problem hiding this comment.
Agreed. The suite runs locally today because it needs three kind clusters and about 12 minutes. We will add a global-discovery-mcs-e2e workflow with workflow_dispatch and a nightly schedule on the base branch, plus a PR path triggered by a label, that uploads the kind logs and the per-phase result file as artifacts and fails on any fail line (E2E_STRICT=1 turns documented gaps into failures; the default run reports them separately). It will also run the upstream conformance suite from #17681 so there is one scheduled job. We will land it once #17636 is in, since the workflow needs the suite.
|
|
||
| RUN for cmd in mcs-registry mcs-controller mcs-admin; do \ | ||
| CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ | ||
| go build -trimpath -ldflags="-s -w" -o /out/${cmd} ./cmd/${cmd} || exit 1; \ |
There was a problem hiding this comment.
[P3] Include useful build identity in container binaries
Container binaries retain dev/unknown while the Makefile build supplies metadata
The Makefile injects Version and GitHash, but this build path supplies only -s -w. The published image therefore retains the package defaults dev and unknown.
This module exposes that identity in startup logs and server information, and the controller advertises its version during registration. Useful metadata would make mixed-version deployments and upgrades easier to diagnose.
Suggested change
Pass version/commit metadata into the image build and share the relevant linker settings with the normal build path.
This is a non-blocking observability improvement. It is not a claim that the current build fails or violates a repository-wide requirement that all container builds inject these fields.
Validation
Build an image with known metadata and verify the identity reported by the container binary or server API. Checking the Makefile-built binary alone would not cover this path.
There was a problem hiding this comment.
Done in #17615 (1a07d2f) and re-cut here (9197dce). The builder stage takes VERSION and GIT_HASH build args and links them with the same -X internal/version flags as the Makefile's LDFLAGS, keeping -s -w and -trimpath. make docker-build passes them from git describe / rev-parse, and the post-merge image build passes the ref name and github.sha through the action's extra_build_args. A local build with VERSION=test-v GIT_HASH=abc123 logs version=test-v git_hash=abc123 at startup.
7f422a1 to
9197dce
Compare
9197dce to
614a180
Compare
Slice 1 of 8 of #17615, the port of the Multi-Cluster Services layer of the Global Router. Go module, Makefile, Dockerfile, lint configuration, README and AGENTS.md of deploy/global-discovery-mcs, with the CI filter, pre-merge check and image build jobs and the CODEOWNERS area. Relates to #17601 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Eric Stroczynski <estroczynski@nvidia.com>
614a180 to
bfaf160
Compare
Overview
Slice 1 of 8 of #17615, which stays open as the complete, CI-validated source of truth for the Multi-Cluster Services (KEP-1645) port. Review this PR for the build, tooling, documentation entry points and CI wiring of the new Go module; the other slices are listed under Issues and Ongoing Work.
This slice adds the shell of the new Go module
deploy/global-discovery-mcs(github.com/ai-dynamo/dynamo/deploy/global-discovery-mcs, Go 1.27.3, k8s.io v0.36.3, controller-runtime v0.24.1, mcs-api v0.5.2, no replace directives) with its Makefile, Dockerfile, lint configuration, README andAGENTS.md, plus the CI filter, pre-merge check job, image build jobs and code ownership. The Go source itself arrives in slices 02 to 05; the README in this slice is the map of the whole module and is the best place to start reading.Key Changes
go.modandgo.sumwith the full dependency set of the module (every later slice compiles against them unchanged).build lint test envtest test-integration manifests proto proto-check sync-crds tidy-check check-chart-crds check docker-build e2e, every tool pinned and installed intobin/,GOWORK=off.linter,tester,builderand distroless runtime stages (USER 65532, entrypoint/mcs-registry, imageglobal-discovery-mcs),.dockerignore,.gitignore(re-includesinternal/server/, which the rootserver/pattern would otherwise drop),.golangci.ymlfromdeploy/operatorplusgoheader.README.md(layout, build, flags of all three binaries, labels, how the Global Discovery Service reads the imports, follow-ups),AGENTS.mdandCLAUDE.md.internal/version, the only Go package in this slice.global_discovery_mcsin.github/filters.yamlandFILTERS.md(with atest-filters.jscase); pre-merge jobsglobal-discovery-mcs(check-deploy-componentplusmake proto-check checkandmake test-integration) andglobal-discovery-mcs-chart;pr.yamlandpost-merge-ci.ymlimage builds throughbuild-deploy-componentfor amd64 and arm64;changed-files,check-deploy-componentandbuild-deploy-componentaccept the new component.global-routerinareas.yaml,global-routeradded as co-owner of the two deploy-component actions;CODEOWNERSregenerated. The chart and docs globs are claimed by slices 06 and 07.Depends on (not in this PR)
Links point at the parent branch
estroz/mcs-port-module(#17615), where every piece is present together.deploy/global-discovery-mcs/api), 03 (deploy/global-discovery-mcs/internal,deploy/global-discovery-mcs/cmd/mcs-registry,deploy/global-discovery-mcs/cmd/mcs-admin), 04 (deploy/global-discovery-mcs/pkg) and 05 (deploy/global-discovery-mcs/cmd/mcs-controller,deploy/global-discovery-mcs/config). Until they merge,make buildand the image build fail and the pre-merge job added here cannot pass; the pre-merge chart job needs slice 06 (deploy/helm/charts/global-discovery-mcs).docs/pages it links to are in slices 02, 03 and 05:deploy/global-discovery-mcs/docs.Validation
On this branch alone:
build_codeowners.py --strict7330/7330 owned,emit_codeowners.pyproduces no diff inCODEOWNERSorCONTRIBUTORS.md,test-filters.js87/87.maketargets that need Go sources are not runnable here; see Depends on.Every slice of #17615 was validated together at
0fd4c96bon the parent branch, from a fresh checkout ofdeploy/global-discovery-mcs:make lint0 issues;make test(unit plus envtest,-race, coverage gate 85 on./internal/...) 95.7 percent;make test-integrationagainstamazon/dynamodb-localall pass;make proto-checkandmake checkno drift; Dockerlinterandtesterstages exit 0.make -C deploy/helm/charts/global-discovery-mcs lint test, 57 unittest cases; server-side dry run and a real install, upgrade and uninstall.build_codeowners.py --strict100 percent owned,emit_codeowners.pyno diff,test-filters.js87/87.docs_lint.py0 errors,fern check0 errors,fern docs broken-linkspasses.make e2e E2E_PHASES="1 2 3"): 99 passed, 0 failed, 1 known gap (pool region equals cluster id until feat(global-router): take a pool's region from its EndpointSlice label in the mcs backend #17604 lands).Issues and Ongoing Work
dynamo.mcs.v1proto contract, generated code and the label and condition constantsmcs-registry(view, merge rules, memory and DynamoDB stores, handlers, server) andmcs-adminpkg/clientandpkg/fakeregistrymcs-controller(registration and lease, export reconciler, auto-export, importer, CRDs, RBAC)/ok to test <sha>CI run and the module pre-merge jobs only pass once the slices they need are merged; see Depends on.Pull Request Checklist
/pr-checklistskill.🤖 Generated with Claude Code