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

Update make transferJobs name field optional #9641

Conversation

mohsenmottaghi
Copy link
Contributor

@mohsenmottaghi mohsenmottaghi commented Dec 14, 2023

Fix hashicorp/terraform-provider-google#15220

This PR tries to make the name field of transferJobs service optional to be able to have customized names for storage transfer jobs.

Release Note Template for Downstream PRs (will be copied)

storagetransfer: made `name` field to be optional in resource `google_storage_transfer_job` so it can be provided by the users

Copy link

google-cla bot commented Dec 14, 2023

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

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will require approval to run.

@zli82016, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Dec 14, 2023
@mohsenmottaghi mohsenmottaghi force-pushed the moshen-transferJobs-optional-name branch 2 times, most recently from c52842c to 538bd5d Compare December 14, 2023 14:11
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Dec 14, 2023
@zli82016
Copy link
Member

@mohsenmottaghi , can you please add a test that name is specified in the configuration for google_storage_transfer_job? Thanks.

https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/services/storagetransfer/resource_storage_transfer_job_test.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 ( 2 files changed, 3 insertions(+))
Terraform Beta: Diff ( 2 files changed, 3 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3293
Passed tests 2955
Skipped tests: 337
Affected tests: 1

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

Need to add a test

@mohsenmottaghi mohsenmottaghi force-pushed the moshen-transferJobs-optional-name branch from 538bd5d to 7b99c82 Compare December 17, 2023 10:23
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Dec 17, 2023
@mohsenmottaghi mohsenmottaghi force-pushed the moshen-transferJobs-optional-name branch 2 times, most recently from e9f0484 to 8cf8a8e Compare December 17, 2023 10:26
@mohsenmottaghi mohsenmottaghi changed the title Update Make transferJobs name field optional Update make transferJobs name field optional Dec 17, 2023
@mohsenmottaghi
Copy link
Contributor Author

@mohsenmottaghi , can you please add a test that name is specified in the configuration for google_storage_transfer_job? Thanks.

https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/services/storagetransfer/resource_storage_transfer_job_test.go

Yes, I added TestAccStorageTransferJob_transferJobName test that tries to create a transfer job with a dynamic name with tf-test-transfer-job-%s format. Please review my changes and If you think they need more changes let me know to do it.

@mohsenmottaghi mohsenmottaghi force-pushed the moshen-transferJobs-optional-name branch from 8cf8a8e to 89509b6 Compare December 17, 2023 10:51
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Dec 18, 2023
@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 ( 3 files changed, 107 insertions(+))
Terraform Beta: Diff ( 3 files changed, 107 insertions(+))

@zli82016
Copy link
Member

@mohsenmottaghi , can you please add a test that name is specified in the configuration for google_storage_transfer_job? Thanks.
https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/services/storagetransfer/resource_storage_transfer_job_test.go

Yes, I added TestAccStorageTransferJob_transferJobName test that tries to create a transfer job with a dynamic name with tf-test-transfer-job-%s format. Please review my changes and If you think they need more changes let me know to do it.

Thanks for adding the test.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3302
Passed tests 2964
Skipped tests: 337
Affected tests: 1

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccStorageTransferJob_transferJobName

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccStorageTransferJob_transferJobName[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

This commit makes transferJobs name optional + new test `TestAccStorageTransferJob_transferJobName` to testing changes.

Fixes hashicorp/terraform-provider-google#15220

Signed-off-by: Mohsen Mottaghi <[email protected]>
@mohsenmottaghi mohsenmottaghi force-pushed the moshen-transferJobs-optional-name branch from 89509b6 to 63fdd93 Compare December 19, 2023 06:55
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Dec 19, 2023
@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 ( 3 files changed, 107 insertions(+))
Terraform Beta: Diff ( 4 files changed, 112 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3301
Passed tests 2964
Skipped tests: 336
Affected tests: 1

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccSpannerInstanceIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccSpannerInstanceIamPolicy[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

LGTM

@zli82016
Copy link
Member

I added the release note for this PR. Please provider it for other PRs.

@mohsenmottaghi
Copy link
Contributor Author

I added the release note for this PR. Please provider it for other PRs.

Thanks 🙏

kapreus pushed a commit to kapreus/magic-modules that referenced this pull request Jan 2, 2024
* Update make transferJobs name field optional

This commit makes transferJobs name optional + new test `TestAccStorageTransferJob_transferJobName` to testing changes.

Fixes hashicorp/terraform-provider-google#15220

Signed-off-by: Mohsen Mottaghi <[email protected]>

* Update transferJobs document of name field

Signed-off-by: Mohsen Mottaghi <[email protected]>

---------

Signed-off-by: Mohsen Mottaghi <[email protected]>
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
* Update make transferJobs name field optional

This commit makes transferJobs name optional + new test `TestAccStorageTransferJob_transferJobName` to testing changes.

Fixes hashicorp/terraform-provider-google#15220

Signed-off-by: Mohsen Mottaghi <[email protected]>

* Update transferJobs document of name field

Signed-off-by: Mohsen Mottaghi <[email protected]>

---------

Signed-off-by: Mohsen Mottaghi <[email protected]>
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
* Update make transferJobs name field optional

This commit makes transferJobs name optional + new test `TestAccStorageTransferJob_transferJobName` to testing changes.

Fixes hashicorp/terraform-provider-google#15220

Signed-off-by: Mohsen Mottaghi <[email protected]>

* Update transferJobs document of name field

Signed-off-by: Mohsen Mottaghi <[email protected]>

---------

Signed-off-by: Mohsen Mottaghi <[email protected]>
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.

Add the name field to google_storage_transfer_job
3 participants