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 new field filter to pubsub. #3759

Merged
merged 6 commits into from
Aug 11, 2020

Conversation

AlbertSabate
Copy link
Contributor

Fixes: terraform-providers/terraform-provider-google/issues/6727

Release Note Template for Downstream PRs (will be copied)

pubsub: added `filter` field to `google_pubsub_subscription` resource

@google-cla
Copy link

google-cla bot commented Jul 21, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Jul 21, 2020
@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.

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

@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 ( 2 files changed, 42 insertions(+), 6 deletions(-))
Terraform Beta: Diff ( 2 files changed, 42 insertions(+), 6 deletions(-))
Ansible: Diff ( 2 files changed, 16 insertions(+), 5 deletions(-))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))
Inspec: Diff ( 4 files changed, 7 insertions(+))

@AlbertSabate
Copy link
Contributor Author

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Jul 21, 2020
products/pubsub/api.yaml Outdated Show resolved Hide resolved
@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 ( 2 files changed, 33 insertions(+))
Terraform Beta: Diff ( 2 files changed, 33 insertions(+))
Ansible: Diff ( 2 files changed, 28 insertions(+))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))
Inspec: Diff ( 4 files changed, 7 insertions(+))

@google-cla
Copy link

google-cla bot commented Jul 22, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Jul 22, 2020
@tim-codes
Copy link
Contributor

@googlebot I fixed it.

@google-cla
Copy link

google-cla bot commented Jul 22, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@tim-codes
Copy link
Contributor

@googlebot I fixed it.

@google-cla
Copy link

google-cla bot commented Jul 22, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@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, 41 insertions(+), 7 deletions(-))
Terraform Beta: Diff ( 3 files changed, 41 insertions(+), 7 deletions(-))
Ansible: Diff ( 2 files changed, 28 insertions(+))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))
Inspec: Diff ( 4 files changed, 7 insertions(+))

@tim-codes
Copy link
Contributor

@slevenick I've added the filter field to the unit tests you mentioned :)

@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 ( 2 files changed, 33 insertions(+))
Terraform Beta: Diff ( 2 files changed, 33 insertions(+))
Ansible: Diff ( 2 files changed, 28 insertions(+))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))
Inspec: Diff ( 4 files changed, 7 insertions(+))

@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, 41 insertions(+), 7 deletions(-))
Terraform Beta: Diff ( 3 files changed, 41 insertions(+), 7 deletions(-))
Ansible: Diff ( 2 files changed, 28 insertions(+))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))
Inspec: Diff ( 4 files changed, 7 insertions(+))

@tim-codes
Copy link
Contributor

Hi @slevenick, wondering if we could get a final review on this? Is there anything we can do to expedite this getting merged? :)

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

I'm unable to run these tests due to:

TestAccPubsubSubscription_basic: testing.go:674: Step 0 error: Missing newline after argument: On /opt/teamcity-agent/temp/buildTmp/tf-test443133719/main.tf line 9: An argument definition must end with a newline.

Are you able to run the pubsub subscription tests?

@google-cla
Copy link

google-cla bot commented Aug 4, 2020

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Aug 4, 2020

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Aug 4, 2020

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@tim-codes
Copy link
Contributor

@googlebot I consent.

@google-cla google-cla bot added cla: yes and removed cla: no labels Aug 4, 2020
@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, 41 insertions(+), 7 deletions(-))
Terraform Beta: Diff ( 3 files changed, 41 insertions(+), 7 deletions(-))
Ansible: Diff ( 2 files changed, 28 insertions(+))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))
Inspec: Diff ( 4 files changed, 7 insertions(+))

@tim-codes
Copy link
Contributor

@slevenick how can I see more information on the current build failure?

@slevenick
Copy link
Contributor

@slevenick how can I see more information on the current build failure?

I believe the issue is when running the tests with the new argument that contains an escaped string here: https://github.com/GoogleCloudPlatform/magic-modules/pull/3759/files#diff-36779956add430400ebf1b5e3b29f0d6R47

It's ending up with an incorrect terraform config, probably without the necessary line breaks. I'd put that attributes line directly into the test config.

@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, 36 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 3 files changed, 36 insertions(+), 2 deletions(-))
Ansible: Diff ( 2 files changed, 27 insertions(+))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))
Inspec: Diff ( 4 files changed, 7 insertions(+))

@tim-codes
Copy link
Contributor

@slevenick, I've added the suggested fix, checks seem to be passing now 👍

@slevenick how can I see more information on the current build failure?

I believe the issue is when running the tests with the new argument that contains an escaped string here: https://github.com/GoogleCloudPlatform/magic-modules/pull/3759/files#diff-36779956add430400ebf1b5e3b29f0d6R47

It's ending up with an incorrect terraform config, probably without the necessary line breaks. I'd put that attributes line directly into the test config.

topic = google_pubsub_topic.foo.id
name = "%s"
topic = google_pubsub_topic.foo.id
filter = "attributes.foo = "bar""
Copy link
Contributor

Choose a reason for hiding this comment

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

The quotes here will need to be escaped, probably something like this:

filter = "attributes.foo = \"bar\""

Otherwise terraform will complain that this config is invalid

@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, 36 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 3 files changed, 36 insertions(+), 2 deletions(-))
Ansible: Diff ( 2 files changed, 27 insertions(+))
TF Conversion: Diff ( 1 file changed, 10 insertions(+))
Inspec: Diff ( 4 files changed, 7 insertions(+))

@tim-codes
Copy link
Contributor

tim-codes commented Aug 11, 2020

@slevenick

The quotes here will need to be escaped

done

@slevenick slevenick self-requested a review August 11, 2020 18:12
Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Thanks for the addition!

@tim-codes
Copy link
Contributor

Thanks for the help @slevenick, great to see this merged! Will this be added to the 3.34.0 release?

@slevenick
Copy link
Contributor

@tim-codes nope, the 3.34.0 release went out this morning. I'd expect this in 3.35.0 ETA early next week

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.

Add support for GCP PubSub Subscription filter
6 participants