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

Exporter: Don't generate resources with empty names #3345

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Mar 7, 2024

Changes

Very often we emit resources that don't exist on the backend, and this creates incorrect resources without actual data. Typically this happens when objects are deleted but still referenced from jobs, dashboards, etc.

This PR skips the generation of resources where the name is the required attribute but it's empty in the state, meaning that resource doesn't exist on the backend. This is done for the following resources:

  • databricks_sql_query
  • databricks_sql_endpoint
  • `databricks_sql_alert
  • databricks_catalog
  • databricks_schema
  • databricks_volume
  • databricks_sql_table
  • databricks_registered_model

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

Very often we emit resources that don't exist in backend, and this creates incorrect
resources without actual data. Typically this happens when objects are deleted, but still
referenced from jobs, dashboards, etc.

This PR skips generation of resources where the `name` is required attribute but it's
empty in the state, meaning that resource doesn't exist on the backend.  This is done for
the following resources:

* `databricks_sql_query`
* `databricks_sql_endpoint`
* `databricks_sql_alert
* `databricks_catalog`
* `databricks_schema`
* `databricks_volume`
* `databricks_sql_table`
* `databricks_registered_model`
@alexott alexott requested review from a team as code owners March 7, 2024 10:16
@alexott alexott requested review from hectorcast-db and removed request for a team March 7, 2024 10:16
@alexott alexott added this pull request to the merge queue Mar 7, 2024
Merged via the queue into main with commit 600c1c3 Mar 7, 2024
5 checks passed
@alexott alexott deleted the exporter-ignore-empty-uc-objects branch March 7, 2024 10:24
@hectorcast-db hectorcast-db mentioned this pull request Mar 28, 2024
@alexott alexott added the exporter TF configuration generator label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter TF configuration generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants