Commit bc9edcb
chore(dev): tag locally-built dev images :dev-<sha> instead of :latest
Under OBOL_DEVELOPMENT, both the manifest rewrite (internal/defaults) and the
image build (internal/stack) used a shared, mutable `<image>:latest` tag. On a
host running more than one obol-stack worktree against the same Docker daemon,
one worktree's build silently overwrites :latest and a different worktree's
`obol stack up` then deploys the wrong binary — observed during rc9 QA, where a
sibling branch's serviceoffer-controller (reading a per-purchase Secret this
branch's RBAC doesn't grant) poisoned an unrelated stack and presented as a
hang, not an obvious image mismatch.
Tag dev images with `dev-<short-git-sha>` instead:
- defaults.DevImageTag() = dev-<sha> of the working tree (`latest` fallback when
not a git checkout, preserving prior behaviour for tarball builds).
- CopyInfrastructure stamps the rendered manifests with the dev tag AND persists
it to $CONFIG_DIR/.dev-image-tag, so internal/stack builds/imports the exact
tag the cluster pins — even if HEAD moves between `stack init` and `stack up`.
- Different branches/worktrees get distinct tags (no cross-worktree poisoning);
committing changes the SHA and triggers a fresh build; uncommitted changes
reuse the committed tag unless OBOL_FORCE_REBUILD_LOCAL_DEV_IMAGES is set.
Validated: go test ./... (33 pkgs); `obol stack init` (dev) rewrites both the
controller and buyer pins to :dev-<sha> with no leftover @sha256 and persists the
tag; `docker build -t …:dev-<sha>` + `k3d image import` succeed (the exact
build/import path buildAndImportLocalImages runs).1 parent a63d043 commit bc9edcb
3 files changed
Lines changed: 116 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
30 | 72 | | |
31 | 73 | | |
32 | 74 | | |
| |||
63 | 105 | | |
64 | 106 | | |
65 | 107 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
72 | 115 | | |
73 | | - | |
| 116 | + | |
| 117 | + | |
74 | 118 | | |
75 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
76 | 123 | | |
77 | 124 | | |
78 | 125 | | |
| |||
106 | 153 | | |
107 | 154 | | |
108 | 155 | | |
109 | | - | |
| 156 | + | |
110 | 157 | | |
111 | 158 | | |
112 | 159 | | |
| |||
122 | 169 | | |
123 | 170 | | |
124 | 171 | | |
125 | | - | |
| 172 | + | |
126 | 173 | | |
127 | 174 | | |
128 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
45 | 57 | | |
46 | | - | |
| 58 | + | |
47 | 59 | | |
48 | 60 | | |
49 | 61 | | |
| |||
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
58 | | - | |
59 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
60 | 73 | | |
61 | | - | |
62 | | - | |
| 74 | + | |
| 75 | + | |
63 | 76 | | |
64 | | - | |
| 77 | + | |
65 | 78 | | |
66 | 79 | | |
67 | 80 | | |
68 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
69 | 101 | | |
70 | 102 | | |
71 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1144 | 1151 | | |
1145 | 1152 | | |
1146 | 1153 | | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1147 | 1158 | | |
1148 | 1159 | | |
1149 | 1160 | | |
| |||
1163 | 1174 | | |
1164 | 1175 | | |
1165 | 1176 | | |
1166 | | - | |
| 1177 | + | |
1167 | 1178 | | |
1168 | | - | |
| 1179 | + | |
1169 | 1180 | | |
1170 | 1181 | | |
1171 | 1182 | | |
1172 | | - | |
| 1183 | + | |
1173 | 1184 | | |
1174 | 1185 | | |
1175 | 1186 | | |
1176 | 1187 | | |
1177 | 1188 | | |
1178 | 1189 | | |
1179 | | - | |
| 1190 | + | |
1180 | 1191 | | |
1181 | 1192 | | |
1182 | 1193 | | |
1183 | 1194 | | |
1184 | 1195 | | |
1185 | 1196 | | |
1186 | | - | |
| 1197 | + | |
1187 | 1198 | | |
1188 | 1199 | | |
1189 | 1200 | | |
| |||
0 commit comments