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

Properly encode paths for google_storage_object_access_control #4946

Merged
merged 3 commits into from
Jul 2, 2021

Conversation

melinath
Copy link
Member

@melinath melinath commented Jul 2, 2021

Resolved hashicorp/terraform-provider-google#9457

It looks like this ended up basically identical to #1759. @rileykarson long shot but do you happen to remember what issues you ran into with that solution?

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: fixed handling of object paths that contain slashes for `google_storage_object_access_control`

This gives a failing test that reproduces the issue
@google-cla google-cla bot added the cla: yes label Jul 2, 2021
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))
Terraform Beta: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 7 insertions(+), 7 deletions(-))
Terraform Beta: Diff ( 3 files changed, 7 insertions(+), 7 deletions(-))
TF Conversion: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))
Inspec: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))

@melinath melinath requested a review from rileykarson July 2, 2021 15:03
@melinath melinath marked this pull request as ready for review July 2, 2021 15:03
@@ -72,7 +72,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides
bucket_name: "static-content-bucket"
object_name: "public-object"
id_format: "{{bucket}}/{{object}}/{{entity}}"
Copy link
Member

Choose a reason for hiding this comment

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

thinking out loud: id is only read during import, and we actually read import_format there instead. We don't need to annotate this line b/c we never need to recreate the id based on the template.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was also concerned that changing this line might be backwards-incompatible? but I'm not sure if that's true.

@rileykarson
Copy link
Member

I don't remember what was generating weirdly, import formats probably? It's, uh, been a while haha.

@melinath
Copy link
Member Author

melinath commented Jul 2, 2021

I don't remember what was generating weirdly, import formats probably? It's, uh, been a while haha.

okay, well, if it looks fine to you now I guess we're probably fine 😂

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 46 insertions(+), 7 deletions(-))
Terraform Beta: Diff ( 3 files changed, 46 insertions(+), 7 deletions(-))
TF Conversion: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))
Inspec: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComputeInstance_updateRunning_desiredStatusNotSet_notAllowStoppingForUpdate|TestAccComputeInstance_updateRunning_desiredStatusRunning_notAllowStoppingForUpdate|TestAccContainerNodePool_withGPU|TestAccStorageObjectAccessControl_update|TestAccStorageObjectAcl_basic|TestAccStorageObjectAcl_downgrade|TestAccStorageObjectAcl_predefinedToExplicit|TestAccStorageObjectAcl_upgrade|TestAccStorageObjectAcl_predefined|TestAccStorageObjectAcl_explicitToPredefined|TestAccStorageObjectAcl_unordered You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=194844

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccContainerNodePool_withGPU Please fix these to complete your PR

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccContainerNodePool_withGPU|TestAccStorageObjectAccessControl_updateWithSlashes You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=194847

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccContainerNodePool_withGPU Please fix these to complete your PR

@melinath
Copy link
Member Author

melinath commented Jul 2, 2021

TestAccContainerNodePool_withGPU failure is unrelated.

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.

google_storage_object_access_control does not encode path properly
3 participants