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 AppleApp to Firebase. #6630

Merged
merged 33 commits into from Nov 15, 2022
Merged

Conversation

mraouffouad
Copy link
Contributor

Add AppleApp resource to Firebase.

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)


@modular-magician
Copy link
Collaborator

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

I've detected that you're a community contributor. @megan07, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@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, 127 insertions(+))
Terraform Beta: Diff ( 4 files changed, 565 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2194
Passed tests 1951
Skipped tests: 240
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComputeInstance_soleTenantNodeAffinities|TestAccFirebaseAppleApp_firebaseAppleAppBasicExample|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccFirebaseAppleApp_firebaseAppleAppBasicExample[Error message] [Debug log]
TestAccCGCSnippet_eventarcWorkflowsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

mmv1/products/firebase/api.yaml Outdated Show resolved Hide resolved
mmv1/products/firebase/terraform.yaml Outdated Show resolved Hide resolved
mmv1/products/firebase/terraform.yaml Outdated Show resolved Hide resolved
project = google_project.default.project_id
}

resource "google_firebase_apple_app" "<%= ctx[:primary_resource_id] %>" {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we likely want to have 2 samples in general:

  • a minimal sample that sets only the minimally required fields
  • a full sample that sets all optional values with example values

Copy link
Member

Choose a reason for hiding this comment

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

+1 - please also add an update test.

mmv1/products/firebase/terraform.yaml 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 ( 1 file changed, 115 insertions(+))
Terraform Beta: Diff ( 4 files changed, 627 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2201
Passed tests 1956
Skipped tests: 240
Failed tests: 5

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccFirebaseAppleApp_firebaseAppleAppBasicExample|TestAccComputeForwardingRule_update|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccComputeForwardingRule_update[Debug log]

Tests failed during RECORDING mode:
TestAccFirebaseAppleApp_firebaseAppleAppBasicExample[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccCGCSnippet_eventarcWorkflowsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@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, 115 insertions(+))
Terraform Beta: Diff ( 4 files changed, 629 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2208
Passed tests 1962
Skipped tests: 240
Failed tests: 6

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaseAppleApp_firebaseAppleAppBasicExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccBigQueryDataTable_bigtable

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]
TestAccBigQueryDataTable_bigtable[Debug log]

Tests failed during RECORDING mode:
TestAccFirebaseAppleApp_firebaseAppleAppBasicExample[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccCGCSnippet_eventarcWorkflowsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@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, 231 insertions(+))
Terraform Beta: Diff ( 5 files changed, 745 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2208
Passed tests 1965
Skipped tests: 240
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaseAppleApp_firebaseAppleAppBasicExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccFirebaseAppleApp_firebaseAppleAppBasicExample[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccCGCSnippet_eventarcWorkflowsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@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, 231 insertions(+))
Terraform Beta: Diff ( 5 files changed, 745 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2208
Passed tests 1965
Skipped tests: 240
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaseAppleApp_firebaseAppleAppBasicExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccFirebaseAppleApp_firebaseAppleAppBasicExample[Error message] [Debug log]
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccCGCSnippet_eventarcWorkflowsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Member

@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.

looking really good! Just a few minor cleanups noted below

mraouffouad and others added 2 commits November 11, 2022 15:02
Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
mraouffouad and others added 4 commits November 11, 2022 15:05
Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…pdate_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…pdate_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
…pdate_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
@mraouffouad
Copy link
Contributor Author

mraouffouad commented Nov 11, 2022

looking really good! Just a few minor cleanups noted below

Thanks Stephen for the suggestions. All is done. My only concern is that I'm not sure if removing the test_vars_overrides section will pass the tests. As I mentioned before team_id and app_store_id are integers and moving them to the vars section will append their set values by random string in the test, and therefore fail our API validators. I tried this a few times before and always got "Error: Error creating AppleApp: googleapi: Error 400: Request contains an invalid argument". I decided to give it one more try and let's see how the tests go.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 7 files changed, 254 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 12 files changed, 879 insertions(+), 10 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2246
Passed tests 2001
Skipped tests: 241
Failed tests: 4

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccFirebaseAppleApp_update|TestAccFirebaseAppleApp_firebaseAppleAppBasicExample|TestAccFirebaseAppleApp_firebaseAppleAppFullExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccFirebaseAppleApp_update[Debug log]
TestAccFirebaseAppleApp_firebaseAppleAppBasicExample[Debug log]

Tests failed during RECORDING mode:
TestAccFirebaseAppleApp_firebaseAppleAppFullExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@mraouffouad
Copy link
Contributor Author

looking really good! Just a few minor cleanups noted below

Thanks Stephen for the suggestions. All is done. My only concern is that I'm not sure if removing the test_vars_overrides section will pass the tests. As I mentioned before team_id and app_store_id are integers and moving them to the vars section will append their set values by random string in the test, and therefore fail our API validators. I tried this a few times before and always got "Error: Error creating AppleApp: googleapi: Error 400: Request contains an invalid argument". I decided to give it one more try and let's see how the tests go.

As expected, test failed because of the added random suffixes to these 2 variables.

{
"appStoreId": "12345rnoosq6yng",
"bundleId": "apple.app.12345rnoosq6yng",
"displayName": "Display Name Fullrnoosq6yng",
"teamId": "9987654321rnoosq6yng"
}


2022/11/11 21:06:06 [DEBUG] Google API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 400 Bad Request
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Date: Fri, 11 Nov 2022 21:06:06 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 7 files changed, 254 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 12 files changed, 881 insertions(+), 10 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2247
Passed tests 2004
Skipped tests: 241
Failed tests: 2

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaseAppleApp_firebaseAppleAppFullExample|TestAccComputeForwardingRule_update

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaseAppleApp_firebaseAppleAppFullExample[Debug log]
TestAccComputeForwardingRule_update[Debug log]

All tests passed
View the build log or the debug log for each test

@mraouffouad
Copy link
Contributor Author

@melinath is there anything blocking this PR at this point?

@melinath
Copy link
Member

@melinath melinath merged commit 2fecbdf into GoogleCloudPlatform:main Nov 15, 2022
googlerjk pushed a commit to googlerjk/magic-modules that referenced this pull request Nov 22, 2022
* Update api.yaml

* Update api.yaml

* Update api.yaml

* Update api.yaml

* Update terraform.yaml

* Create firebase_apple_app_basic.tf.erb

* Responding to tylerg-dev's comments

* Fixing the failing TestAccFirebaseAppleApp_firebaseAppleAppBasicExample test

* Add a handwritten sweeper to hard-delete the AppleApp

* Fix typo in update_mask

* Fix var name in test

* Add delete request body

* Change appId to app_id in the sweeper delete url

* Use custom_delete for deleting the AppleApp resource

* Update api.yaml

* Remove the repeated block in terraform.api

* Add a 5 sec in the post_delete template

* Move the 5 sec delay to the custom delete code

* Add "Optional" to the deletion_policy description.

* Address melinath@ comments

* Add a manual update test

* Remove unnecessary randomness. Also, move attributes to the vars section so they show up in docs.

* Update mmv1/products/firebase/terraform.yaml

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/products/firebase/terraform.yaml

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/products/firebase/terraform.yaml

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/third_party/terraform/tests/resource_firebase_apple_app_update_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/third_party/terraform/tests/resource_firebase_apple_app_update_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/third_party/terraform/tests/resource_firebase_apple_app_update_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Adding back the test_vars_overrides.

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
googlerjk pushed a commit to googlerjk/magic-modules that referenced this pull request Nov 25, 2022
* Update api.yaml

* Update api.yaml

* Update api.yaml

* Update api.yaml

* Update terraform.yaml

* Create firebase_apple_app_basic.tf.erb

* Responding to tylerg-dev's comments

* Fixing the failing TestAccFirebaseAppleApp_firebaseAppleAppBasicExample test

* Add a handwritten sweeper to hard-delete the AppleApp

* Fix typo in update_mask

* Fix var name in test

* Add delete request body

* Change appId to app_id in the sweeper delete url

* Use custom_delete for deleting the AppleApp resource

* Update api.yaml

* Remove the repeated block in terraform.api

* Add a 5 sec in the post_delete template

* Move the 5 sec delay to the custom delete code

* Add "Optional" to the deletion_policy description.

* Address melinath@ comments

* Add a manual update test

* Remove unnecessary randomness. Also, move attributes to the vars section so they show up in docs.

* Update mmv1/products/firebase/terraform.yaml

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/products/firebase/terraform.yaml

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/products/firebase/terraform.yaml

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/third_party/terraform/tests/resource_firebase_apple_app_update_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/third_party/terraform/tests/resource_firebase_apple_app_update_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/third_party/terraform/tests/resource_firebase_apple_app_update_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Adding back the test_vars_overrides.

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
hao-nan-li pushed a commit to hao-nan-li/magic-modules that referenced this pull request Dec 6, 2022
* Update api.yaml

* Update api.yaml

* Update api.yaml

* Update api.yaml

* Update terraform.yaml

* Create firebase_apple_app_basic.tf.erb

* Responding to tylerg-dev's comments

* Fixing the failing TestAccFirebaseAppleApp_firebaseAppleAppBasicExample test

* Add a handwritten sweeper to hard-delete the AppleApp

* Fix typo in update_mask

* Fix var name in test

* Add delete request body

* Change appId to app_id in the sweeper delete url

* Use custom_delete for deleting the AppleApp resource

* Update api.yaml

* Remove the repeated block in terraform.api

* Add a 5 sec in the post_delete template

* Move the 5 sec delay to the custom delete code

* Add "Optional" to the deletion_policy description.

* Address melinath@ comments

* Add a manual update test

* Remove unnecessary randomness. Also, move attributes to the vars section so they show up in docs.

* Update mmv1/products/firebase/terraform.yaml

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/products/firebase/terraform.yaml

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/products/firebase/terraform.yaml

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/third_party/terraform/tests/resource_firebase_apple_app_update_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/third_party/terraform/tests/resource_firebase_apple_app_update_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Update mmv1/third_party/terraform/tests/resource_firebase_apple_app_update_test.go.erb

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>

* Adding back the test_vars_overrides.

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants