Skip to content

samples(storage transfer): add samples and test cases for storage transfer services #2857

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

Conversation

mahendra-google
Copy link
Contributor

Adding samples and tests cases for following storage transfer services:

  • 1. storagetransfer_quickstart
  • 2. storagetransfer_transfer_to_nearline
  • 3. storagetransfer_get_latest_transfer_operation
  • 4. storagetransfer_manifest_request
  • 5. storagetransfer_transfer_from_posix
  • 6. storagetransfer_download_to_posix
  • 7. storagetransfer_transfer_posix_to_posix
  • 8. storagetransfer_create_event_driven_gcs_transfer

…utput message in sample output and related small changes.
…sfer to nearline and check latest transfer operation (#1)
…ole , rewording , removing some unnecessary symbols, few test checks removed related to posix file transfer.
@mahendra-google mahendra-google requested review from a team as code owners December 4, 2024 10:22
@mahendra-google
Copy link
Contributor Author

@amanda-tarafa Reference from comments I received in Internal PR in samples from .NET reviewer (PR) Just wanted to confirm whether exception handling can be implemented in samples because I don't see its implemented in storage samples also I could see dispose is not failing ?

@amanda-tarafa
Copy link
Member

@amanda-tarafa Reference from comments I received in Internal PR in samples from .NET reviewer (PR) Just wanted to confirm whether exception handling can be implemented in samples because I don't see its implemented in storage samples also I could see dispose is not failing ?

We don't usually implement exception handling in samples unless there's a very specific error handling case you need to show. We generally consider that something as follows adds more noise than value:

try
{
    // Sample code here
}
catch(Exception ex)
{
    Console.WriteLine(ex)
}

So, no, don't implement error handling except for a very specific case that is significantly different from the code above.

@mahendra-google mahendra-google requested a review from a team as a code owner March 12, 2025 07:49
@mahendra-google mahendra-google requested a review from a team as a code owner March 27, 2025 10:51
@mahendra-google
Copy link
Contributor Author

This PR is ready for re-review.

@amanda-tarafa amanda-tarafa added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 23, 2025
@amanda-tarafa
Copy link
Member

@mahendra-google Please fix conflicts so I can run tests, etc. Thanks.

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 26, 2025
@mahendra-google
Copy link
Contributor Author

mahendra-google commented May 26, 2025

@mahendra-google Please fix conflicts so I can run tests, etc. Thanks.

Tests package reference conflict is fixed.

Copy link
Member

@amanda-tarafa amanda-tarafa left a comment

Choose a reason for hiding this comment

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

Thanks, these look better now. We can address any issue on a one by one basis.

(In general, improvements we request for other samples should be checked for these, thanks)

@amanda-tarafa amanda-tarafa merged commit f8e61b9 into GoogleCloudPlatform:main Jun 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storagetransfer Issues related to the Storage Transfer Service API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants