Skip to content
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

Update error responses according to Fleetlock spec #9

Merged
merged 3 commits into from
Oct 21, 2020

Conversation

olivierlemasle
Copy link
Contributor

@olivierlemasle olivierlemasle commented Oct 20, 2020

Remarks:

  • According to Fleetlock spec, the error kinds must have a bounded/small cardinality. If you have suggestions regarding the kinds or their wording, please let me know.
  • I've added the testify library. I do not like bringing new test dependencies, however assert.JSONEq is quite useful. I can drop the library if you prefer.
  • I've fixed a small error: in error message
    s.log.WithFields(fields).Errorf("fleetlock: error obtaining reboot lease: %v", err)

    err was nil because it was defined in the if statement.

Copy link
Member

@dghubble dghubble left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this. Left some comments. Also, can you structure your commits to have the fleetlock error encoding change in one commit, and the vendor in the second commit?

internal/decode.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/handlers.go Outdated Show resolved Hide resolved
internal/error_test.go Outdated Show resolved Hide resolved
@dghubble
Copy link
Member

Thanks

@olivierlemasle olivierlemasle deleted the errors branch October 21, 2020 07:56
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