Use explicit --manifest-path for pixi jobs instead of unsetting PIXI_PROJECT_MANIFEST#406
Conversation
…PROJECT_MANIFEST pixi's --manifest-path flag always overrides the PIXI_PROJECT_MANIFEST env var, so pointing pixi run at the manifest directory explicitly is more robust than unsetting the env var and relying on cwd-based discovery. Introduces FG_MANIFEST_DIR, exported alongside FG_WORK_DIR for all job types. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Nice, I like it! |
|
But I think we still need the I'm going to fix the ENV leakage on a separate PR. |
|
Does pixi set that environment variable? Did you want me to revert that here? |
There was a problem hiding this comment.
Pull request overview
This PR updates Fileglancer’s generated job scripts so Pixi-based app entry points run with an explicit manifest location via pixi run --manifest-path "$FG_MANIFEST_DIR" ..., and introduces a new FG_MANIFEST_DIR environment variable (alongside FG_WORK_DIR) for generated scripts.
Changes:
- Add
FG_MANIFEST_DIRexport to the job-script preamble to point at the app manifest directory inside the job workdir snapshot. - Update Pixi app entry points to run via
pixi run --manifest-path "$FG_MANIFEST_DIR" <task>. - Update
tests/test_apps.pyassertions to match the new script preamble and manifest-path behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
fileglancer/apps/jobs.py |
Adds FG_MANIFEST_DIR export to the generated script preamble (but currently still unsets PIXI_PROJECT_MANIFEST, causing mismatch with updated test/intent). |
fileglancer/apps/pixi.py |
Switches generated Pixi commands to use --manifest-path "$FG_MANIFEST_DIR". |
tests/test_apps.py |
Updates job-script assertions to validate FG_WORK_DIR/FG_MANIFEST_DIR preamble and expected working directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| preamble_lines = [ | ||
| "unset PIXI_PROJECT_MANIFEST", | ||
| f"export FG_WORK_DIR={shlex.quote(str(work_dir))}", | ||
| f'export FG_MANIFEST_DIR="$FG_WORK_DIR"/{shlex.quote(cd_suffix)}', | ||
| # Where the script reports its startup phase (e.g. pulling a container |
|
I recommend squashing this merge. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
|
||
| # Build the pixi run command | ||
| command = f"pixi run {name}" | ||
| command = f'pixi run --manifest-path "$FG_MANIFEST_DIR" {name}' |
| # FG_MANIFEST_DIR always points at the manifest's directory, so | ||
| # pixi-style commands can pass --manifest-path explicitly. |
As suggested by Github Copilot
It should be fixed in #408 |
|
I think this is ready to merge then. |
krokicki
left a comment
There was a problem hiding this comment.
Tested on my Pixi project. LGTM.
|
I'll merge this then. |
Summary
--manifest-pathflag always overrides thePIXI_PROJECT_MANIFESTenv var (verified against pixi 0.70.2), so this switches the generated pixi command topixi run --manifest-path "$FG_MANIFEST_DIR" <task>instead of unsettingPIXI_PROJECT_MANIFESTand relying on cwd-based manifest discovery.FG_MANIFEST_DIR, exported alongsideFG_WORK_DIRin every generated job script (all app types, not just pixi), pointing at the directory containing the app's manifest.tests/test_apps.pyto assert on the new preamble.Supersedes #405 (moved from a fork branch to a branch within this repo).
Test plan
pixi run -e test test-backend— all 723 tests pass🤖 Generated with Claude Code