You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To create a bucket the client library must be configured with a default project. This can be done via the GOOGLE_CLOUD_CPP environment variable, or via google::cloud::storage::ProjectIdOption. There is no way to set the option in the GcsFilesystem class, which forces applications and test to rely on spooky environment variables.
Component(s)
C++
The text was updated successfully, but these errors were encountered:
kou
changed the title
Add option to set the default project id in GcsFilesystem
[C++] Add option to set the default project id in GcsFilesystem
Jun 22, 2023
### Rationale for this change
This fixes#36227, originally motivated by the problems in #36119, but seems like a valuable feature in any case.
### What changes are included in this PR?
- Refactor some code to make it testable.
- Add a new `std::optional<std::string>` field to the `GcsOptions` class.
### Are these changes tested?
Yes, I expanded the unit tests.
### Are there any user-facing changes?
Yes. I updated the field documentation. If I missed some documentation please let me know.
I am also not familiar with the steps required to update the Python wrappers, if there is some documentation to follow I would appreciate it. I can expand this PR or send a separate one, your call.
* Closes: #36227
Authored-by: Carlos O'Ryan <coryan@google.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Describe the enhancement requested
To create a bucket the client library must be configured with a default project. This can be done via the
GOOGLE_CLOUD_CPP
environment variable, or viagoogle::cloud::storage::ProjectIdOption
. There is no way to set the option in theGcsFilesystem
class, which forces applications and test to rely on spooky environment variables.Component(s)
C++
The text was updated successfully, but these errors were encountered: