Comments (15)
👋 from a Datadog engineer on the team which owns this part of the API. It's not ideal, but there are a few places in the timeboard/screenboard APIs where we return strings when floats or ints would make more sense. Fixing this will require a new version of the endpoint so it's not planned for the near term, but we've got it on the backlog to include with future work we have planned for dashboards. Thanks for bringing this to our attention!
from go-datadog-api.
Almost one year since first raised...
Are we any nearer a workaround or fix?
(I arrived here from https://github.com/terraform-providers/terraform-provider-datadog/issues/19 )
from go-datadog-api.
Hey everyone, I'm an engineer in the dashboards team. We've been at work on the resolution for this issue.
This specific occurrence is limited in scope since it's unusual for us to change the type of a field, we do not foresee further instances of this happening in the future. More importantly, we're taking steps to guard against this type of occurrences as we 1. add type validation on every submitted field, which has been the standard for newer endpoints 2. clean up invalid occurrences in our data.
This process will take a while since it's likely users are still submitting invalid definitions through api, hence we need to have a grace period as we get in touch with everyone. You should see no more instances of this bug after the operation is complete. In the meantime we suggest you remove min / max fields if they are set to 'auto', just like @yfronto did. Your dashboards will be unaffected by this change.
Thanks everyone for raising the issue.
from go-datadog-api.
Ah interesting. It makes me a bit sad to think about making this a string and have the user be responsible to parse it. Is that the only way?
from go-datadog-api.
Really, it's unfortunate that Datadog allows a value that's already the default to be explicitly set to the default.
Hard to say the right approach here:
Option 1
- Change to strings and make everyone sad
Option 2
- Leave the struct as-is
- Have a custom UnmarshalJSON with a temp struct of strings
- Evaluate if strings are nil or equal to "auto", and only set Yaxis values if not
Option 3
- Similar to Option 2, but add some bools to the struct to indicate a IsAuto property
Option 1 makes everyone sad. Option 2 will cause additions of "auto" in the UI to not propagate in (in the Terraform provider, for example). Option 3 breaks parity with the JSON that the API supports, but it does allow the "auto" value to propagate both ways. I suppose there could be an Option 4 that is use custom types for Min and Max that are made of a float and an "auto" bool.
from go-datadog-api.
I'm leaning towards Option 4. @yfronto / @zorkian what are your thoughts?
@yfronto just checking; this never worked as expected, did it?
from go-datadog-api.
I put together a quick PR for Option 4.
from go-datadog-api.
I need to improve my GH notification filtering. I see PRs but I guess not comments very quickly. :(
Anyway, I think Option 4 is probably the best if we can make it work with the accessor generation stuff. And possibly also a sad email to Datadog saying that this kind of thing, while valid in JSON, makes dealing with it in typed languages kind of hard.
from go-datadog-api.
@ojongerius see #104. I had a chance to spend a few minutes on this today, but the problem is that there needs to be some exclusivity to the Auto *bool and the Value *float64 (we want setting one to clobber the other). It might be doable by using struct field tags in the declaration of OptionalFloat64 and having gen-accessors.go use reflect to find the tags and generate special accessors, but that seems messy.
My workaround has been to have someone manually go through each dashboard in the UI and remove the "auto" setting manually, but the failure condition is still there.
from go-datadog-api.
@robinbowes sorry mate, still waiting for someone to volunteer time to fix this one.
Consider setting a bounty if you feel a strong need to get this fixed.
from go-datadog-api.
@samanthadrago Did this issue make it off your backlog yet?
@ojongerius I'd dig in and have a go myself if I thought I could.
from go-datadog-api.
@robinbowes I'm no longer on that team but let me ping someone who is and see if they can weigh in!
from go-datadog-api.
@samanthadrago Thanks - much appreciated.
from go-datadog-api.
Hi Ivan,
Thanks for the update.
Can you possibly let us know when this issue is fixed?
R.
from go-datadog-api.
I believe #167 has addressed this issue. Feel free to reopen if that's not the case.
from go-datadog-api.
Related Issues (20)
- Adding a simple CLI utility that would expose functionality of this library HOT 1
- `GetIncludeTags()` defaults to `false` while API doc says the default is `true` HOT 1
- GetEvents() does not support the 'unaggregated' API argument HOT 1
- Help with PostMetrics HOT 1
- /v1/dashboard to get all dashboards is missing HOT 1
- Feature Request: Webhook Integration support HOT 4
- GetDashboard Fails Fatal When Scatterplot Exists in Dashboard HOT 5
- https://app.datadoghq.com/api/v1/validate endpoint returns HTML for non-valid api keys HOT 2
- Allow Retry Logic On Synthetics Tests HOT 1
- getDashboards and other operations use deprecated endpoints HOT 1
- Support for roles
- Is any plan to support "/v1/dashboard" API? HOT 2
- Allow for related_event_id on the Event struct
- [Feature request] Force deletion of monitors HOT 1
- Widget ID is too large for int
- ServiceLevelObjectiveHistory generates error during unmarshalling
- Log Stream Widget - Indexes
- Allow insecure certificates is not supported HOT 1
- GetMonitor does not support the group_states parameter HOT 1
- Any plans to add go.mod file HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-datadog-api.