@@ -179,16 +179,39 @@ jobs:
179179 # Workaround for https://github.com/prefix-dev/pixi/issues/3762
180180 sed -i.bak 's@editable = true@editable = false@g' pixi.toml
181181 rm pixi.toml.bak
182- # Add annotations to github actions
183- pixi add --pypi --feature diracx-core pytest-github-actions-annotate-failures
184- # Add the current DIRAC clone to the pixi.toml
185- pixi add --pypi --feature diracx-core 'DIRACCommon @ file://'$PWD'/../DIRAC/dirac-common'
186- pixi add --pypi --feature diracx-core 'DIRAC @ file://'$PWD'/../DIRAC'
182+ # Inject the local DIRAC/DIRACCommon clones (and the GHA annotations
183+ # plugin) as test-time pypi deps. We edit pixi.toml directly rather
184+ # than via `pixi add`: that command has no --environment scope, so
185+ # mutating the diracx-core feature ripples to every env using it,
186+ # including gubbins. Gubbins is unnecessary for this job and brittle
187+ # on pixi 0.68.x (build-dispatch panics, and the resulting lockfile
188+ # also fails the next `pixi install --locked`).
189+ python3 - <<PYEOF
190+ import os, re
191+ pwd = os.environ["PWD"]
192+ addition = (
193+ f'DIRACCommon = {{ path = "{pwd}/../DIRAC/dirac-common", editable = false }}\n'
194+ f'DIRAC = {{ path = "{pwd}/../DIRAC", editable = false }}\n'
195+ f'pytest-github-actions-annotate-failures = "*"\n'
196+ )
197+ text = open("pixi.toml").read()
198+ new_text, n = re.subn(
199+ r"(\[feature\.diracx-core\.pypi-dependencies\]\s*\n)",
200+ r"\1" + addition,
201+ text, count=1,
202+ )
203+ assert n == 1, "Could not find [feature.diracx-core.pypi-dependencies] section"
204+ open("pixi.toml", "w").write(new_text)
205+ PYEOF
187206 # Show any changes
188207 git diff
189208 - uses : prefix-dev/setup-pixi@v0.9.3
190209 with :
191210 cache : false
211+ # We edit pixi.toml above without regenerating pixi.lock, so the
212+ # committed lockfile is stale relative to the working manifest by
213+ # construction. Let pixi regenerate it during install.
214+ locked : false
192215 manifest-path : diracx/pixi.toml
193216 environments : >-
194217 diracx-core
0 commit comments