Skip to content

Commit

Permalink
Pass location to the BigQuery request (flyteorg#365)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw authored Jun 27, 2023
1 parent 6922a96 commit 3f702bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flyteplugins/go/tasks/plugins/webapi/bigquery/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (p Plugin) getImpl(ctx context.Context, taskCtx webapi.GetContext) (wrapper
return nil, pluginErrors.Wrapf(pluginErrors.RuntimeFailure, err, "unable to get client")
}

job, err := client.Jobs.Get(resourceMeta.JobReference.ProjectId, resourceMeta.JobReference.JobId).Do()
job, err := client.Jobs.Get(resourceMeta.JobReference.ProjectId, resourceMeta.JobReference.JobId).Location(resourceMeta.JobReference.Location).Do()

if err != nil {
err := pluginErrors.Wrapf(
Expand Down Expand Up @@ -256,7 +256,7 @@ func (p Plugin) Delete(ctx context.Context, taskCtx webapi.DeleteContext) error
return err
}

_, err = client.Jobs.Cancel(resourceMeta.JobReference.ProjectId, resourceMeta.JobReference.JobId).Do()
_, err = client.Jobs.Cancel(resourceMeta.JobReference.ProjectId, resourceMeta.JobReference.JobId).Location(resourceMeta.JobReference.Location).Do()

if err != nil {
return err
Expand Down

0 comments on commit 3f702bb

Please sign in to comment.