Commit 706bcf2
committed
pull,load: use *Image instead of re-resolving via name
Following commit fixes a `race` condition in `libimage` because in `Pull(`
after performing `copy` from remote sources it agains attempts to resolve
image via `LookupImage`, any operation between `copy` and `LookupImage` can remove
`name` from the recently pulled image. Causing race in builds.
This issue was discoverd while working on PR containers/buildah#5971
```
buildah build -t test --jobs=2 --skip-unused-stages=false .
```
Containerfile
```
FROM quay.io/jitesoft/alpine
RUN arch
FROM --platform=linux/arm64 quay.io/jitesoft/alpine AS foreign
```
Following commit also addresses the commit containers@e2324dd
by performing the neccessary refactor.
No functional change in public exposed API, exisiting tests should pass as-is.
[NO NEW TESTS NEEDED]
Signed-off-by: flouthoc <[email protected]>1 parent a56094c commit 706bcf2
3 files changed
+99
-85
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
71 | 67 | | |
72 | | - | |
| 68 | + | |
73 | 69 | | |
74 | 70 | | |
75 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
145 | | - | |
| 148 | + | |
| 149 | + | |
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| |||
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
166 | | - | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| |||
0 commit comments