{{ message }}
Repository navigation
Commit e76091b
fix(autodiscovery/dockercompose): skip images whose tag is not a version (#9760)
* fix(autodiscovery/dockercompose): skip images whose tag is not a version
NewDockerImageSpecFromImage returns nil when the tag cannot be recognized as
a version, so sourceSpec is nil for any ':latest' or variant-suffixed tag.
Two bugs follow from that, both from inlining code the dockerfile crawler
keeps in a per-image function where `return nil, nil` means "skip this image".
Writing the fallback pattern to sourceSpec.VersionFilter.Pattern dereferences
that nil whenever the crawler also carries a versionfilter, since
GreaterThanPattern fails on the very same tag. dockerfile.go assigns the local
versionFilterPattern instead, which is nil-safe and is also the variable the
template actually reads.
The `return nil, nil` in the template selection ends the whole crawl instead of
skipping one service, discarding every manifest found so far. A single
':latest' service made the crawler emit no pipeline at all for the repository,
exit 0, and say nothing above Info level.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore: rename unparseable to unparsable
Signed-off-by: Olblak <me@olblak.com>
---------
Signed-off-by: Olblak <me@olblak.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Olivier Vernin <olivier@vernin.me>
Co-authored-by: Olblak <me@olblak.com>1 parent 85ad6f7 commit e76091b
3 files changed
Lines changed: 53 additions & 9 deletions
File tree
- pkg/plugins/autodiscovery/dockercompose
- testdata-unparsable-tag
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
140 | 177 | | |
141 | 178 | | |
142 | 179 | | |
| |||
147 | 184 | | |
148 | 185 | | |
149 | 186 | | |
150 | | - | |
151 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
152 | 190 | | |
153 | 191 | | |
154 | 192 | | |
| |||
169 | 207 | | |
170 | 208 | | |
171 | 209 | | |
172 | | - | |
173 | 210 | | |
174 | 211 | | |
175 | | - | |
176 | 212 | | |

0 commit comments