From 3f702bb5e5f163af32fca0c56907be97781bab81 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 --- flyteplugins/go/tasks/plugins/webapi/bigquery/plugin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flyteplugins/go/tasks/plugins/webapi/bigquery/plugin.go b/flyteplugins/go/tasks/plugins/webapi/bigquery/plugin.go index bc1f6df83f..2649576432 100644 --- a/flyteplugins/go/tasks/plugins/webapi/bigquery/plugin.go +++ b/flyteplugins/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