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

Fix flattened custom patchable resources #1847

Merged

Conversation

chrisst
Copy link
Contributor

@chrisst chrisst commented May 29, 2019


[all]

[terraform]

[terraform-beta]

[ansible]

[inspec]

@chrisst chrisst requested a review from danawillow May 29, 2019 20:32
@@ -317,10 +316,6 @@ if <%= props.map { |prop| "d.HasChange(\"#{prop.name.underscore}\")" }.join ' ||
<% end -%>
obj["<%= prop.api_name -%>"] = <%= prop.api_name -%>Prop
}
<% else # if update_body_properties.include? prop -%>
<%= prop.api_name -%>Prop := d.Get("<%= prop.name.underscore -%>")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK this is dead code.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
This PR seems not to have generated downstream PRs before, as of 7f5e363.

Pull request statuses

No diff detected in terraform-google-conversion.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#782
depends: hashicorp/terraform-provider-google#3741

provider/core.rb Show resolved Hide resolved
@@ -287,8 +287,7 @@ func resource<%= resource_name -%>Update(d *schema.ResourceData, meta interface{
<% properties_by_custom_update(object.root_properties).each do |key, props| -%>
if <%= props.map { |prop| "d.HasChange(\"#{prop.name.underscore}\")" }.join ' || ' -%> {
obj := make(map[string]interface{})
<% props.each do |prop| -%>
<% if update_body_properties.include? prop -%>
<% custom_update_properties_by_url(properties, key[:update_url]).each.each do |prop| -%>
Copy link
Contributor

Choose a reason for hiding this comment

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

likewise, the ".each.each"?

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, 88d0187.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

chrisst and others added 3 commits May 30, 2019 19:57
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
@modular-magician modular-magician force-pushed the fix-flattened-patches branch from 88d0187 to c8a175b Compare May 30, 2019 19:57
@modular-magician modular-magician merged commit 068a85a into GoogleCloudPlatform:master May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants