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 support for cross bucket replication feature #12562

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

googlyrahman
Copy link
Member

storagetransfer: Add support for cross bucket replication feature

@github-actions github-actions bot requested a review from hao-nan-li December 12, 2024 20:14
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@hao-nan-li, 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
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.

google provider: Diff ( 2 files changed, 297 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 2 files changed, 297 insertions(+), 11 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_storage_transfer_job (32 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_storage_transfer_job" "primary" {
  replication_spec {
    object_conditions {
      exclude_prefixes                         = # value needed
      include_prefixes                         = # value needed
      last_modified_before                     = # value needed
      last_modified_since                      = # value needed
      max_time_elapsed_since_last_modification = # value needed
      min_time_elapsed_since_last_modification = # value needed
    }
    transfer_options {
      delete_objects_from_source_after_transfer = # value needed
    }
  }
}

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

google provider: Diff ( 2 files changed, 297 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 2 files changed, 297 insertions(+), 11 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_storage_transfer_job (32 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_storage_transfer_job" "primary" {
  replication_spec {
    object_conditions {
      exclude_prefixes                         = # value needed
      include_prefixes                         = # value needed
      last_modified_before                     = # value needed
      last_modified_since                      = # value needed
      max_time_elapsed_since_last_modification = # value needed
      min_time_elapsed_since_last_modification = # value needed
    }
    transfer_options {
      delete_objects_from_source_after_transfer = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 13
Passed tests: 12
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • storagetransfer

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
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 13
Passed tests: 12
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • storagetransfer

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
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

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

google provider: Diff ( 2 files changed, 324 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 2 files changed, 324 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 13
Passed tests: 12
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • storagetransfer

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
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@googlyrahman googlyrahman marked this pull request as draft December 12, 2024 21:03
@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.

google provider: Diff ( 2 files changed, 332 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 2 files changed, 332 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 13
Passed tests: 12
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • storagetransfer

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
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

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

google provider: Diff ( 2 files changed, 332 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 2 files changed, 332 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 13
Passed tests: 12
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • storagetransfer

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
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

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

google provider: Diff ( 2 files changed, 337 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 2 files changed, 337 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 13
Passed tests: 12
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • storagetransfer

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
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

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

google provider: Diff ( 3 files changed, 366 insertions(+), 12 deletions(-))
google-beta provider: Diff ( 3 files changed, 366 insertions(+), 12 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 13
Passed tests: 12
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • storagetransfer

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
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccStorageTransferReplicationJob_basic [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccStorageTransferReplicationJob_basic [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🟢 All tests passed!

View the build log or the debug log for each test

@kautikdk
Copy link
Member

/gcbrun

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

google provider: Diff ( 3 files changed, 366 insertions(+), 12 deletions(-))
google-beta provider: Diff ( 3 files changed, 366 insertions(+), 12 deletions(-))

1 similar comment
@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.

google provider: Diff ( 3 files changed, 366 insertions(+), 12 deletions(-))
google-beta provider: Diff ( 3 files changed, 366 insertions(+), 12 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 13
Passed tests: 13
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • storagetransfer

🟢 All tests passed!

View the build log

@googlyrahman googlyrahman marked this pull request as ready for review December 13, 2024 12:21
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 13
Passed tests: 13
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • storagetransfer

🟢 All tests passed!

View the build log

@@ -98,6 +120,7 @@ func ResourceStorageTransferJob() *schema.Resource {
Optional: true,
MaxItems: 1,
ConflictsWith: []string{"schedule"},
DiffSuppressFunc: diffSuppressEventStream,
Copy link
Member

Choose a reason for hiding this comment

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

What is the need of DiffSuppressFunc?

"transfer_spec": {
Type: schema.TypeList,
Required: true,
Optional: true,
MaxItems: 1,
Copy link
Member

Choose a reason for hiding this comment

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

I think it will be good to add ConflictsWith and ExactlyOneOf conditions here as well to make it explicit for each fields.

ImportStateVerify: true,
},
{
Config: testAccStorageTransferReplicationJob_with_transferOptions(envvar.GetTestProjectFromEnv(), testDataSourceBucketName, testDataSinkName, testUpdatedTransferReplicationJobDescription, true, false, testOverwriteWhen[0]),
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we need separate transfer options update test step as this is common block with transfer_specs.

Copy link

@hao-nan-li This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

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.

3 participants