From d3a5fd613735a69678079c1244ea40245db4d12f Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Wed, 31 Dec 2025 13:22:57 +0000 Subject: [PATCH] ci: fetch dependencies before evaluate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: mlmuvqqtptltptrpoplrqrskvkxuptzn Due to what I suspect must be either an npins or a lix bug, we get this error when evaluating our configuration on new machines: … while fetching the input 'git+https://gerrit.wikimedia.org/r/mediawiki/extensions/AdvancedSearch?rev=398c9fa782843d8b3aeaa5ebb1c1b3db35c3382f' error: Cannot find Git revision '398c9fa782843d8b3aeaa5ebb1c1b3db35c3382f' in ref 'refs/heads/master' of repository 'https://gerrit.wikimedia.org/r/mediawiki/extensions/AdvancedSearch'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit. Now, this is what I'd expect - because we're not meant to be fetching master of this extension - we're meant to be fetching a branch! By using npins to prefetch all dependencies, we get around this. Due to a nilla bug, fetching dependencies is required for evaluation anyway - so this isn't too much more of an issue than it would already have been... --- .tangled/workflows/packetmix-build.yml | 4 ++++ .tangled/workflows/packetmix-release.yml | 4 ++++ .tangled/workflows/packetmix-treefmt.yaml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.tangled/workflows/packetmix-build.yml b/.tangled/workflows/packetmix-build.yml index 1771614f..5e20a6a0 100644 --- a/.tangled/workflows/packetmix-build.yml +++ b/.tangled/workflows/packetmix-build.yml @@ -12,6 +12,7 @@ dependencies: - lix - gnugrep - openssh + - npins steps: - name: Get remote builds SSH key @@ -37,6 +38,9 @@ steps: echo "extra-experimental-features = nix-command" >> /etc/nix/nix.conf echo "max-jobs = 0" >> /etc/nix/nix.conf echo "builders = ssh-ng://remoteBuilds@midnight?ssh-key=/tmp/key-ssh-remote-build x86_64-linux" >> /etc/nix/nix.conf + - name: Fetch dependencies + command: | + npins update --partial - name: Evaluate all systems command: | set +e diff --git a/.tangled/workflows/packetmix-release.yml b/.tangled/workflows/packetmix-release.yml index d6fc6577..7e61b600 100644 --- a/.tangled/workflows/packetmix-release.yml +++ b/.tangled/workflows/packetmix-release.yml @@ -12,6 +12,7 @@ dependencies: - lix - gnugrep - openssh + - npins steps: - name: Get remote builds SSH key @@ -44,6 +45,9 @@ steps: echo "extra-experimental-features = nix-command" >> /etc/nix/nix.conf echo "max-jobs = 0" >> /etc/nix/nix.conf echo "builders = ssh-ng://remoteBuilds@midnight?ssh-key=/tmp/key-ssh-remote-build x86_64-linux" >> /etc/nix/nix.conf + - name: Fetch dependencies + command: | + npins update --partial - name: Evaluate all systems command: | set +e diff --git a/.tangled/workflows/packetmix-treefmt.yaml b/.tangled/workflows/packetmix-treefmt.yaml index 47debd92..1735ced5 100644 --- a/.tangled/workflows/packetmix-treefmt.yaml +++ b/.tangled/workflows/packetmix-treefmt.yaml @@ -12,6 +12,7 @@ dependencies: nixpkgs: - lix - openssh + - npins steps: - name: Get remote builds SSH key @@ -37,6 +38,9 @@ steps: echo "extra-experimental-features = nix-command" >> /etc/nix/nix.conf echo "sandbox = false" >> /etc/nix/nix.conf echo "max-jobs = 0" >> /etc/nix/nix.conf + - name: Fetch dependencies + command: | + npins update --partial - name: Ensure files are formatted with treefmt command: | set -e -- 2.43.0