-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a workaround for null values in the tag list #2544
Conversation
1db7248
to
d78c244
Compare
The fix was confirmed at containers/skopeo#2409 (comment) , ready for review. |
d78c244
to
c7f2a04
Compare
Signed-off-by: Miloslav Trmač <[email protected]>
c7f2a04
to
7d3dfc6
Compare
// Per https://github.com/containers/skopeo/issues/2409 , Sonatype Nexus 3.58, contrary | ||
// to the spec, may include JSON null values in the list; and Go silently parses them as "". | ||
if tag == "" { | ||
logrus.Debugf("Ignoring invalid empty tag") |
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.
Would it make sense to show which tag was it? Might help with some debugging efforts.
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.
Albeit, not sure if at all possible to do so.
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.
We just get a null
in an array; the server does not tell us why it included a null
.
(We could, with some extra effort, get the raw null
value instead of ""
, and be able to report whether we got one or the other, but I don’t think that is all that much more helpful. If we did want to include more details, I’d be tempted to just dump an escaped version of the response body as is, instead of trying to parse it.
Ultimately, this is all a debug-level log that users are not expected to see unless they are specially looking for it.)
/approve |
Motivated by containers/skopeo#2409 .
Untested so far.