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

Add temp_bucket parameter for resource google_dataproc_cluster (fixes #7927) #8131

Merged
merged 3 commits into from
Jan 21, 2021

Conversation

bartcode
Copy link
Contributor

@bartcode bartcode commented Jan 7, 2021

Allow using temp_bucket when creating a Dataproc cluster as addressed in #7927 .

Closes #7927 .

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

dataproc: Added field `temp_bucket` to `google_dataproc_cluster` cluster config.

@ghost ghost added the size/m label Jan 7, 2021
@ghost ghost requested a review from melinath January 7, 2021 13:05
@bartcode bartcode changed the title Add temp_bucket parameter for resource google_dataproc_cluster (#7927) Add temp_bucket parameter for resource google_dataproc_cluster (fixes #7927) Jan 7, 2021
Copy link
Collaborator

@melinath melinath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - seems pretty straightforward! I'll get started on upstreaming this.

google/resource_dataproc_cluster_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@melinath melinath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this ended up breaking all the DataprocCluster tests that don't define an explicit temp bucket, since the server then assigns one for you. (For example, TestAccDataprocCluster_singleNodeCluster.)

The fix for this should be to mark the field as Computed as well as optional. That should still allow setting an explicit value while also accepting whatever the server sends back if there's not a value defined.

google/resource_dataproc_cluster.go Show resolved Hide resolved
@bartcode bartcode requested a review from melinath January 8, 2021 07:50
Copy link
Collaborator

@melinath melinath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and tests are passing

@bartcode
Copy link
Contributor Author

I noticed the comment in magic-modules, but it's been quiet for a while. Should I just wait or shall I remove the test that's suggested there? Your interpretation was correct, by the way, I copied some tests to ensure they also pass with this temporary bucket.

@melinath
Copy link
Collaborator

@bartcode thanks for checking back in. I lost track of this, sorry. Let me ping Sam.

Copy link
Collaborator

@melinath melinath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so there's just one thing to change - since this is a handwritten resource, the docs also need to be updated manually. They're in website/docs/r/. Thanks!

@bartcode
Copy link
Contributor Author

Thanks! I wasn't aware of those docs, but they should be in order now!

@bartcode bartcode requested a review from melinath January 21, 2021 18:27
@ghost
Copy link

ghost commented Feb 21, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Temp bucket parameter for google_dataproc_cluster
2 participants