wrench: index.json lists files that do not exist in the server #1416

Open
opened 2025-03-23 08:08:04 +00:00 by heysokam · 9 comments
heysokam commented 2025-03-23 08:08:04 +00:00 (Migrated from github.com)

Unsure where this issue belongs.

I come referenced from this link directing me into wrench
https://github.com/mlugg/setup-zig/tree/main?tab=readme-ov-file#adding-a-mirror

Tested yesterday and today (23.mar.2025)
Almost every link listed at https://github.com/mlugg/setup-zig/blob/main/mirrors.json is missing the files for 0.14.0.

Yet, all of their index.json data contains direct links to non-existing *0.14.0.[zip/tar] files with urls pointing to their domains.

This leads me to think that something in their tooling is populating their index.json correctly, but not uploading the actual tarballs.

The mirror hosted by machengine does work correctly, though.
I don't know if those links are using wrench, but I don't know where to start and setup-zig is pointing me in this direction.
So I figured you guys might have some insight.

Unsure where this issue belongs. I come referenced from this link directing me into wrench https://github.com/mlugg/setup-zig/tree/main?tab=readme-ov-file#adding-a-mirror _Tested yesterday and today (23.mar.2025)_ Almost every link listed at https://github.com/mlugg/setup-zig/blob/main/mirrors.json is missing the files for `0.14.0`. Yet, all of their index.json data contains direct links to non-existing `*0.14.0.[zip/tar]` files with urls pointing to their domains. This leads me to think that something in their tooling is populating their index.json correctly, but not uploading the actual tarballs. The mirror hosted by machengine does work correctly, though. I don't know if those links are using wrench, but I don't know where to start and setup-zig is pointing me in this direction. So I figured you guys might have some insight.
emidoots commented 2025-03-23 16:31:01 +00:00 (Migrated from github.com)

Got example links?

Got example links?
heysokam commented 2025-03-23 19:22:36 +00:00 (Migrated from github.com)

Got example links?

@emidoots Yea, here are some json arrays of the hits for the servers at:
https://github.com/mlugg/setup-zig/blob/main/mirrors.json

Unable to fetch:

[
{
  shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982",
  size: "49091960",
  tarball: "https://zigmirror.nesovic.dev/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
  zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
},
{
  shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982",
  size: "49091960",
  tarball: "https://zigmirror.hryx.net/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
  zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
},
{
  shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982",
  size: "49091960",
  tarball: "https://zig.linus.dev/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
  zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
},
{
  shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982",
  size: "49091960",
  tarball: "https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
  zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
}
]

Works:

[
{
  tarball: "https://fs.liujiacai.net/zigbuilds/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
  shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982",
  size: "49091960",
},
{
  shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982",
  size: "49091960",
  tarball: "https://pkg.machengine.org/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
  zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
}
]
> Got example links? @emidoots Yea, here are some json arrays of the hits for the servers at: https://github.com/mlugg/setup-zig/blob/main/mirrors.json Unable to fetch: ```json [ { shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982", size: "49091960", tarball: "https://zigmirror.nesovic.dev/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", }, { shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982", size: "49091960", tarball: "https://zigmirror.hryx.net/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", }, { shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982", size: "49091960", tarball: "https://zig.linus.dev/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", }, { shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982", size: "49091960", tarball: "https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", } ] ``` Works: ```json [ { tarball: "https://fs.liujiacai.net/zigbuilds/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982", size: "49091960", }, { shasum: "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982", size: "49091960", tarball: "https://pkg.machengine.org/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", zigTarball: "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz", } ]
kaynetik commented 2025-03-24 06:27:10 +00:00 (Migrated from github.com)

One of the reasons why I added a status page => https://status.nesovic.dev/history/zig-mirror
A few weeks back I experienced a wrench issue. When I get some spare time I'll investigate why the 0.14.0 didn't propagate as expected. @heysokam

One of the reasons why I added a status page => https://status.nesovic.dev/history/zig-mirror A few weeks back I experienced a wrench issue. When I get some spare time I'll investigate why the `0.14.0` didn't propagate as expected. @heysokam
0t4u commented 2025-03-24 11:59:08 +00:00 (Migrated from github.com)

It seems that wrench has cached a 404 response as this shows up in the logs:
zig: not fetching: https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz (cached error bad response status: 404 Not Found).

I have restarted wrench and now the file (https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz) should exist and download correctly. Please let me know if this works.

It seems that wrench has cached a 404 response as this shows up in the logs: `zig: not fetching: https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz (cached error bad response status: 404 Not Found)`. I have restarted wrench and now the file (https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz) should exist and download correctly. Please let me know if this works.
heysokam commented 2025-03-24 12:03:58 +00:00 (Migrated from github.com)

