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

Fix slo threshold warning value modified when storing the state #352

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

mzneos
Copy link
Contributor

@mzneos mzneos commented Oct 28, 2019

The value of the warning field in the threshold object was set to 0 instead of being omitted when the pointer value was nil.

This raised an error when updating a service level objective resource, as the value of warning must always be greater than the slo.
This error is not raised on creation of the resource because the warning field is only modified in the resourceDatadogServiceLevelObjectiveRead function, modifying the state after the creation of the resource.

@ghost ghost added the size/XS label Oct 28, 2019
Copy link
Contributor

@nmuesch nmuesch left a comment

Choose a reason for hiding this comment

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

Since this field is optional in the schema, this looks good to me (and in line with how we access other optional fields). Thanks for the catch/fix !

@nmuesch nmuesch merged commit ad64da6 into DataDog:master Oct 30, 2019
@tustvold
Copy link

tustvold commented Jan 15, 2020

Any chance of getting a patch release for this, the bug makes the optional field not so optional as it prevents updating the resource...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants