Commit 65bc77d
committed
Replace allowed-refs.json with ref-statuses.json
As far as stable versions of Nix Flake Checker are concerned, a Nixpkgs
branch is considered supported if it meets the following criteria:
1. The branch is connected to a channel.
2. The branch’s status is not "unmaintained".
3. The branch’s status is not "beta".
Before this change, here’s how Nix Flake Checker would enforce those
criteria:
1. An API request was made to get a list of channels. Refs were only
considered if they were on that list [1].
2. Refs would only get added to allowed-refs.json if their current field
was set to "1" [1]. (The current field gets set to "0" for
unmaintained channels and "1" for all other channels [2].)
3. The Nix Flake Checker project was careful about when it released
updates that contained changes to allowed-refs.json. Specifically,
updates to allowed-refs.json would stay in the main branch and
not be released while Nixpkgs channels were in beta.
This change replaces allowed-refs.json with ref-statuses.json.
allowed-refs.json contained a list of supported Nixpkgs branches.
ref-statuses.json contains a list of Nixpkgs branches along with their
current status ("rolling", "beta", "stable", "deprecated" or
"unmaintained").
Here’s how Nix Flake Checker now enforces those same criteria:
1. Unchanged.
2. All channel branches get added to ref-statuses.json regardless of
whether or not they’re supported. Nix Flake Checker checks if a
branch’s status is "unmaintained" at runtime.
3. Nix Flake Checker checks if a branch’s status is "beta" at runtime.
The main motivation behind this change is to make it easier to create a
future commit. That future commit will allow users to access a branch’s
status via a CEL variable. As an added bonus, this change also makes it
so that the Nix Flake Checker project doesn’t have to be careful about
releasing updates while there’s Nixpkgs branches that are in beta.
[1]: src/allowed_refs.rs
[2]: <https://github.com/NixOS/infra/blob/ae9b362fe0d92cff76c0b5404d0bcec59dd322cb/build/pluto/prometheus/exporters/channel-exporter.py#L78>1 parent ca7cfb3 commit 65bc77d
File tree
10 files changed
+161
-134
lines changed- .github/workflows
- src
10 files changed
+161
-134
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | | - | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
174 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| |||
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
204 | | - | |
205 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| |||
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
224 | | - | |
225 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
226 | 230 | | |
227 | 231 | | |
228 | 232 | | |
| |||
275 | 279 | | |
276 | 280 | | |
277 | 281 | | |
278 | | - | |
279 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
280 | 285 | | |
281 | 286 | | |
282 | 287 | | |
| |||
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
306 | | - | |
307 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
308 | 314 | | |
309 | 315 | | |
310 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
100 | 117 | | |
101 | | - | |
102 | | - | |
| 118 | + | |
| 119 | + | |
103 | 120 | | |
104 | 121 | | |
105 | 122 | | |
| |||
134 | 151 | | |
135 | 152 | | |
136 | 153 | | |
| 154 | + | |
| 155 | + | |
137 | 156 | | |
138 | 157 | | |
139 | 158 | | |
| |||
168 | 187 | | |
169 | 188 | | |
170 | 189 | | |
171 | | - | |
| 190 | + | |
172 | 191 | | |
173 | 192 | | |
174 | 193 | | |
175 | 194 | | |
176 | | - | |
| 195 | + | |
177 | 196 | | |
178 | 197 | | |
179 | 198 | | |
180 | | - | |
| 199 | + | |
181 | 200 | | |
182 | 201 | | |
183 | | - | |
| 202 | + | |
184 | 203 | | |
185 | 204 | | |
186 | | - | |
187 | | - | |
| 205 | + | |
| 206 | + | |
188 | 207 | | |
189 | 208 | | |
190 | | - | |
191 | | - | |
| 209 | + | |
| 210 | + | |
192 | 211 | | |
193 | 212 | | |
194 | | - | |
195 | | - | |
| 213 | + | |
| 214 | + | |
196 | 215 | | |
197 | 216 | | |
198 | 217 | | |
199 | 218 | | |
200 | 219 | | |
201 | 220 | | |
202 | | - | |
| 221 | + | |
203 | 222 | | |
204 | 223 | | |
205 | 224 | | |
206 | 225 | | |
207 | 226 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
213 | 230 | | |
214 | | - | |
| 231 | + | |
215 | 232 | | |
216 | 233 | | |
217 | | - | |
| 234 | + | |
218 | 235 | | |
219 | 236 | | |
220 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
221 | 240 | | |
222 | 241 | | |
223 | 242 | | |
224 | 243 | | |
225 | | - | |
| 244 | + | |
226 | 245 | | |
227 | 246 | | |
228 | 247 | | |
| |||
0 commit comments