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

[Dashboards] Fix is_column_break issues #1140

Merged
merged 3 commits into from
Jul 13, 2021

Conversation

DavidRobertAnsart
Copy link
Contributor

@DavidRobertAnsart DavidRobertAnsart commented Jul 12, 2021

Changes

  • This PR fix 2 issues:

    1. is_column_break is optional and should not be set for screenboards:
      The fix is to not add the is_column_break attribute when the value is false. It seems that even if the optional value is not provided, Terraform set its by default to false.

    2. Fix an infinite apply plan with the is_column_break attribute:
      When adding is_column_break to true, the internal TF state dont save it, leading to an infinite plan. This PR save the attribute value in the TF state.

  • Add tests for the Multi-size layout reflow_type property and the is_column_break attribute.

View the changes

I updated lots of cassettes because the is_column_break is not in the dashboard payload by default now.

The first file datadog/resource_datadog_dashboard.go and the last file datadog/tests/resource_datadog_dashboard_test.go are the only one I updated. To view them easily, collapse all files by holding down the alt key and clicking on the inverted caret icon in any file header. Then open only the first and the last file to review them.

@DavidRobertAnsart DavidRobertAnsart requested review from a team as code owners July 12, 2021 08:43
@DavidRobertAnsart DavidRobertAnsart changed the title [Dashboards] Prevent is_column_break not saving in state, causing infinite apply [Dashboards] Fix is_column_break issues Jul 12, 2021
@skarimo
Copy link
Member

skarimo commented Jul 12, 2021

Could you add a test case for is_column_break: true. Thanks!

@DavidRobertAnsart
Copy link
Contributor Author

Could you add a test case for is_column_break: true. Thanks!

Done !

@jirikuncar
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jirikuncar jirikuncar merged commit 648a4ef into master Jul 13, 2021
@jirikuncar jirikuncar deleted the david.robertansart/msl-fix-column-break branch July 13, 2021 13:52
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.

4 participants