-
Notifications
You must be signed in to change notification settings - Fork 43
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
Type error when getting a dashboard #920
Comments
Hey there, reporting on the same issue, I am receiving a similar error with the monitor API. This seems to be specific to version 1.10.0. A few observations:
If I roll back to 1.9: Environment and Versions (please complete the following information): Mac OS Monterey |
Hi, Regarding the dashboard bug, it's a difference between the OpenAPI spec and old backend behavior. Obviously float X doesn't make sense, but it was still stored this way. The monitor issue is completely different. It might be because of additional validation introduced in 1.10. Can you open a different issue? Thanks. |
@therve thanks for the quick answer. do you have any hint on when that bug could be fixed or if there is a way we could mitigate on our side? I see the implementation isn't done in the v2 of the API yet. I worked around the issue by using the http REST endpoint, but I would rather use the client so that I have the Model type of the dashboard returned to me. |
A quick workaround would be to update the dashboard to only have have integers for x and y attributes. |
Thanks for your contribution! This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community. If you would like this issue to remain open:
|
Hey, Any plans to fix it? We hot-fixed it with local retyping float to int here https://github.com/DataDog/datadog-api-client-python/blob/master/src/datadog_api_client/v1/model/widget_layout.py#L85-L86 |
Thanks for your contribution! This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community. If you would like this issue to remain open:
|
This is still an issue with the latest version |
Is it happening on a recent dashboard? Otherwise just editing the dashboard and saving it should fix it. Please contact support so that we can see the problematic dashboard. Thanks. |
@therve Thanks for the reply! It was probably old dashboards, the problem was some of the widgets have x or y coordinate as floats, I managed to fix it by manually editing those dashboards resizing those individual widgets which the new coordinates are integers, not the most efficient solution but it got the work done. |
Thanks for your contribution! This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community. If you would like this issue to remain open:
|
We see this when using dashboards where we've edited the location of the widgets. It's possible that I could resolve it by editing every widget, but simply editing the console and saving it doesn't cause the widgets to snap to integer locations. Would you consider a PR to accept floats like this? |
Thanks for your contribution! This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community. If you would like this issue to remain open:
|
Describe the bug
When trying to retrieve a dashboard by using the call
dashboards_api.get_dashboard(dashboard.get("id"))
, I get an error sayingdatadog_api_client.v1.exceptions.ApiTypeError: Invalid type for variable 'x'. Required value type is int and passed type was float at ['received_data']['widgets'][15]['layout']['x']
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The dashboard is returned with the float value for X
Environment and Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: