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

[graph-editor] Add support for WidgetCustomLink is_hidden and override_label properties #1062

Merged
merged 26 commits into from
Jun 8, 2021

Conversation

qincchen
Copy link
Contributor

@qincchen qincchen commented May 11, 2021

** Motivation
Terraform change to support new context menu link override functionality.

API spec change: https://github.com/DataDog/datadog-api-spec/pull/971/

@qincchen qincchen requested review from a team as code owners May 11, 2021 15:05
@qincchen qincchen requested a review from a team as a code owner May 13, 2021 15:25
"override_label": {
Description: "The label id that refers to a context menu link item",
Type: schema.TypeString,
Optional: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could not use ConflictsWith property here due to custom_link being in a list.

See hashicorp/terraform-plugin-sdk#71

@qincchen qincchen changed the title [graph-editor] Add support for context menu override for custom_links [graph-editor] Change Dashboard WidgetCustomLink properties May 17, 2021
Required: true,
Optional: true,
},
"is_hidden": {
Copy link
Member

Choose a reason for hiding this comment

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

For the most part it looks good to me. The perpetual diff when both are set might be something we have to live with. Not sure of any viable/clean workarounds unless the rest of the team has any ideas. Could you also add a tests for the new fields please. Thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

@skarimo what causes the perpetual diff ?

Copy link
Member

Choose a reason for hiding this comment

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

Chatted outside of the Github issue but to close the loop here, the perpetual diff is caused when both label and label_override is set.

We can keep the behavior as is but let's document that both fields should not be set at the same time.

datadog/resource_datadog_dashboard.go Outdated Show resolved Hide resolved
datadog/resource_datadog_dashboard.go Outdated Show resolved Hide resolved
@skarimo
Copy link
Member

skarimo commented Jun 8, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@skarimo skarimo merged commit ec7fc69 into master Jun 8, 2021
@skarimo skarimo deleted the qin.chen/ctx-menu-link branch June 8, 2021 15:03
@skarimo skarimo changed the title [graph-editor] Change Dashboard WidgetCustomLink properties [graph-editor] Add support for WidgetCustomLink is_hidden and override_label properties Jun 17, 2021
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.

3 participants