Skip to content

Conversation

@jaer-tsun
Copy link
Contributor

What this PR does / why we need it:

  • We only want to return an error when CNI prints the Error struct to stdout. If the Error struct doesn't exist then the operation is considered successful.
  • Updating Circle CI to use Golang v1.12.6

Test
Azure Batch has tested and confirmed that this resolved their problem with unmarshal errors affecting attach network API.

@jaer-tsun jaer-tsun force-pushed the ignoreUnmarshalErr branch from 902ba54 to 21662d3 Compare July 9, 2019 16:53
} else if len(output) > 0 {
var cniError cniTypes.Error
if err = json.Unmarshal(output, &cniError); err == nil && cniError.Code != 0 {
if unmarshalErr := json.Unmarshal(output, &cniError); unmarshalErr == nil && cniError.Code != 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the change here? I see err renamed to unmarshalErr

Copy link
Member

@tamilmani1989 tamilmani1989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jaer-tsun jaer-tsun merged commit 0b54688 into Azure:master Jul 9, 2019
@jaer-tsun jaer-tsun deleted the ignoreUnmarshalErr branch July 9, 2019 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants