Skip to content
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

WorkflowTemplatePlacement Code Snippet #8080

Open
datasherlock opened this issue Jun 13, 2022 · 5 comments
Open

WorkflowTemplatePlacement Code Snippet #8080

datasherlock opened this issue Jun 13, 2022 · 5 comments
Assignees
Labels
needs more info This issue needs more information from the customer to proceed. priority: p3 Desirable enhancement or fix. May not be included in next release. samples Issues that are directly related to samples. type: question Request for information or clarification. Not an issue.

Comments

@datasherlock
Copy link
Member

As on 13-Jun-2022, the WorkflowTemplatePlacement documentation seems to be providing incorrect key names that can be misleading. A code snippet showcasing the right way to leverage these APIs can be helpful for many. I have a ready snippet that I wrote to demonstrate the usage that I would like to contribute back to the repo.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jun 13, 2022
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 15, 2022
@atulep
Copy link

atulep commented Jun 15, 2022

Hi Jerome, please send a pull request and our team will review it.

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Jun 18, 2022
@dandhlee dandhlee added needs more info This issue needs more information from the customer to proceed. type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. 🚨 This issue needs some love. labels Jun 19, 2022
@dandhlee dandhlee assigned datasherlock and unassigned nicain Jun 19, 2022
@dandhlee
Copy link
Collaborator

Hey @datasherlock, can you help provide more information?

  1. What documentation are you referring to? Can you provide any links?
  2. Is the issue you're having, from any of the files in this repository? If so, could you provide the links to those files?

@datasherlock
Copy link
Member Author

Hi Dan,
I'm referring to the sample at https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.locations.workflowTemplates#workflowtemplateplacement. The JSON templates provided on this page seem to be incorrect. What actually worked was


"cluster_selector": {
   "zone": "us-central1-a",
   "cluster_labels": {string: string}
 }

@datasherlock
Copy link
Member Author

And this is the PR I submitted - googleapis/python-dataproc#440

@dandhlee
Copy link
Collaborator

It's a proto documentation which is not this repository's purview. If there is an issue with it, please file a bug with the dataproc proto team responsible.

With regards to cluster_selector: it seems to me it's working as intended; the client library expects cluster_selector as shown here in the Python docs: https://cloud.google.com/python/docs/reference/dataproc/latest/google.cloud.dataproc_v1.types.WorkflowTemplatePlacement. The link to your doc is for the REST API, which may not work as intended.

Your sample seems to overlap the content from https://github.com/googleapis/python-dataproc/blob/main/samples/generated_samples/dataproc_v1_generated_workflow_template_service_instantiate_inline_workflow_template_sync.py. But, if the repo maintainer is happy to accept the sample after a bit more work has been put into it, that should be a good addition :)

@kweinmeister kweinmeister added the priority: p3 Desirable enhancement or fix. May not be included in next release. label Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info This issue needs more information from the customer to proceed. priority: p3 Desirable enhancement or fix. May not be included in next release. samples Issues that are directly related to samples. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

6 participants