-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Do not fail on non RFC3339 labels but log warning #2084
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment, otherwise LGTM
Do we know what wrong formats they typically use? As @squaremo mentioned in Slack, we could maybe try to accommodate those other formats as well, by trying to parse them as a fallback. |
@2opremio CentOS images use a custom I am personally opposed to support anything different than what the spec defines, as it would stimulate people not following rules in a way, and the specs we support clearly state:
I also do not think this will be an issue for any user in case they do not have (direct) control over what is defined in the labels, as we safely fallback to the timestamp the registry gives us. |
Makes sense. It may be worth reporting it to (or even creating a PR against) https://github.com/CentOS/CentOS-Dockerfiles |
Actually, this is the repo https://github.com/CentOS/sig-cloud-instance-images |
It has been mentioned in an issue there about a year ago, just did not find the time yet to submit a PR. Some other reasons that came to mind about not supporting different timestamps:
|
Upstream PR CentOS/sig-cloud-instance-build#151 |
306fc35
to
3622a69
Compare
Some image vendors have not read the spec properly and pass along a timestamp in a different format than RFC3339. Before this change the unmarshal of the JSON would fail for those labels and the affected images would be excluded from our cache. We now include those images in our cache and collect all labels that failed parsing in a custom error, which we detect and log (instead of bailing out).
3622a69
to
877a750
Compare
LGTM |
Some image vendors have not read the spec properly and pass along
a timestamp in a different format than RFC3339. Before this change
the unmarshal of the JSON would fail for those labels and the affected
images would be excluded from our cache.
We now include those images in our cache and collect all labels that
failed parsing in a custom error, which we detect and log (instead
of bailing out).
Addresses #2075, but in a stricter way.