Skip to content

Conversation

@stephencompall-DA
Copy link
Contributor

Make it possible to use #1050 on devnet now, which is the fix for #1060.

Pull Request Checklist

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

* SV1_SCAN_BIGQUERY env option

* remove bqdatastream cleanup, just leave the user alive

Revocations still not enough:

 -  gcp:sql:User sv-1-user-bqdatastream deleting (1s) error:   sdk-v2/provider2.go:566: sdk.helper_schema: Error, failed to deleteuser bqdatastream in instance sv-1-cn-apps-pg-2964ec6: googleapi: Error 400: Invalid request: failed to delete user bqdatastream: . role "bqdatastream" cannot be dropped because some objects depend on it Details: 32 objects in database scan_sv_1., invalid: provider=google-beta@8.32.1

Signed-off-by: Stephen Compall <stephen.compall@digitalasset.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR backports support for the "SV1_SCAN_BIGQUERY" flag and refactors SQL command generation for Cloud SQL operations.

  • Introduces a new environment flag (SV1_SCAN_BIGQUERY) to add conditional BigQuery scan configurations in svConfigs.ts.
  • Adds a "retainOnDelete: true" option when creating a Cloud SQL replicator user and extracts common SQL command segments into the new function databaseCommandBracket in bigQuery.ts.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cluster/pulumi/common-sv/src/svConfigs.ts Adds new BigQuery scan configuration controlled by the SV1_SCAN_BIGQUERY flag
cluster/pulumi/canton-network/src/bigQuery.ts Refactors SQL command construction by extracting header/footer into a helper and adds a retention flag for Cloud SQL
Comments suppressed due to low confidence (2)

cluster/pulumi/common-sv/src/svConfigs.ts:18

  • [nitpick] Consider adding an inline comment to explain the purpose of the SV1_SCAN_BIGQUERY flag and its impact on scan configuration, which would improve code readability and maintenance.
const sv1ScanBigQuery = spliceEnvConfig.envFlag('SV1_SCAN_BIGQUERY', false);

cluster/pulumi/canton-network/src/bigQuery.ts:332

  • [nitpick] Consider renaming the function 'databaseCommandBracket' to a more descriptive name (e.g., 'sqlCommandWrapper') along with renaming the returned 'header' and 'footer' variables to reflect their role in constructing SQL commands.
function databaseCommandBracket(postgres: CloudPostgres) {

Copy link
Contributor

@isegall-da isegall-da left a comment

Choose a reason for hiding this comment

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

tnx

@stephencompall-DA stephencompall-DA merged commit 7cfa5c1 into release-line-0.4.1 Jun 11, 2025
110 of 113 checks passed
@stephencompall-DA stephencompall-DA deleted the s11/1060-bq-env-cleanup-0.4.1 branch June 11, 2025 20:45
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.

3 participants