Skip to content

fix(docker): copy rest_provider.py into the image#23

Merged
BillJr99 merged 1 commit into
mainfrom
claude/rest-oauth-mcp-5j57tq
Jun 9, 2026
Merged

fix(docker): copy rest_provider.py into the image#23
BillJr99 merged 1 commit into
mainfrom
claude/rest-oauth-mcp-5j57tq

Conversation

@BillJr99

@BillJr99 BillJr99 commented Jun 9, 2026

Copy link
Copy Markdown
Owner

The Dockerfile copies modules by explicit name, and rest_provider.py was never added when the REST/OAuth feature merged. The published image has the frontend/server code that imports rest_provider but not the module itself, so /api/pending-auth (polled by the UI) and any REST provider fail at runtime with ModuleNotFoundError.

  • Add rest_provider.py to the COPY line and set MCPPROXY_REST_AUTH_DIR.
  • Add tests/test_dockerfile.py guarding that every local module imported by runtime code is COPYd into the image, so a new module can't silently break the build again.

https://claude.ai/code/session_01L9uGbkXi2RwUmBQHdVaNoZ

The Dockerfile copies modules by explicit name, and rest_provider.py was
never added when the REST/OAuth feature merged. The published image has
the frontend/server code that imports rest_provider but not the module
itself, so /api/pending-auth (polled by the UI) and any REST provider
fail at runtime with ModuleNotFoundError.

- Add rest_provider.py to the COPY line and set MCPPROXY_REST_AUTH_DIR.
- Add tests/test_dockerfile.py guarding that every local module imported
  by runtime code is COPYd into the image, so a new module can't silently
  break the build again.

https://claude.ai/code/session_01L9uGbkXi2RwUmBQHdVaNoZ
Copilot AI review requested due to automatic review settings June 9, 2026 09:49
@BillJr99 BillJr99 merged commit d02a059 into main Jun 9, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Docker image runtime failure where rest_provider.py was imported by the frontend/server but not included in the built image, and adds a regression test to prevent future missing-module COPY omissions.

Changes:

  • Add rest_provider.py to the Dockerfile’s explicit COPY list.
  • Set MCPPROXY_REST_AUTH_DIR in the Dockerfile to ensure a consistent in-container REST OAuth token cache location.
  • Add tests/test_dockerfile.py to assert that root-level local modules imported by runtime code are present in the Docker image COPY list (plus an explicit guard for rest_provider).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Dockerfile Copies rest_provider.py into the image and sets MCPPROXY_REST_AUTH_DIR env var.
tests/test_dockerfile.py Adds a guard test ensuring runtime-imported root modules are included in the Dockerfile COPY list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants