Skip to content

Pass Windows program dirs and Python UTF-8 mode to Harbor - #220

Merged
rng1995 merged 6 commits into
NVIDIA:mainfrom
GodfredArhinful:windows-harbor-env
Oct 22, 2026
Merged

rng1995 merged 6 commits into
NVIDIA:mainfrom
GodfredArhinful:windows-harbor-env

Conversation

@GodfredArhinful

Copy link
Copy Markdown
Contributor

Fixes #206

Summary

On Windows, every Tier 3 trial failed with docker: unknown command: docker compose. Harbor's allowlisted host environment (_HARBOR_BASE_ENV_VARS) didn't include ProgramFiles, and Docker Desktop's CLI looks for its plugins under %ProgramFiles%\Docker\cli-plugins. The same allowlist also dropped PYTHONUTF8 and PYTHONIOENCODING, so on a non-UTF-8 locale users couldn't enable Python's UTF-8 mode for Harbor to work around harbor-framework/harbor#3726.

This adds PROGRAMDATA, PROGRAMFILES, PROGRAMW6432, PYTHONIOENCODING and PYTHONUTF8, as suggested in the issue. They're Windows directory paths and Python settings, not secrets, and on other platforms they're simply absent. Windows reports environment variable names to Python in upper case, so the upper-case entries match ProgramFiles there.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes (no docs describe this allowlist)
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

New test test_harbor_environment_keeps_windows_program_dirs_and_python_utf8_mode builds Harbor's environment from a Windows-like host environment and checks the five variables are passed through while an unrelated variable is still dropped. It fails on main with all five missing and passes with this change.

Full test suite on macOS: 13,769 passed, 23 skipped, 2 failed. The 2 failures (test_harbor_secure_docker_environment.py::test_sidecar_retains_*_nonsecret_*_compose_*_value, "Docker Compose interpolation variable 'CUSTOM_HOST_IP' requires protected execution state") fail the same way on main without this change. I couldn't test on a Windows machine.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Harbor's allowlisted host environment dropped ProgramFiles, so Docker Desktop's CLI could not find its compose plugin and every Windows Tier 3 trial failed with "docker: unknown command: docker compose". It also dropped PYTHONUTF8 and PYTHONIOENCODING, so users on non-UTF-8 locales could not enable Python's UTF-8 mode for Harbor.

Add PROGRAMDATA, PROGRAMFILES, PROGRAMW6432, PYTHONIOENCODING and PYTHONUTF8 to _HARBOR_BASE_ENV_VARS. None of them carry secrets.

Fixes NVIDIA#206

Signed-off-by: Godfred Arhinful <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated review: 1 findings (0 P1, 1 P2, 0 P3); 1 posted inline.

Docker and kata modes run credentialed agent commands through a handoff scope whose compose client environment keeps only _is_compose_client_operational_name names, which had PROGRAMDATA but not PROGRAMFILES. Every compose call in that scope then lost Docker Desktop's plugin directory on Windows. The same filter covers sidecar service_exec and the download paths.

Signed-off-by: Godfred Arhinful <[email protected]>
Signed-off-by: Godfred Arhinful <[email protected]>

# Conflicts:
#	CHANGELOG.md

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving at 416a801. The secure exec path now keeps PROGRAMFILES in every docker compose call: credentialed agent commands, sidecar exec and downloads. Your new test fails without edd6e36 and passes with it. The CHANGELOG entry is under ## Unreleased, and all 17 checks pass. Not run on a Windows host.

@rng1995
rng1995 merged commit 103fafd into NVIDIA:main Oct 22, 2026
17 checks passed
rng1995 added a commit that referenced this pull request Oct 22, 2026
No conflicts; brings in #220.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995 added a commit that referenced this pull request Oct 22, 2026
Brings in main up to e253c41: #218 two-path quickstart and onboarding
docs, #220 Windows program dirs and Python UTF-8 mode for Harbor.

Conflicts:
- CHANGELOG.md: main's Changed entry (two first-run paths) goes first
  under the branch's Unreleased Changed heading, and main's Windows
  Fixed entry follows the #211 entry under Fixed, as on main. Released
  sections are identical to main.
- README.md: kept #218's text; the closing sentence on other artifact
  types now points plugins to Plugin Evaluation (1,099 of the 1,100-word
  budget).
- docs/quickstart.mdx: kept #218's structure. The "Add deduplication or
  live evaluation" table gains an "Evaluate an agent plugin" row, and the
  branch's note on plugin live evaluation (--tier3 or tier3
  evaluate-plugin) follows the table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
@rng1995 rng1995 mentioned this pull request Oct 30, 2026
15 of 20 tasks
chrisknvidia pushed a commit that referenced this pull request Oct 30, 2026
* Pass Windows program dirs and Python UTF-8 mode to Harbor
* Keep PROGRAMFILES in the compose client environment of secure handoffs

Signed-off-by: Godfred Arhinful <[email protected]>
chrisknvidia pushed a commit that referenced this pull request Oct 30, 2026
Brings in main up to e253c41: #218 two-path quickstart and onboarding
docs, #220 Windows program dirs and Python UTF-8 mode for Harbor.

Conflicts:
- CHANGELOG.md: main's Changed entry (two first-run paths) goes first
  under the branch's Unreleased Changed heading, and main's Windows
  Fixed entry follows the #211 entry under Fixed, as on main. Released
  sections are identical to main.
- README.md: kept #218's text; the closing sentence on other artifact
  types now points plugins to Plugin Evaluation (1,099 of the 1,100-word
  budget).
- docs/quickstart.mdx: kept #218's structure. The "Add deduplication or
  live evaluation" table gains an "Evaluate an agent plugin" row, and the
  branch's note on plugin live evaluation (--tier3 or tier3
  evaluate-plugin) follows the table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
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.

Windows: Harbor's env allowlist drops ProgramFiles and PYTHONUTF8, so Tier 3 fails with docker: unknown command: docker compose

2 participants