fix(oci): copy .cargo/config.toml so the image build resolves the mcp-web registry #128

Merged
David merged 1 commit from fix/MCPWEB-1-oci-cargo-config into main 2026-07-18 04:21:22 +02:00
Owner

What

Copy .cargo/config.toml into the OCI build context so the pandoras-box-cargo registry alias resolves during the image build.

Why

After PR #127 switched youtrack-mcp to the registry-hosted mcp-web dep, the image build fails at the dependency-priming step:

error: failed to load manifest for workspace member `/build/crates/youtrack-mcp`
Caused by:
  registry index was not found in any configuration: `pandoras-box-cargo`

The OCI Dockerfiles copy only the workspace manifests before the priming cargo build (for layer caching), and .cargo/config.toml (which defines the alias) was never copied in. just pre-commit did not catch it: its docker mode mounts the whole repo, so the config was present there.

This fix belongs with PR #127 but landed too late: #127 was already merged and its branch auto-deleted, so my follow-up push resurrected a stray branch instead of updating the PR. This is that fix, re-based cleanly onto current main.

Change

  • COPY .cargo/config.toml ./.cargo/config.toml right after the manifests in both oci-build/Dockerfile and oci-build/Dockerfile.windows (the Windows one had the same latent bug), before the first cargo invocation. .dockerignore does not exclude .cargo.

Verification

just check-docker (the exact failing build) builds the builder stage clean - the priming step runs Updating pandoras-box-cargo index -> Finished release profile - and the youtrack-cli:check image exports.

#MCPWEB-1

## What Copy `.cargo/config.toml` into the OCI build context so the `pandoras-box-cargo` registry alias resolves during the image build. ## Why After PR #127 switched `youtrack-mcp` to the registry-hosted `mcp-web` dep, the image build fails at the dependency-priming step: ``` error: failed to load manifest for workspace member `/build/crates/youtrack-mcp` Caused by: registry index was not found in any configuration: `pandoras-box-cargo` ``` The OCI Dockerfiles copy only the workspace manifests before the priming `cargo build` (for layer caching), and `.cargo/config.toml` (which defines the alias) was never copied in. `just pre-commit` did not catch it: its docker mode mounts the whole repo, so the config was present there. This fix belongs with PR #127 but landed too late: #127 was already merged and its branch auto-deleted, so my follow-up push resurrected a stray branch instead of updating the PR. This is that fix, re-based cleanly onto current main. ## Change - `COPY .cargo/config.toml ./.cargo/config.toml` right after the manifests in both `oci-build/Dockerfile` and `oci-build/Dockerfile.windows` (the Windows one had the same latent bug), before the first cargo invocation. `.dockerignore` does not exclude `.cargo`. ## Verification `just check-docker` (the exact failing build) builds the builder stage clean - the priming step runs `Updating pandoras-box-cargo index` -> `Finished release profile` - and the `youtrack-cli:check` image exports. #MCPWEB-1
fix(oci): copy .cargo/config.toml so the mcp-web registry resolves in the image build
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 58s
Create release / Create release from merged PR (pull_request) Has been skipped
0f1f121e51
The OCI Dockerfiles copy only the workspace manifests before the dependency-priming `cargo build`, for layer caching. After adopting the registry-hosted mcp-web dep, that step fails at manifest load with "registry index was not found in any configuration: pandoras-box-cargo", because the `.cargo/config.toml` that defines the alias was never copied into the build context. `just pre-commit` did not catch this: its docker mode mounts the whole repo, so the config was present there.

Copy `.cargo/config.toml` right after the manifests in both `oci-build/Dockerfile` and `oci-build/Dockerfile.windows`, before the first cargo invocation. Verified with `just check-docker` (builder stage builds clean, image exports).

#MCPWEB-1
David scheduled this pull request to auto merge when all checks succeed 2026-07-18 04:20:59 +02:00
David merged commit bf2a0ab811 into main 2026-07-18 04:21:22 +02:00
David deleted branch fix/MCPWEB-1-oci-cargo-config 2026-07-18 04:21:23 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/youtrack-cli!128
No description provided.