Commit 2deb962
authored
✨ feat: Discover mixtapes dynamically via registry catalog (#51)
## Summary
- Replaces the hardcoded `knownMixtapes` list in
`pkg/mixtapes/registry.go` with a live `/v2/_catalog` query via
`go-containerregistry`'s `remote.Catalog`, filtering to the `mixtapes/`
prefix
- Falls back to a minimal offline list (`coder`) if the registry is
unreachable, with a 10s timeout on the catalog query
- Sorts `coder` first via a `priorityMixtapes` map since it's currently
the only mixtape with a working multi-arch `:latest` manifest; remaining
repos sort alphabetically
## Why
The hardcoded list was stale (`coder-arm64`, `coder-x86`) and didn't
reflect what's actually published at `download.stereos.ai` (`coder`,
`coder-arm64`, `opencode-mixtape`). New mixtapes required a code change
+ release to surface in `mb mixtapes list`. This depends on the upstream
`/v2/_catalog` pagination fix in speaker-wire (Link header termination),
which is already deployed.
## Test plan
- [x] `go build ./pkg/mixtapes/` clean
- [x] `mb mixtapes list` against live `download.stereos.ai` returns all
3 published repos with `coder` first
- [x] `mb mixtapes list coder` walks tags successfully (`latest`,
`dev-0f0941e`)
- [x] Fallback path returns `coder` when registry is unreachable
Signed-off-by: Matt Yeazel <matt@papercompute.com>1 parent 0583118 commit 2deb962
1 file changed
Lines changed: 80 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
20 | 32 | | |
21 | 33 | | |
22 | 34 | | |
| |||
30 | 42 | | |
31 | 43 | | |
32 | 44 | | |
33 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
34 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
35 | 65 | | |
36 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
37 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
38 | 109 | | |
39 | 110 | | |
40 | 111 | | |
41 | 112 | | |
42 | | - | |
| 113 | + | |
43 | 114 | | |
44 | 115 | | |
45 | 116 | | |
| |||
0 commit comments