If DNS resolution fails, is retried, and then is successful, then updating a flake will use the incorrect path. #1170

Open
opened 2026-03-28 19:17:54 +00:00 by 9p4 · 0 comments

Describe the bug

Running nix flake update when DNS is not online but comes online on the second try causes flake updates for Lix to use paths ending in main.tar.gz?narHash=... instead of a stable identifier.

Steps To Reproduce

I'm not sure how to mimic a DNS delay for the first query.

  1. Run nix flake update lix with a DNS server that has >5 second delay for first query
  2. Lix should resolve correctly on attempt two.
  3. Observe different URL (https://git.lix.systems/lix-project/lix/archive/main.tar.gz) in flake.lock

Expected behavior

I expect the retry to return the correct Lix repo URL ie https://git.lix.systems/api/v1/repos/lix-project/lix/archive/...b1.tar.gz?rev=... instead of https://git.lix.systems/lix-project/lix/archive/main.tar.gz

nix --version output

nix (Lix, like Nix) 2.96.0-dev-pre20260319-dev_774f957
System type: x86_64-linux
Additional system types: aarch64-linux, i686-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/ersei/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/ersei/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/ersei/etc/xdg/nix/nix.conf:/home/ersei/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/ersei/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/ersei/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/s7ys1ksrmr42d9vm2nnl9sry49b084mf-lix-2.96.0-dev-pre20260319-dev_774f957/share

Additional context

dnscrypt-proxy2 is my broken DNS resolver that has trouble after suspend with timeouts...

## Describe the bug Running `nix flake update` when DNS is not online but comes online on the second try causes flake updates for Lix to use paths ending in `main.tar.gz?narHash=...` instead of a stable identifier. ## Steps To Reproduce I'm not sure how to mimic a DNS delay for the first query. 1. Run `nix flake update lix` with a DNS server that has >5 second delay for first query 2. Lix should resolve correctly on attempt two. 3. Observe different URL (`https://git.lix.systems/lix-project/lix/archive/main.tar.gz`) in flake.lock ## Expected behavior I expect the retry to return the correct Lix repo URL ie `https://git.lix.systems/api/v1/repos/lix-project/lix/archive/...b1.tar.gz?rev=...` instead of `https://git.lix.systems/lix-project/lix/archive/main.tar.gz` ## `nix --version` output ``` nix (Lix, like Nix) 2.96.0-dev-pre20260319-dev_774f957 System type: x86_64-linux Additional system types: aarch64-linux, i686-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/ersei/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/ersei/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/ersei/etc/xdg/nix/nix.conf:/home/ersei/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/ersei/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/ersei/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/s7ys1ksrmr42d9vm2nnl9sry49b084mf-lix-2.96.0-dev-pre20260319-dev_774f957/share ``` ## Additional context dnscrypt-proxy2 is my broken DNS resolver that has trouble after suspend with timeouts...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1170
No description provided.