Skip to content

Fix DevContainer pre-commit Python discovery - #1038

Closed
Sergiy Matusevych (motus) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-devcontainer-lint-build-test-publish
Closed

Sergiy Matusevych (motus) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-devcontainer-lint-build-test-publish

Conversation

Copilot AI commented Oct 12, 2026 •

Copy link
Copy Markdown

Pull Request

Title

Fix DevContainer pre-commit Python discovery


Description

The DevContainer image build failed while pre-commit created hook environments because it could not find the requested Python 3.12 interpreter. This change makes the Conda base interpreter available during hook installation and keeps Conda channel acceptance valid through bootstrap updates.

  • Bootstrap changes
    • Add /opt/conda/bin to PATH before the image’s Conda setup step.
    • Pin Python 3.12 in the base environment for pre-commit hooks; the mlos environment remains floating.
    • Re-accept the defaults-channel terms after Conda updates and installs.
ENV PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
...
conda install ... conda-libmamba-solver python=3.12

Type of Change

  • 🛠️ Bug fix

Testing

Dockerfile checks and focused assertions pass. The full image build reached pre-commit initialization but could not complete because the sandbox could not resolve gitlab.com.


Additional Notes (optional)

The mlos environment continues to use its configured floating Python version.


Co-authored-by: motus <31380+motus@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job DevContainer Lint/Build/Test/Publish Fix DevContainer pre-commit Python discovery Oct 12, 2026
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.

2 participants