Repository navigation
Commit 8efb067
committed
feat(hack): emit a disable list so a normal variant installs only what a run needs
select-install.sh has computed the forward dependency closure for a set
of E2E suites since #3279, and nothing has ever consumed it. The reason
it stalled was a wrong assumption, mine included until this was checked:
that installing only the closure needs a new "minimal" platform variant,
because the bundles emit their catalogue wholesale and enabledPackages
is additive.
It does not. The base package helper in
packages/core/platform/templates/_helpers.tpl consults
bundles.disabledPackages for EVERY package, not only the ones declared
optional through package.optional, and nothing in the chart emits a
Package by any other route. So an ordinary variant reduces to the
closure by subtraction, with no new variant and no chart change at all.
This adds `--disabled`, which emits the complement: every PackageSource
the platform knows, minus the closure. For the postgres suite that is 21
kept and 78 disabled out of 99, of which 6 are PackageSources no bundle
emits anyway, so the real reduction is 72.
The closure now seeds a platform baseline alongside the engine:
cozystack-basics, tenant-application, and the etcd, ingress, monitoring
and seaweedfs applications. None of them carries a dependsOn edge from
any app, so the graph walk cannot reach them, yet
hack/e2e-install-cozystack.bats waits for the root Tenant and those
HelmReleases before any suite runs, and the suites themselves live in
tenant-root and reach seaweedfs-s3.tenant-root for object storage.
Without the seed the reduced platform has nowhere to install anything
and the install times out -- a graph-shaped answer that is nonetheless
wrong, which is what the seed list exists for.
Subtraction is safe by construction rather than by care. The closure is
a forward walk over dependsOn, so anything a kept package needs is
already inside it and cannot appear in the complement. A test asserts
that over every suite in hack/e2e-chainsaw rather than on one named
pair: an earlier version pinned backupstrategy-controller dependsOn
velero, which no closure can reach because nothing declares an edge TO
backupstrategy-controller, so it asserted nothing at all.
An empty selection refuses instead of answering, since the complement of
an empty closure is the entire platform -- the same class of
silently-wrong answer #3392 removed from the suite selector. The refusal
sits before the existing `[ -z "$seeds" ] && exit 0`, because in closure
mode an empty answer is legitimate.
Two limits are documented in the script rather than discovered later.
Subtraction governs a fresh install only: both package defines stamp
helm.sh/resource-policy: keep, so on a live cluster the Package CR stops
being emitted but the installed package stays. And packages emitted
through package.optional need bundles.enabledPackages as well, so
keeping one in the closure does not install it.
Proven at the rendering level: the new
packages/core/platform/tests/selective_install_test.yaml renders the
bundles with the real disable list and checks that postgres-application
survives in the app catalogue, postgres-operator and tenant-application
survive in the system bundle, mariadb-operator and kafka-operator are
gone, and the five fail() guards across the iaas and naas bundles do not
trip. The disable case is the one that goes red when the helper is
mutated to ignore disabledPackages; the others are guards and say so.
The list is held in one YAML anchor -- it was pasted five times before,
450 of 565 lines, with nothing keeping the copies in step.
Not wired into the E2E lane here. That needs the list in the Package CR
hack/e2e-install-cozystack.bats applies, plus a live run to confirm the
reduced platform reaches Ready and to measure how much of the 27-minute
install it saves, which is unmeasured -- the system bundle stays whole.
Assisted-By: Claude <[email protected]>
Signed-off-by: Myasnikov Daniil <[email protected]>1 parent dc2e427 commit 8efb067
3 files changed
Lines changed: 394 additions & 10 deletions
File tree
- hack
- packages/core/platform/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
21 | 45 | | |
22 | 46 | | |
23 | 47 | | |
| |||
43 | 67 | | |
44 | 68 | | |
45 | 69 | | |
46 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
47 | 81 | | |
48 | 82 | | |
49 | 83 | | |
| |||
191 | 225 | | |
192 | 226 | | |
193 | 227 | | |
194 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
195 | 239 | | |
196 | 240 | | |
197 | 241 | | |
| |||
200 | 244 | | |
201 | 245 | | |
202 | 246 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
208 | 281 | | |
209 | 282 | | |
210 | 283 | | |
| |||
220 | 293 | | |
221 | 294 | | |
222 | 295 | | |
223 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
0 commit comments