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

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

Open
wants to merge 57 commits into
base: main
Choose a base branch
from

Conversation

mahendra-google
Copy link

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
@amanda-tarafa
Copy link
Member

@mahendra-google Do let me know here when this is ready for review again. No rush on my part, but just know I won't review until you have said so here. Thanks!

@mahendra-google
Copy link
Author

@mahendra-google Do let me know here when this is ready for review again. No rush on my part, but just know I won't review until you have said so here. Thanks!

@amanda-tarafa Yes , I will let you know when this is ready for review again.

@mahendra-google
Copy link
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
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.

7 participants