Skip to content

Add structured reporting diff to BigQueryAnalyticsHubDataExchange#6774

Merged
cheftako merged 2 commits into
GoogleCloudPlatform:masterfrom
anhdle-sso:fix-6540
Mar 18, 2026
Merged

Add structured reporting diff to BigQueryAnalyticsHubDataExchange#6774
cheftako merged 2 commits into
GoogleCloudPlatform:masterfrom
anhdle-sso:fix-6540

Conversation

@anhdle-sso

@anhdle-sso anhdle-sso commented Feb 24, 2026

Copy link
Copy Markdown
Collaborator

BRIEF Change description

Fixes a bug in the BigQueryAnalyticsHub DataExchange controller, adds structured diff reporting for updates, and updates tests to cover all mutable fields.

Fixes #6540

WHY do we need this change?

The Update method in the DataExchange controller had several issues that needed to be addressed for correctness and standard compliance:

  1. Missing Structured Diff Reporting: Added structuredreporting.Diff to improve visibility into resource changes during reconciliation.
  2. Incorrect Comparison for discoveryType: The previous implementation compared a string pointer with a proto enum string incorrectly. It now compares the converted proto values.
  3. Inconsistent Type Comparisons: Refactored the Update logic to convert the desired state to its proto representation earlier. This ensures that field comparisons are performed between the same types (proto to proto), avoiding potential DeepEqual failures due to type mismatches.
  4. Incorrect Object for setStatus: Updated the setStatus call to use the correct unstructured object from the UpdateOperation, ensuring status updates are correctly persisted.
  5. Insufficient Test Coverage: Updated the bigqueryanalyticshubdataexchange-full test fixture to include changes to all mutable fields (displayName, description, etc.) to verify the fix and ensure all fields are correctly updated in GCP.

Special notes for your reviewer:

Does this PR add something which needs to be 'release noted'?

NONE

Additional documentation e.g., references, usage docs, etc.:

NONE

Intended Milestone

  • Reviewer tagged PR with the actual milestone.

Tests you have done

  • Run make ready-pr to ensure this PR is ready for review.
  • Perform necessary E2E testing for changed resources.

@anhdle-sso

Copy link
Copy Markdown
Collaborator Author

@acpana pls do first round review.

@cheftako cheftako left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good.

@cheftako cheftako added this pull request to the merge queue Mar 18, 2026
@google-oss-prow google-oss-prow Bot added the lgtm label Mar 18, 2026
@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheftako

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Merged via the queue into GoogleCloudPlatform:master with commit a86a418 Mar 18, 2026
166 checks passed
@cheftako cheftako added this to the 1.148 milestone Mar 20, 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.

Add structured reporting diff to BigQueryAnalyticsHubDataExchange (pkg/controller/direct/bigqueryanalyticshub/dataexchange_controller.go)

3 participants