Skip to content

Commit b0eca8f

Browse files
authored
Merge pull request #8545 from aldbr/fix-pixi-lock-diracccommon
chore: fix workaround for pixi
2 parents ff89be1 + 537fd13 commit b0eca8f

1 file changed

Lines changed: 19 additions & 28 deletions

File tree

.github/workflows/basic.yml

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -171,52 +171,43 @@ jobs:
171171
path: diracx
172172
- uses: prefix-dev/setup-pixi@v0.9.3
173173
with:
174-
run-install: false
174+
cache: false
175175
post-cleanup: false
176+
manifest-path: diracx/pixi.toml
177+
environments: >-
178+
diracx-core
179+
diracx-db
180+
diracx-logic
181+
diracx-tasks
182+
diracx-routers
183+
diracx-client
184+
diracx-api
185+
diracx-cli
176186
- name: Apply workarounds
177187
run: |
178188
cd diracx
179189
# Workaround for https://github.com/prefix-dev/pixi/issues/3762
180190
sed -i.bak 's@editable = true@editable = false@g' pixi.toml
181191
rm pixi.toml.bak
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
192+
sed -i.bak '/solve-group = "gubbins"/d' pixi.toml
193+
rm pixi.toml.bak
194+
# Add annotations to github actions
195+
pixi add --pypi --feature diracx-core pytest-github-actions-annotate-failures
196+
# Add the current DIRAC clone to the pixi.toml
197+
pixi add --pypi --feature diracx-core 'DIRACCommon @ file://'$PWD'/../DIRAC/dirac-common'
198+
pixi add --pypi --feature diracx-core 'DIRAC @ file://'$PWD'/../DIRAC'
206199
# Show any changes
207200
git diff
208201
- uses: prefix-dev/setup-pixi@v0.9.3
209202
with:
210203
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.
214204
locked: false
215205
manifest-path: diracx/pixi.toml
216206
environments: >-
217207
diracx-core
218208
diracx-db
219209
diracx-logic
210+
diracx-tasks
220211
diracx-routers
221212
diracx-client
222213
diracx-api

0 commit comments

Comments
 (0)