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

[ISSUE] Issue with databricks_quality_monitor resource #4518

Closed
martin-walsh opened this issue Feb 21, 2025 · 0 comments · Fixed by #4519
Closed

[ISSUE] Issue with databricks_quality_monitor resource #4518

martin-walsh opened this issue Feb 21, 2025 · 0 comments · Fixed by #4519

Comments

@martin-walsh
Copy link
Contributor

Configuration

data "databricks_table" "cleaned_events_table" {
  name = "my_catalog.my_schema.cleaned_events"
}

resource "databricks_sql_endpoint" "monitoring_serverless" {
  name = "my-serverless-warehouse-for-monitoring"

  cluster_size   = "2X-Small"
  auto_stop_mins = 1

  enable_serverless_compute = true
}

resource "databricks_quality_monitor" "cleaned_events_timeseries_monitor" {
  table_name         = data.databricks_table.cleaned_events_table.name
  assets_dir         = join(
    "/",
    [
      data.databricks_current_user.terraform_user.home,
      "some",
      "path",
      "to",
      "files",
    ]
  )
  warehouse_id       = databricks_sql_endpoint.monitoring_serverless.id
  output_schema_name =  "my_catalog.my_schema"
  time_series {
    granularities = ["1 day"]
    timestamp_col = "my_timestamp_col"
  }

  schedule {
    quartz_cron_expression = "0 0 4 * * ?"
    timezone_id = "UTC"
  }
}

Expected Behavior

Deploy should succeed.

Actual Behavior

Error when deploying quality monitor:

│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to databricks_quality_monitor.cleaned_events_timeseries_monitor, provider "provider[\"registry.terraform.io/databricks/databricks\"]"
│ produced an unexpected new value: .warehouse_id: was cty.StringVal("109a725fd8187d7e"), but now null.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Steps to Reproduce

  1. terraform apply

Terraform and provider versions

- databricks/databricks v1.66.0

Is it a regression?

Unsure.

Debug Output

N/A. Environment is locked down.

Important Factoids

N/A.

Would you like to implement a fix?

Not sure where the problem lies, but happy to help if directed.

alexott added a commit that referenced this issue Feb 22, 2025
The quality monitor Get API doesn't return attributes `warehouse_id` and
`skip_builtin_dashboard` that are set by Create API, so this lead to the configuration
drift and errors.  We can backfill them from the existing state.

Resolves #4518
alexott added a commit that referenced this issue Feb 25, 2025
The quality monitor Get API doesn't return attributes `warehouse_id` and
`skip_builtin_dashboard` that are set by Create API, so this lead to the configuration
drift and errors.  We can backfill them from the existing state.

Resolves #4518
alexott added a commit that referenced this issue Feb 25, 2025
The quality monitor Get API doesn't return attributes `warehouse_id` and
`skip_builtin_dashboard` that are set by Create API, so this lead to the configuration
drift and errors.  We can backfill them from the existing state.

Resolves #4518
github-merge-queue bot pushed a commit that referenced this issue Feb 26, 2025
…r` (#4519)

## Changes
<!-- Summary of your changes that are easy to understand -->

The quality monitor Get API doesn't return attributes `warehouse_id` and
`skip_builtin_dashboard` set by the Create API, leading to configuration
drift and errors. We can backfill them from the existing state.

Resolves #4518

## Tests
<!-- 
How is this tested? Please see the checklist below and also describe any
other relevant tests
-->

- [x] `make test` run locally
- [ ] relevant change in `docs/` folder
- [ ] covered with integration tests in `internal/acceptance`
- [ ] using Go SDK
- [ ] using TF Plugin Framework
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant