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

fix: Temporarily restoring storage_grpc_service_config.json to fix broken test #2365

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,8 @@ public class GrpcStorageStub extends StorageStub {
PathTemplate.create("{bucket=**}");
private static final PathTemplate GET_IAM_POLICY_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=**}");
private static final PathTemplate GET_IAM_POLICY_1_PATH_TEMPLATE =
PathTemplate.create("{bucket=projects/*/buckets/*}/objects/**");
private static final PathTemplate SET_IAM_POLICY_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=**}");
private static final PathTemplate SET_IAM_POLICY_1_PATH_TEMPLATE =
PathTemplate.create("{bucket=projects/*/buckets/*}/objects/**");
private static final PathTemplate TEST_IAM_PERMISSIONS_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=**}");
private static final PathTemplate TEST_IAM_PERMISSIONS_1_PATH_TEMPLATE =
Expand Down Expand Up @@ -631,7 +627,6 @@ protected GrpcStorageStub(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getResource(), "bucket", GET_IAM_POLICY_0_PATH_TEMPLATE);
builder.add(request.getResource(), "bucket", GET_IAM_POLICY_1_PATH_TEMPLATE);
return builder.build();
})
.build();
Expand All @@ -642,7 +637,6 @@ protected GrpcStorageStub(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getResource(), "bucket", SET_IAM_POLICY_0_PATH_TEMPLATE);
builder.add(request.getResource(), "bucket", SET_IAM_POLICY_1_PATH_TEMPLATE);
return builder.build();
})
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,15 @@ public StorageStub createStub() throws IOException {
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}

/** Returns the endpoint set by the user or the the service's default endpoint. */
@Override
public String getEndpoint() {
if (super.getEndpoint() != null) {
return super.getEndpoint();
}
return getDefaultEndpoint();
}

/** Returns the default service name. */
@Override
public String getServiceName() {
Expand Down Expand Up @@ -973,7 +982,6 @@ private static Builder createDefault() {
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);

Expand Down Expand Up @@ -1334,6 +1342,15 @@ public UnaryCallSettings.Builder<GetHmacKeyRequest, HmacKeyMetadata> getHmacKeyS
return updateHmacKeySettings;
}

/** Returns the endpoint set by the user or the the service's default endpoint. */
@Override
public String getEndpoint() {
if (super.getEndpoint() != null) {
return super.getEndpoint();
}
return getDefaultEndpoint();
}

@Override
public StorageStubSettings build() throws IOException {
return new StorageStubSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,15 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$Edition",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto",
"queryAllDeclaredConstructors": true,
Expand Down Expand Up @@ -845,6 +854,114 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSet",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto",
"queryAllDeclaredConstructors": true,
Expand Down Expand Up @@ -908,6 +1025,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType",
"queryAllDeclaredConstructors": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,131 @@
* <p>Note: close() needs to be called on the StorageControlClient object to clean up resources such
* as threads. In the example above, try-with-resources is used, which automatically calls close().
*
* <table>
* <caption>Methods</caption>
* <tr>
* <th>Method</th>
* <th>Description</th>
* <th>Method Variants</th>
* </tr>
* <tr>
* <td><p> CreateFolder</td>
* <td><p> Creates a new folder.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> createFolder(CreateFolderRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li><p> createFolder(BucketName parent, Folder folder, String folderId)
* <li><p> createFolder(String parent, Folder folder, String folderId)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li><p> createFolderCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> DeleteFolder</td>
* <td><p> Permanently deletes an empty folder.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> deleteFolder(DeleteFolderRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li><p> deleteFolder(FolderName name)
* <li><p> deleteFolder(String name)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li><p> deleteFolderCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> GetFolder</td>
* <td><p> Returns metadata for the specified folder.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> getFolder(GetFolderRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li><p> getFolder(FolderName name)
* <li><p> getFolder(String name)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li><p> getFolderCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> ListFolders</td>
* <td><p> Retrieves a list of folders for a given bucket.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> listFolders(ListFoldersRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li><p> listFolders(BucketName parent)
* <li><p> listFolders(String parent)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li><p> listFoldersPagedCallable()
* <li><p> listFoldersCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> RenameFolder</td>
* <td><p> Renames a source folder to a destination folder. During a rename, the source and destination folders are locked until the long running operation completes.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> renameFolderAsync(RenameFolderRequest request)
* </ul>
* <p>Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.</p>
* <ul>
* <li><p> renameFolderAsync(FolderName name, String destinationFolderId)
* <li><p> renameFolderAsync(String name, String destinationFolderId)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li><p> renameFolderOperationCallable()
* <li><p> renameFolderCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> GetStorageLayout</td>
* <td><p> Returns the storage layout configuration for a given bucket.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> getStorageLayout(GetStorageLayoutRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li><p> getStorageLayout(StorageLayoutName name)
* <li><p> getStorageLayout(String name)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li><p> getStorageLayoutCallable()
* </ul>
* </td>
* </tr>
* </table>
*
* <p>See the individual methods for example code.
*
* <p>Many parameters require resource names to be formatted in a particular way. To assist with
Expand Down
Loading
Loading