From 1d0f3e9d9b5264459c97e6fb2bc64bc0147971d1 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Tue, 27 Jun 2023 11:57:56 +0800 Subject: [PATCH] Pass location to the BigQuery request (#365) Signed-off-by: Kevin Su --- go/tasks/plugins/webapi/bigquery/plugin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/tasks/plugins/webapi/bigquery/plugin.go b/go/tasks/plugins/webapi/bigquery/plugin.go index bc1f6df83..264957643 100644 --- a/go/tasks/plugins/webapi/bigquery/plugin.go +++ b/go/tasks/plugins/webapi/bigquery/plugin.go @@ -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( @@ -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