Commit 775095b
committed
fix: pass backend image fallback tags via system state instead of env vars
Instead of setting environment variables in run.go (which InstallBackends
cannot access), pass the configuration through the SystemState struct.
Changes:
- Added BackendImagesReleaseTag, BackendImagesBranchTag, and
BackendDevSuffix fields to the Backend struct in pkg/system/state.go
- Added WithBackendImagesReleaseTag, WithBackendImagesBranchTag, and
WithBackendDevSuffix SystemStateOptions functions
- Modified run.go to pass these options via systemStateOpts slice
- Updated getFallbackTagValues in gallery/backends.go to accept
systemState parameter and read values from it first, falling back
to environment variables
This follows the reviewer's request to pass-by configuration to
InstallBackends instead of setting environment variables.1 parent f222a29 commit 775095b
3 files changed
Lines changed: 58 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| 113 | + | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| |||
272 | 276 | | |
273 | 277 | | |
274 | 278 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | 279 | | |
286 | | - | |
287 | | - | |
| 280 | + | |
288 | 281 | | |
289 | | - | |
| 282 | + | |
290 | 283 | | |
291 | 284 | | |
292 | | - | |
| 285 | + | |
293 | 286 | | |
294 | 287 | | |
295 | | - | |
| 288 | + | |
296 | 289 | | |
297 | 290 | | |
298 | | - | |
299 | | - | |
300 | 291 | | |
301 | 292 | | |
302 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 41 | | |
47 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
48 | 65 | | |
49 | 66 | | |
50 | 67 | | |
| |||
58 | 75 | | |
59 | 76 | | |
60 | 77 | | |
| 78 | + | |
| 79 | + | |
61 | 80 | | |
62 | 81 | | |
63 | 82 | | |
| |||
172 | 191 | | |
173 | 192 | | |
174 | 193 | | |
175 | | - | |
176 | | - | |
| 194 | + | |
| 195 | + | |
177 | 196 | | |
178 | 197 | | |
179 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
46 | 67 | | |
47 | 68 | | |
48 | 69 | | |
| |||
0 commit comments