-
Notifications
You must be signed in to change notification settings - Fork 246
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
fix: datasetRef is not a required field in BigQueryDataTransferConfig #3777
fix: datasetRef is not a required field in BigQueryDataTransferConfig #3777
Conversation
@@ -291,7 +291,7 @@ func (a *Adapter) Update(ctx context.Context, updateOp *directbase.UpdateOperati | |||
if !reflect.DeepEqual(desired.DataSourceId, a.actual.DataSourceId) { | |||
return fmt.Errorf("BigQueryDataTransferConfig %s/%s data source ID cannot be changed", u.GetNamespace(), u.GetName()) | |||
} | |||
if !reflect.DeepEqual(desired.Destination, a.actual.Destination) { | |||
if desired.Destination != nil && !reflect.DeepEqual(desired.Destination, a.actual.Destination) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, is there a generated destination if it is unspecified by the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. But let me run the test against real GCP to double check.
update: Just tried. No, the service will not generate the destination.
@@ -283,6 +129,7 @@ X-Xss-Protection: 0 | |||
"write_disposition": "WRITE_APPEND" | |||
}, | |||
"schedule": "first sunday of quarter 00:00", | |||
"state": 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, is this added state
the result of not setting destinationDatasetId
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I am actually not sure. The "state" is hardcoded as PENDING (2) in the mock. Not sure why it was missing in the previous http log.
obj.State = pb.TransferState_PENDING |
/lgtm Do you happen to know why we introduce the "required" flag to the datasetRef field? is that from a GCP change? |
[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 |
afd21ab
into
GoogleCloudPlatform:master
Fix: #3772