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

resource_storage_bucket_object: migrated to cloud.google.com/go/storage #4950

Closed
wants to merge 1 commit into from

Conversation

jaceq
Copy link
Contributor

@jaceq jaceq commented Jul 5, 2021

This resolves: hashicorp/terraform-provider-google#9507
And is prerequisite for: hashicorp/terraform-provider-google#8133

Migrated resource_storage_bucket_object to cloud.google.com/go/storage

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)

storage: migrated `resource_storage_bucket_object` to cloud.google.com/go/storage

@google-cla google-cla bot added the cla: yes label Jul 5, 2021
@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@ScottSuarez, please review this PR or find an appropriate assignee.

@ScottSuarez
Copy link
Contributor

/gcbrun

@ScottSuarez
Copy link
Contributor

go generate  ./...
go: github.com/hashicorp/terraform-provider-google/google: package cloud.google.com/go/storage imported from implicitly required module; to add missing requirements, run:
	go get cloud.google.com/go/[email protected]

looks like this dependency needs to be added downstream to tpg and tpgb before this can go through

@jaceq
Copy link
Contributor Author

jaceq commented Jul 12, 2021

@ScottSuarez Anything for me to do here or is that something you can handle?

@ScottSuarez
Copy link
Contributor

I'll take care of it, don't worry. Let me throw something on my calendar

@ScottSuarez
Copy link
Contributor

Hi I haven't forgotten about this... thanks for your patience. In discussing this with my team unfortunately we don't use these higher level clients anywhere else. We're very used to working with the generated json clients and unless I am missing something this new library can't support anything the one we use doesn't.

https://github.com/googleapis/google-api-go-client/blob/master/storage/v1/storage-gen.go#L1712

Customer supplied encryption should be supported on the old client

@jaceq
Copy link
Contributor Author

jaceq commented Jul 19, 2021

Hi @ScottSuarez
I do not fully follow, in the package itself (and it's documentation) it says it's deprecated and to use the one I tried here:
https://github.com/googleapis/google-api-go-client/blob/ce146d9d069f4ccf74532ee4793995469f85ce68/storage/v1/storage-gen.go#L9

So... is it deprecated or not? and if it is what sense does it make to stay with it?

Anyway I admit that I missed somehow that old package also supports customer supplied encryption -> I will look into extending this.

@ScottSuarez
Copy link
Contributor

Hey @jaceq,

I totally get where you are coming from and I know this can be confusing! The libraries we use are auto generated from the rest apis. While this may be deprecated in the sense that they have a higher level library available the library is still consistently getting generated. Switching to this new library could incur some behavior that could deviate from existing behavior. So it's a risk we don't really want to take if we can avoid it! If there ever is behavior that is not supported I agree it might be worth looking into migrating!

I hope that makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate resource_storage_bucket_object to cloud.google.com/go/storage
3 participants