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] Fix panic caused by incorrect values in the cluster policies #4585

Merged
merged 3 commits into from
Mar 26, 2025

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Mar 18, 2025

Changes

The cluster policy is supposed to use string type for value and defaultValue fields of the cluster policy, so explicit cast was done in the code. But it caused the crash when reading an incorrectly specific cluster policy (the user error). This PR checks if interface type is correct before casting

Tests

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

@alexott alexott requested review from a team as code owners March 18, 2025 09:38
@alexott alexott requested review from hectorcast-db and removed request for a team March 18, 2025 09:38
@alexott alexott temporarily deployed to test-trigger-is March 18, 2025 09:39 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is March 18, 2025 09:39 — with GitHub Actions Inactive
@alexott alexott changed the title [Exporter[ Fix panic caused by incorrect values in the cluster policies [Exporter] Fix panic caused by incorrect values in the cluster policies Mar 18, 2025
@alexott alexott requested a review from mgyucht March 18, 2025 11:24
@alexott alexott temporarily deployed to test-trigger-is March 19, 2025 08:47 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is March 19, 2025 08:47 — with GitHub Actions Inactive
alexott added 2 commits March 21, 2025 16:28
The cluster policy is supposed to use `string` type for `value` and `defaultValue` fields
of the cluster policy, so explicit cast was done in the code. But it caused the crash when
reading an incorrectly specific cluster policy (the user error).  This PR checks if
interface type is correct before casting
@nkvuong nkvuong force-pushed the exporter/fix-panic-cluster-policies branch from e0848f0 to f5544f8 Compare March 21, 2025 08:28
@nkvuong nkvuong temporarily deployed to test-trigger-is March 21, 2025 08:28 — with GitHub Actions Inactive
@nkvuong nkvuong temporarily deployed to test-trigger-is March 21, 2025 08:29 — with GitHub Actions Inactive
@nkvuong nkvuong enabled auto-merge March 21, 2025 09:08
@alexott alexott temporarily deployed to test-trigger-is March 26, 2025 10:43 — with GitHub Actions Inactive
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 4585
  • Commit SHA: 756a76260c35c69e1aa5a2d54c650462b62e3b30

Checks will be approved automatically on success.

@alexott alexott temporarily deployed to test-trigger-is March 26, 2025 10:44 — with GitHub Actions Inactive
@nkvuong nkvuong added this pull request to the merge queue Mar 26, 2025
Merged via the queue into main with commit 7f8effb Mar 26, 2025
12 checks passed
@nkvuong nkvuong deleted the exporter/fix-panic-cluster-policies branch March 26, 2025 14:05
deco-sdk-tagging bot added a commit that referenced this pull request Apr 1, 2025
## Release v1.71.0

### New Features and Improvements

 * Mark GKE-related fields for `databricks_mws_workspaces` and `databricks_mws_networks` as deprecated([#4531](#4531)).
 * Add support for `CAN_VIEW` permission level in `databricks_permissions`, which can be assigned to `databricks_sql_endpoint` ([#4464](#4464)).
 * Add support for `aws-us-gov-dod` (AWS Govcloud DoD shard) ([#4594](5ac0111))

### Bug Fixes

 * Recreate `databricks_access_control_rule_set` when the `name` changes ([#4572](#4572)).
 * Avoid timeouts during `databricks_mount` state refresh and creation ([#4590](#4590)).

### Documentation

 * Improve documentation for `databricks_access_control_rule_set` ([#4580](#4580)).
 * Correct `first_on_demand` documentation for `aws_attributes` in `databricks_cluster`.
 * Added file events permissions to GCP external location documentation. ([#4415](#4415)).
 * Improve description of `metric` field in `databricks_job` resource [#4595](#4595)

### Exporter

 * Add support for special selectors in `-listing` and `-services` [#4573](#4573)
 * Fix incorrect reference to model serving endpoint [#4588](#4588)
 * Allow the selective export of `databricks_mws_permission_assignment`, and change its service name to `idfed` instead of `access` ([#4571](#4571))
  * Fix panic caused by incorrect values in the cluster policies ([#4585](#4585))

### Internal Changes

* Bump Go SDK version to 0.61.0 ([#4602](#4602))
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.

2 participants