@0t4u Can confirm your link now works.

ᛝ confy: Zig: Done requesting url:  https://zig.nekos.space/zig/index.json?source=confy
ᛝ confy: Zig: Done downloading:  zig.index.json from:  https://zig.nekos.space/zig/index.json?source=confy
ᛝ confy: Zig: Done requesting url:  https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz.minisig?source=confy
ᛝ confy: Zig: Done downloading:  zig-linux-x86_64-0.14.0.tar.xz.minisig from:  https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz.minisig?source=confy
ᛝ confy: Zig: Done requesting url:  https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz?source=confy
ᛝ confy: Zig: Done downloading:  zig-linux-x86_64-0.14.0.tar.xz from:  https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz?source=confy
@0t4u Can confirm your link now works. ```md ᛝ confy: Zig: Done requesting url: https://zig.nekos.space/zig/index.json?source=confy ᛝ confy: Zig: Done downloading: zig.index.json from: https://zig.nekos.space/zig/index.json?source=confy ᛝ confy: Zig: Done requesting url: https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz.minisig?source=confy ᛝ confy: Zig: Done downloading: zig-linux-x86_64-0.14.0.tar.xz.minisig from: https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz.minisig?source=confy ᛝ confy: Zig: Done requesting url: https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz?source=confy ᛝ confy: Zig: Done downloading: zig-linux-x86_64-0.14.0.tar.xz from: https://zig.nekos.space/zig/0.14.0/zig-linux-x86_64-0.14.0.tar.xz?source=confy ```
linusg commented 2025-03-24 17:06:42 +00:00 (Migrated from github.com)

I have restarted wrench and now the file should exist and download correctly. Please let me know if this works.

I've done the same for my mirror, can confirm this solves the issue.

> I have restarted wrench and now the file should exist and download correctly. Please let me know if this works. I've done the same for my mirror, can confirm this solves the issue.
kaynetik commented 2025-03-24 18:32:35 +00:00 (Migrated from github.com)

Same issues as it seems:

Mar 24 18:29:35 critical-infra-z0sc.europe-west6-c.c.tfstate-3bdaa5ed.internal wrench[664]: 2025-03-24T18:29:35Z zig: not fetching: https://ziglang.org/download/0.14.0/zig-linux-aarch64-0.14.0.tar.xz.minisig (cached error bad response status: 404 Not Found)
Mar 24 18:29:35 critical-infra-z0sc.europe-west6-c.c.tfstate-3bdaa5ed.internal wrench[664]: 2025-03-24T18:29:35Z zig:
Mar 24 18:29:35 critical-infra-z0sc.europe-west6-c.c.tfstate-3bdaa5ed.internal wrench[664]: 2025-03-24T18:29:35Z zig: error downloading file: bad response status: 404 Not Found

Restarting fixes it.

If you know of something a bit more stable than wrench, feel free to recommend. Would like to have it stable and not think about the mirror... 😂

Same issues as it seems: ```bash Mar 24 18:29:35 critical-infra-z0sc.europe-west6-c.c.tfstate-3bdaa5ed.internal wrench[664]: 2025-03-24T18:29:35Z zig: not fetching: https://ziglang.org/download/0.14.0/zig-linux-aarch64-0.14.0.tar.xz.minisig (cached error bad response status: 404 Not Found) Mar 24 18:29:35 critical-infra-z0sc.europe-west6-c.c.tfstate-3bdaa5ed.internal wrench[664]: 2025-03-24T18:29:35Z zig: Mar 24 18:29:35 critical-infra-z0sc.europe-west6-c.c.tfstate-3bdaa5ed.internal wrench[664]: 2025-03-24T18:29:35Z zig: error downloading file: bad response status: 404 Not Found ``` Restarting fixes it. If you know of something a bit more stable than wrench, feel free to recommend. Would like to have it stable and not think about the mirror... 😂
linusg commented 2025-03-24 18:38:53 +00:00 (Migrated from github.com)

Bugs happen, that statement isn't particularly productive. When I last checked wrench was the only software providing a Zig mirror OOTB.

Bugs happen, that statement isn't particularly productive. When I last checked wrench was the only software providing a Zig mirror OOTB.
0t4u commented 2025-03-24 18:45:41 +00:00 (Migrated from github.com)

It should be (in theory) relatively simple to add a check to see if the file path with the cached 404 corresponds to an entry in the index file and refetch, I'll see if I can throw together a PR tonight.

It should be (in theory) relatively simple to add a check to see if the file path with the cached 404 corresponds to an entry in the index file and refetch, I'll see if I can throw together a PR tonight.
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
hexops/mach#1416
No description provided.