Skip to content

fix(build): add setuptools build dependency for flatdict#181

Open
Copilot wants to merge 3 commits intomainfrom
copilot/fix-missing-dependency-devcontainer
Open

fix(build): add setuptools build dependency for flatdict#181
Copilot wants to merge 3 commits intomainfrom
copilot/fix-missing-dependency-devcontainer

Conversation

Copy link
Contributor

Copilot AI commented Feb 14, 2026

Pull Request

Description

Adds setuptools as an explicit build dependency for flatdict in pyproject.toml via the [tool.uv.extra-build-dependencies] table. When uv builds flatdict==4.0.1 in an isolated environment (such as the devcontainer), it fails with ModuleNotFoundError: No module named 'pkg_resources' because flatdict's setup.py imports pkg_resources without declaring setuptools as a build requirement. This override ensures setuptools is present during the build.

Closes #179

Type of Change

  • 🐛 Bug fix (non-breaking change fixing an issue)
  • ✨ New feature (non-breaking change adding functionality)
  • 💥 Breaking change (fix or feature causing existing functionality to change)
  • 📚 Documentation update
  • 🏗️ Infrastructure change (Terraform/IaC)
  • ♻️ Refactoring (no functional changes)

Component(s) Affected

  • deploy/000-prerequisites - Azure subscription setup
  • deploy/001-iac - Terraform infrastructure
  • deploy/002-setup - OSMO control plane / Helm
  • deploy/004-workflow - Training workflows
  • src/training - Python training scripts
  • docs/ - Documentation

Note: Change is in root pyproject.toml (build configuration), which does not map to an existing component checkbox.

Testing Performed

  • Terraform plan reviewed (no unexpected changes)
  • Terraform apply tested in dev environment
  • Training scripts tested locally with Isaac Sim
  • OSMO workflow submitted successfully
  • Smoke tests passed (smoke_test_azure.py)

Expected validation: Rebuild the devcontainer from scratch and confirm flatdict installs without pkg_resources errors.

Documentation Impact

  • No documentation changes needed
  • Documentation updated in this PR
  • Documentation issue filed

Checklist

Co-authored-by: liupeirong <1184120+liupeirong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing dependency in out-of-the-box devcontainer Add setuptools build dependency for flatdict Feb 14, 2026
Copilot AI requested a review from liupeirong February 14, 2026 06:05
@liupeirong liupeirong marked this pull request as ready for review February 14, 2026 06:06
Copilot AI review requested due to automatic review settings February 14, 2026 06:06
Copy link

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

This PR fixes a devcontainer build failure where flatdict==4.0.1 requires pkg_resources (provided by setuptools) during its build process but doesn't declare it as a build dependency. The fix adds a uv-specific configuration to ensure setuptools is available when building flatdict in isolation.

Changes:

  • Added [tool.uv.extra-build-dependencies] section to pyproject.toml specifying that flatdict requires setuptools as a build dependency

@liupeirong liupeirong requested a review from nguyena2 February 14, 2026 06:08
@WilliamBerryiii
Copy link
Member

Closing and re-opening this PR to unblock the failed actions permissions issues.

@github-actions
Copy link

github-actions bot commented Feb 14, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@WilliamBerryiii WilliamBerryiii changed the title Add setuptools build dependency for flatdict fix(build): add setuptools build dependency for flatdict Feb 14, 2026
@WilliamBerryiii
Copy link
Member

Thanks for the fix! 🎉 Great catch on the missing setuptools build dependency for flatdict.

I went ahead and updated the PR description to align with our pull request template — added the structured sections (Description, Type of Change, Testing Performed, etc.) and linked this to #179 with a Closes reference so the issue will auto-close on merge. No changes to the code itself, just the PR metadata.

Appreciate the contribution!

@liupeirong liupeirong self-requested a review February 15, 2026 06:34
@liupeirong
Copy link
Collaborator

Actually on a clean Ubuntu 24.04 LTS, opening the dev container for the first time still fails. Now it complains there's no module pkg_resources found. pkg_resources is deprecated, so installing it is more complicated. flatdict doesn't seem to be used anywhere in the repo. @agreaves-ms, can you confirm if it's still needed?

@liupeirong liupeirong requested review from agreaves-ms and removed request for nguyena2 February 15, 2026 06:38
Copy link
Collaborator

@rezatnoMsirhC rezatnoMsirhC left a comment

Choose a reason for hiding this comment

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

Actually on a clean Ubuntu 24.04 LTS, opening the dev container for the first time still fails. Now it complains there's no module pkg_resources found. pkg_resources is deprecated, so installing it is more complicated. flatdict doesn't seem to be used anywhere in the repo. @agreaves-ms, can you confirm if it's still needed?

#196 removed flatdict and other unused dependencies, so I agree we should consider if this PR is even needed anymore or if we can close it.

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.

fix(scope): missing dependency in out-of-the-box devcontainer

5 participants