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

promote Bigqueryconnection to v1beta1 API #3100

Merged

Conversation

600lyy
Copy link
Member

@600lyy 600lyy commented Nov 5, 2024

Change description

Promote bigqueryconnection API to v1beta1

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

@600lyy
Copy link
Member Author

600lyy commented Nov 5, 2024

@jingyih pls review

@600lyy 600lyy force-pushed the bigqueryconnection-api-beta branch from dab77ef to 409cfa4 Compare November 5, 2024 19:56
@@ -1188,7 +1188,7 @@ X-Xss-Protection: 0

{
"cloudSql": {
"database": "sqldatabase-sample-${uniqueId}",
"database": "projects/${projectId}/instances/sqlinstance-sample-${uniqueId}/databases/sqldatabase-sample-${uniqueId}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is unexpected. I don't think this works with real GCP API? My understanding is that the underlying GCP API expects the name of the database.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tested it against real GCP API and it turns out the database field can be either just the name of database, or the name in the form project/instance/database

Copy link
Member Author

Choose a reason for hiding this comment

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

According to the API doc, this field is just the name of db

apis/refs/v1beta1/sqldatabaseref.go Show resolved Hide resolved
apis/refs/v1beta1/sqldatabaseref.go Show resolved Hide resolved
@jingyih jingyih added this to the 1.125 milestone Nov 5, 2024
@600lyy 600lyy force-pushed the bigqueryconnection-api-beta branch from 409cfa4 to 65ee2e7 Compare November 6, 2024 10:25
Copy link
Collaborator

@jingyih jingyih left a comment

Choose a reason for hiding this comment

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

The only blocking comment is that we need to update the alpha API and regenerate the CRD. Other comments can be addressed in a followup PR.

apis/bigqueryconnection/v1alpha1/connection_types.go Outdated Show resolved Hide resolved
external: ${PROJECT_ID?}
cloudSpanner:
databaseRef:
name: bigqueryconnection-dep
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: name should be bigqueryconnectionconnection-dep. Same for the other dependencies.

Copy link
Member Author

Choose a reason for hiding this comment

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

According to the document, the length of name cannot exceed max 15 characters

projectRef:
# Replace ${PROJECT_ID?} with your project ID
external: ${PROJECT_ID?}
spark: {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we create a "DataprocCluster" for this sample? (Can be a followup PR)

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently, Mockgcp service for Dataproc has not been implemented. Thus I suggest we add this in a followup PR

@jingyih
Copy link
Collaborator

jingyih commented Nov 6, 2024

@maqiuyujoyce @yuwenma How do we handle the URI skeleton test when we migrate a resource to direct? Currently the unit test panics.

- ExpectedSkeleton: null
ResourceConfigId: BigQueryConnectionConnection
URI: "https://bigqueryconnection.googleapis.com/v1/projects/kcc-test/locations/us-central1/connections/my-connection"

@600lyy 600lyy force-pushed the bigqueryconnection-api-beta branch from e0f9fc2 to 3af2766 Compare November 7, 2024 08:46
@yuwenma
Copy link
Collaborator

yuwenma commented Nov 7, 2024

/approve
/lgtm

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuwenma

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

The pull request process is described here

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

@google-oss-prow google-oss-prow bot merged commit 885f4af into GoogleCloudPlatform:master Nov 7, 2024
18 checks passed
@600lyy 600lyy deleted the bigqueryconnection-api-beta branch November 7, 2024 19:22
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