Skip to content

Commit ff89be1

Browse files
authored
Merge pull request #8540 from aldbr/fix-pixi-lock-diracccommon
chore: CI workaround for pixi 0.68
2 parents 69c7e5a + 13a7312 commit ff89be1

2 files changed

Lines changed: 31 additions & 5 deletions

File tree

.github/workflows/basic.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

docs/docs.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ no_inherited_members =
3131
DIRAC.Core.Utilities.Graphs.GraphUtilities,
3232
DIRAC.DataManagementSystem.private.HttpStorageAccessHandler,
3333
DIRAC.FrameworkSystem.private.standardLogging.LogLevels,
34+
DIRAC.Resources.IdProvider.OAuth2IdProvider,
35+
DIRAC.Resources.IdProvider.CheckInIdProvider,
36+
DIRAC.Resources.IdProvider.IAMIdProvider,
3437

3538
# only creating dummy files, because they cannot be safely imported due to sideEffects
3639
create_dummy_files = lfc_dfc_copy, lfc_dfc_db_copy, JobWrapperTemplate, JobWrapperOfflineTemplate

0 commit comments

Comments
 (0)