Skip to content

Fix local farm issues#3169

Open
Alxiice wants to merge 3 commits into
developfrom
fix/local_farm_issues
Open

Fix local farm issues#3169
Alxiice wants to merge 3 commits into
developfrom
fix/local_farm_issues

Conversation

@Alxiice

@Alxiice Alxiice commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

Fix issues on the local farm

  • add script to launch/query the local farm
  • add protections against using rez during tests

Fix a bug on the command generation inside the submitter.

@Alxiice Alxiice self-assigned this Jul 15, 2026
@Alxiice Alxiice added the bug for actual bugs (unsure? use type:question) label Jul 15, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new CLI launcher script (bin/meshroom_localfarm) for managing the local farm, enhances logging in localFarmBackend.py by adding task durations and single-quoting environment variables, and refactors REZ command wrapping in localFarmSubmitter.py. It also updates the test suite to isolate tests from the host's REZ environment and increases a timeout.

However, a critical issue was identified in localFarmSubmitter.py where prepending environment variables directly to the command before wrapping it with rez env will cause a runtime execution failure, as rez will incorrectly treat the first environment variable assignment as the executable command. A code suggestion has been provided to resolve this by prepending the environment variables to the outer command instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +114 to +118
envVars = " ".join([f'{k}="{v}"' for k, v in additionalEnv.items()])
if envVars:
cmd = f"{envVars} {cmd}"
if rezBin:
cmd = f"{rezBin} env {packagesStr} -- {cmd}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Prepending envVars directly to cmd before wrapping it with rez env will cause rez to treat the first environment variable assignment (e.g., VAR=VAL) as the executable command. This leads to a runtime error such as rez: Command failed: 'VAR=VAL' was not found or is not executable because rez env does not run the command in a shell by default.

To fix this, envVars should be prepended to the outer command (before rez env) so that they are set in the shell environment before rez is invoked. rez will then correctly inherit and propagate these variables to the resolved environment.

Suggested change
envVars = " ".join([f'{k}="{v}"' for k, v in additionalEnv.items()])
if envVars:
cmd = f"{envVars} {cmd}"
if rezBin:
cmd = f"{rezBin} env {packagesStr} -- {cmd}"
envVars = " ".join([f'{k}="{v}"' for k, v in additionalEnv.items()])
if rezBin:
cmd = f"{rezBin} env {packagesStr} -- {cmd}"
if envVars:
cmd = f"{envVars} {cmd}"

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.07%. Comparing base (1d89d80) to head (40bfa05).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3169   +/-   ##
========================================
  Coverage    86.07%   86.07%           
========================================
  Files           78       78           
  Lines        12111    12111           
========================================
  Hits         10425    10425           
  Misses        1686     1686           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

bug for actual bugs (unsure? use type:question)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant