Skip to content

Use explicit --manifest-path for pixi jobs instead of unsetting PIXI_PROJECT_MANIFEST#406

Merged
mkitti merged 10 commits into
mainfrom
mkitti-pixi-manifest-path
Jul 21, 2026
Merged

Use explicit --manifest-path for pixi jobs instead of unsetting PIXI_PROJECT_MANIFEST#406
mkitti merged 10 commits into
mainfrom
mkitti-pixi-manifest-path

Conversation

@mkitti

@mkitti mkitti commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pixi's --manifest-path flag always overrides the PIXI_PROJECT_MANIFEST env var (verified against pixi 0.70.2), so this switches the generated pixi command to pixi run --manifest-path "$FG_MANIFEST_DIR" <task> instead of unsetting PIXI_PROJECT_MANIFEST and relying on cwd-based manifest discovery.
  • Introduces FG_MANIFEST_DIR, exported alongside FG_WORK_DIR in every generated job script (all app types, not just pixi), pointing at the directory containing the app's manifest.
  • Updates tests/test_apps.py to 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

…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>
@krokicki

krokicki commented Jul 8, 2026

Copy link
Copy Markdown
Member

Nice, I like it!

@krokicki

krokicki commented Jul 8, 2026

Copy link
Copy Markdown
Member

But I think we still need the unset PIXI_PROJECT_MANIFEST in there for now, because we don't want Fileglancer's manifest leaking into the cluster jobs.

I'm going to fix the ENV leakage on a separate PR.

@mkitti

mkitti commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Does pixi set that environment variable? Did you want me to revert that here?

Comment thread fileglancer/apps/jobs.py
Comment thread fileglancer/apps/jobs.py Outdated
Comment thread fileglancer/apps/jobs.py Outdated

Copilot AI 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.

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_DIR export 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.py assertions 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.

Comment thread fileglancer/apps/jobs.py Outdated
Comment on lines 881 to 885
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
@mkitti

mkitti commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

I recommend squashing this merge.

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread fileglancer/apps/jobs.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread fileglancer/apps/pixi.py Outdated

# Build the pixi run command
command = f"pixi run {name}"
command = f'pixi run --manifest-path "$FG_MANIFEST_DIR" {name}'
Comment thread fileglancer/apps/jobs.py Outdated
Comment thread tests/test_apps.py Outdated
Comment on lines +2861 to +2862
# FG_MANIFEST_DIR always points at the manifest's directory, so
# pixi-style commands can pass --manifest-path explicitly.
@mkitti

mkitti commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

But I think we still need the unset PIXI_PROJECT_MANIFEST in there for now, because we don't want Fileglancer's manifest leaking into the cluster jobs.

I'm going to fix the ENV leakage on a separate PR.

@krokicki Do we still need to unset the environment variable here or does #408 now address that?

As suggested by Github Copilot
@krokicki

Copy link
Copy Markdown
Member

But I think we still need the unset PIXI_PROJECT_MANIFEST in there for now, because we don't want Fileglancer's manifest leaking into the cluster jobs.
I'm going to fix the ENV leakage on a separate PR.

@krokicki Do we still need to unset the environment variable here or does #408 now address that?

It should be fixed in #408

@mkitti mkitti self-assigned this Jul 20, 2026
@mkitti
mkitti requested a review from krokicki July 20, 2026 20:01
@mkitti

mkitti commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

I think this is ready to merge then.

@krokicki krokicki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested on my Pixi project. LGTM.

@mkitti

mkitti commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

I'll merge this then.

@mkitti
mkitti merged commit 815f8d3 into main Jul 21, 2026
5 checks passed
@mkitti
mkitti deleted the mkitti-pixi-manifest-path branch July 21, 2026 19:47
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.

3 participants