Skip to content

docs(storage): add samples for generate signed urls#4525

Merged
joshuatants merged 2 commits intogoogleapis:mainfrom
joshuatants:docs-v4-signed
Feb 5, 2026
Merged

docs(storage): add samples for generate signed urls#4525
joshuatants merged 2 commits intogoogleapis:mainfrom
joshuatants:docs-v4-signed

Conversation

@joshuatants
Copy link
Contributor

Fixes #3081
Fixes #3082

@product-auto-label product-auto-label bot added api: storage Issues related to the Cloud Storage API. samples Issues that are directly related to samples. labels Feb 3, 2026
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.01%. Comparing base (b96b407) to head (abccd19).
⚠️ Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4525      +/-   ##
==========================================
- Coverage   95.02%   95.01%   -0.02%     
==========================================
  Files         195      195              
  Lines        7456     7456              
==========================================
- Hits         7085     7084       -1     
- Misses        371      372       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshuatants
Copy link
Contributor Author

joshuatants commented Feb 4, 2026

Sorry Carlos some more newbie questions:

  1. Is there a way to use Storage Testbench? In C++ this could be set with various environment variables like GOOGLE_CLOUD_CPP_STORAGE_TEST_JSON_ENDPOINT or programmatically using RestEndpointOption or EndpointOption. Searching through the Rust repo turns up
    emulator_hostname: Option<String>,
    and
    #[test_case(Some("localhost:5678"), "test.googleapis.com"; "emulator")]
    but these don't appear to be options to use the Testbench.
  2. When runnig the integration tests locally they fail with the message

Caused by:
    code: 'Client specified an invalid argument', message: "This operation does not support custom billing projects at this time."

(For context, the tests that currently fail are for the samples set_public_access_prevention_unspecified, change_file_storage_class, and create bucket for object ACL, retention.)

I suspect this is because I'm currently using the project I set up here. I'm creating a new project but am unsure of what Billing Account and Location to select (screenshot). Is there a sample project I can follow?

Thank you.

@coryan coryan marked this pull request as ready for review February 4, 2026 12:26
@coryan coryan requested a review from a team as a code owner February 4, 2026 12:26
@coryan
Copy link
Collaborator

coryan commented Feb 4, 2026

Sorry Carlos some more newbie questions:

  1. Is there a way to use Storage Testbench?

Maybe. But I think the testbench is missing some headers that we depend on. But why? The motivations for the testbench are: (1) to avoid flakes because you are using production, (2) to create specific errors.

For (2) we decided to launch HTTP (or gRPC) servers from within Rust. It is easy to do, and you can control sequence of messages much better than with the testbench (including timeouts).

For (1) same thing, we try to run as few tests as possible against production. I guess the examples could be excluded, but wouldn't you want at least one run against production for the examples? And we only have one-ish test.

  1. When runnig the integration tests locally they fail with the message

Caused by:
    code: 'Client specified an invalid argument', message: "This operation does not support custom billing projects at this time."

You are running into #4370 maybe it would be nice to automatically disable the tracing test if the billing project is not enabled, or disable the gRPC tests if it was.

@joshuatants joshuatants merged commit 14367c9 into googleapis:main Feb 5, 2026
34 checks passed
@joshuatants joshuatants deleted the docs-v4-signed branch February 5, 2026 05:11
@coryan
Copy link
Collaborator

coryan commented Feb 6, 2026

Caused by:
code: 'Client specified an invalid argument', message: "This operation does not support custom billing projects at this time."

You are running into #4370 maybe it would be nice to automatically disable the tracing test if the billing project is not enabled, or disable the gRPC tests if it was.

Fixed in #4584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

storage_generate_upload_signed_url_v4 storage_generate_signed_url_v4

3 participants