Skip to content

feat: sync Address review findings across recent auto-sync PRs - #97

Closed
starburstdata-automation wants to merge 1 commit into
mainfrom
auto-sync-2026-07-10-b8ab9f7
Closed

feat: sync Address review findings across recent auto-sync PRs #97
starburstdata-automation wants to merge 1 commit into
mainfrom
auto-sync-2026-07-10-b8ab9f7

Conversation

@starburstdata-automation

Copy link
Copy Markdown
Collaborator

Automated sync from terraform-provider-galaxy-generation repository.

Source commit: b8ab9f7badff321c109369a71a981375663175f7

This PR contains the latest generated provider code from the generation repository.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The changes prevent POST requests from being retried, add coverage for HTTP 500 responses, and stabilize Terraform resource state with plan modifiers. Cluster state persistence and URI mapping were adjusted. Data sources now validate provider configuration, report malformed results, and propagate conversion diagnostics. Role privilege import scope validation is entity-specific, and owner descriptions now refer to schemas and tables accurately.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: syncing review-fix updates across recent auto-sync provider PRs.
Description check ✅ Passed The description is clearly related, describing an automated sync of generated provider code from the source repository.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
internal/provider/mongodb_catalog_resource.go (1)

21-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Silent no-op risk if catalog_id is renamed/retyped by codegen; consider a shared helper.

The type assertion guards correctly today, but if a future schema regeneration renames catalog_id or changes its attribute kind, this block becomes a silent no-op — quietly reintroducing the exact "known after apply" destroy/recreate bug this change is meant to fix, with no compiler or runtime signal. This same guarded-assignment pattern is duplicated verbatim across every catalog/resource file in this PR (mysql, postgresql, s3, sqlserver, service_account, service_account_password, etc.).

Consider extracting a small helper, e.g.:

func applyUseStateForUnknown(attrs map[string]schema.Attribute, name string) {
	attr, ok := attrs[name].(schema.StringAttribute)
	if !ok {
		panic(fmt.Sprintf("expected %q to be a StringAttribute for UseStateForUnknown", name))
		// or: log via tflog and skip, depending on desired failure mode
	}
	attr.PlanModifiers = append(attr.PlanModifiers, stringplanmodifier.UseStateForUnknown())
	attrs[name] = attr
}

This both removes the duplication and turns future schema drift into a fast, loud failure instead of a silent regression.

Also applies to: 79-89


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: fbbe97f1-3c9f-47c3-b2f7-40db07246ee2

📥 Commits

Reviewing files that changed from the base of the PR and between 86b1864 and af60b67.

📒 Files selected for processing (34)
  • docs/data-sources/schema.md
  • docs/data-sources/table.md
  • internal/client/client.go
  • internal/client/client_test.go
  • internal/provider/bigquery_catalog_resource.go
  • internal/provider/cassandra_catalog_resource.go
  • internal/provider/cluster_resource.go
  • internal/provider/column_mask_resource.go
  • internal/provider/data_product_resource.go
  • internal/provider/data_quality_check_data_source.go
  • internal/provider/data_quality_check_resource.go
  • internal/provider/data_quality_checks_data_source.go
  • internal/provider/data_quality_schedule_data_source.go
  • internal/provider/datasource_schema/schema_data_source_gen.go
  • internal/provider/datasource_table/table_data_source_gen.go
  • internal/provider/evaluation_data_source.go
  • internal/provider/gcs_catalog_resource.go
  • internal/provider/groups_data_source.go
  • internal/provider/mongodb_catalog_resource.go
  • internal/provider/mysql_catalog_resource.go
  • internal/provider/opensearch_catalog_resource.go
  • internal/provider/policy_resource.go
  • internal/provider/postgresql_catalog_resource.go
  • internal/provider/redshift_catalog_resource.go
  • internal/provider/role_privilege_grant_resource.go
  • internal/provider/role_resource.go
  • internal/provider/row_filter_resource.go
  • internal/provider/s3_catalog_resource.go
  • internal/provider/service_account_password_resource.go
  • internal/provider/service_account_resource.go
  • internal/provider/snowflake_catalog_resource.go
  • internal/provider/sqlserver_catalog_resource.go
  • internal/provider/tag_resource.go
  • internal/provider/usage_example_data_source.go

Comment on lines +63 to +74
attr.PlanModifiers = []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
}
s.Attributes["data_product_id"] = attr
}

// created_on is assigned at creation and never changes. Without UseStateForUnknown, any update
// to the data product causes Terraform to mark created_on as "known after apply".
if attr, ok := s.Attributes["created_on"].(schema.StringAttribute); ok {
attr.PlanModifiers = []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Add the missing planmodifier import.

planmodifier.String at Lines 63 and 72 is undefined, so CI cannot compile this package. Import github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier.

🧰 Tools
🪛 GitHub Actions: CI / 0_ci.txt

[error] 63-63: Go build failed: undefined: planmodifier (internal/provider/data_product_resource.go:63:26).

🪛 GitHub Actions: CI / ci

[error] 63-63: Go build failed: internal/provider/data_product_resource.go:63:26: undefined: planmodifier

🪛 GitHub Check: ci

[failure] 72-72:
undefined: planmodifier


[failure] 63-63:
undefined: planmodifier

Source: Linters/SAST tools

@bradyburke

Copy link
Copy Markdown
Collaborator

closing, build fix addressed in #98

@bradyburke bradyburke closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants