Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

The location option of launchFlexTemplate is not working #19

Closed
holyshared opened this issue Aug 22, 2021 · 9 comments
Closed

The location option of launchFlexTemplate is not working #19

holyshared opened this issue Aug 22, 2021 · 9 comments
Assignees
Labels
api: dataflow Issues related to the googleapis/nodejs-dataflow API. external This issue is blocked on a bug with the actual product. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@holyshared
Copy link

The location option of launchFlexTemplate is not working

I created a dataflow job with asia-northeast1 as the location of the launchFlexTemplate.
However, the job region becomes us-central1.

The code I'm trying is below.

import { FlexTemplatesServiceClient } from "@google-cloud/dataflow"

const client = new FlexTemplatesServiceClient({
  projectId: process.env.GCP_PROJECT_ID,
})

client.launchFlexTemplate({
  projectId: process.env.GCP_PROJECT_ID,
  location: process.env.GCP_REGION,
  launchParameter: {
    jobName: "example-job",
    containerSpecGcsPath: process.env.GCP_CONTAINER_SPEC_PATH,
    parameters: {
      input: "gs://bucket/input/input.json",
      output: "gs://bucket/output/output.json",
    },
    environment: {
      subnetwork: process.env.GCP_SUBNETWORK,
      serviceAccountEmail: process.env.GCP_SERVICE_ACCOUNT_EMAIL,
    }
  }
}).then(([res, req]) => {
  console.log("job %s created", res.job.name)
}).catch(err => {
  console.log(err.stack)
})

Environment details

  • OS: macOS Big Sur 11.4
  • Node.js version: v14.4.0
  • npm version: 6.14.5
  • @google-cloud/dataflow version: 1.0.2
@product-auto-label product-auto-label bot added the api: dataflow Issues related to the googleapis/nodejs-dataflow API. label Aug 22, 2021
@meredithslota meredithslota added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 1, 2021
@meredithslota
Copy link

meredithslota commented Sep 24, 2021

We've identified similar issues in other repos and have escalated this to the API service team since it's not a language-specific library issue. Here are the related issues:

Marking this as a P1 bug w/ external label.

@meredithslota meredithslota added external This issue is blocked on a bug with the actual product. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Sep 24, 2021
@bbhoss
Copy link

bbhoss commented Nov 29, 2021

I couldn't find an existing issue in the Google Issue Tracker so I created one here. I suggest starring this issue to anyone else that runs across this problem, hopefully it will get some attention from Google soon.

@rafaeldl
Copy link

rafaeldl commented Feb 2, 2022

I think we solved the problem, now we have to test! https://github.com/googleapis/nodejs-dataflow/pull/44

@meredithslota
Copy link

This does appear to have been rolled out, at least in the Node.js libraries, in #44 — can someone in this thread (@rafaeldl or @bbhoss or @holyshared) confirm if this is working for you now?

@meredithslota meredithslota self-assigned this Feb 8, 2022
@rafaeldl
Copy link

rafaeldl commented Mar 8, 2022

@meredithslota I'm waiting for the release 1.2.0 #45 . But it lacks some approval for the release. :(

@meredithslota
Copy link

Thanks for flagging that — I requested a review and it looks like it's gone through now. Can you check with the latest version?

@meredithslota
Copy link

@rafaeldl Can you see if the issue is resolved for you with the latest version of the library? It's been released. We're seeing success in other libraries (e.g. this appears fixed in the Python client) just want to validate the Node.js client is working as expected now as well. Thanks!

@meredithslota
Copy link

We are pretty confident that this is nearly fully resolved (another related issue was just fixed: googleapis/gapic-generator-typescript#1133 and should be rolling out shortly) and just needs to make its way into this library. Should happen shortly.

@davidcavazos
Copy link

The fix has been merged on PR googleapis/gapic-generator-typescript#1130 and it should be available on release 2.14.3 or later.

I'm closing this, but please re-open if the issue still persists.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: dataflow Issues related to the googleapis/nodejs-dataflow API. external This issue is blocked on a bug with the actual product. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

5 participants