Skip to content

Commit fb3ca17

Browse files
committed
fix: another way of solving the issue may be
1 parent 038e20f commit fb3ca17

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
@@ -169,48 +169,39 @@ jobs:
169169
fetch-depth: 0
170170
repository: DIRACGrid/diracx
171171
path: diracx
172+
# Install the diracx envs first so that pixi 0.68's build_dispatch has
173+
# a conda env (with pixi-build-python's uv) available when the subsequent
174+
# `pixi add` re-solves PyPI source deps. Without this, build_dispatch
175+
# panics with "installation of conda environment is required to solve
176+
# PyPI source dependencies but `--no-install` flag has been set".
172177
- uses: prefix-dev/setup-pixi@v0.9.3
173178
with:
174-
run-install: false
175179
post-cleanup: false
180+
manifest-path: diracx/pixi.toml
181+
environments: >-
182+
diracx-core
183+
diracx-db
184+
diracx-logic
185+
diracx-routers
186+
diracx-client
187+
diracx-api
188+
diracx-cli
176189
- name: Apply workarounds
177190
run: |
178191
cd diracx
179192
# Workaround for https://github.com/prefix-dev/pixi/issues/3762
180193
sed -i.bak 's@editable = true@editable = false@g' pixi.toml
181194
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).
188-
python3 - <<PYEOF
189-
import os, re
190-
pwd = os.environ["PWD"]
191-
addition = (
192-
f'DIRACCommon = {{ path = "{pwd}/../DIRAC/dirac-common", editable = false }}\n'
193-
f'DIRAC = {{ path = "{pwd}/../DIRAC", editable = false }}\n'
194-
f'pytest-github-actions-annotate-failures = "*"\n'
195-
)
196-
text = open("pixi.toml").read()
197-
new_text, n = re.subn(
198-
r"(\[feature\.diracx-core\.pypi-dependencies\]\s*\n)",
199-
r"\1" + addition,
200-
text, count=1,
201-
)
202-
assert n == 1, "Could not find [feature.diracx-core.pypi-dependencies] section"
203-
open("pixi.toml", "w").write(new_text)
204-
PYEOF
195+
# Add annotations to github actions
196+
pixi add --pypi --feature diracx-core pytest-github-actions-annotate-failures
197+
# Add the current DIRAC clone to the pixi.toml
198+
pixi add --pypi --feature diracx-core 'DIRACCommon @ file://'$PWD'/../DIRAC/dirac-common'
199+
pixi add --pypi --feature diracx-core 'DIRAC @ file://'$PWD'/../DIRAC'
205200
# Show any changes
206201
git diff
207202
- uses: prefix-dev/setup-pixi@v0.9.3
208203
with:
209204
cache: false
210-
# We edit pixi.toml above without regenerating pixi.lock, so the
211-
# committed lockfile is stale relative to the working manifest by
212-
# construction. Let pixi regenerate it during install.
213-
locked: false
214205
manifest-path: diracx/pixi.toml
215206
environments: >-
216207
diracx-core

0 commit comments

Comments
 (0)