Skip to content

FEAT: Support for non docker executor#91

Draft
mberz wants to merge 2 commits intoengd_project_2026from
feat/non_docker_executor
Draft

FEAT: Support for non docker executor#91
mberz wants to merge 2 commits intoengd_project_2026from
feat/non_docker_executor

Conversation

@mberz
Copy link
Copy Markdown
Contributor

@mberz mberz commented May 10, 2026

Description

  • Introduces detection of the runtime environment (container vs. local)
  • refactor container lookup logic
  • enhance the path resolution for Docker mounts.

Proposed changes.

  • Added _is_running_in_container to reliably detect if the code is running inside a container, allowing the path resolution logic to adapt accordingly.
  • Updated get_host_path_for_container_path to return the input path as-is with a warning when running locally, improving developer experience during local debugging.
  • Refactored container lookup logic into a new _get_current_container helper, improving code clarity and error handling.
  • Enhanced mount matching logic in get_host_path_for_container_path to handle nested mounts and partial path matches, ensuring the most specific mount is used for path translation.
  • Improved error messages and exception handling for cases where mount information cannot be resolved.

Authored by @SilvinWillemsen

@mberz mberz force-pushed the feat/non_docker_executor branch from 597e5eb to 504e2dd Compare May 10, 2026 17:56
@mberz mberz requested a review from Copilot May 10, 2026 18:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds runtime-environment detection and more robust Docker mount-path translation to support running the backend both inside a container and directly on a developer machine.

Changes:

  • Added _is_running_in_container() and updated get_host_path_for_container_path() to return paths unchanged when running locally.
  • Refactored container lookup into _get_current_container() to improve container identification behavior.
  • Improved mount matching to select the most specific mount (supports nested/partial path matches).

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


logger = logging.getLogger(__name__)

#
return client.containers.get(hostname)
except docker.errors.NotFound:
for container in client.containers.list(all=True):
if hostname == container.name or hostname in container.id:
Comment on lines +76 to +81
# For local debugging, we assume the container_path is directly accessible on the host
if not _is_running_in_container():
logger.warning(
f"Running locally (not in container). Returning container_path as-is: {container_path}"
)
return container_path
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