Skip to content

Commit f49a91d

Browse files
authored
Merge branch 'main' into main
2 parents 2751219 + 1a6f4d5 commit f49a91d

1,043 files changed

Lines changed: 453975 additions & 86402 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/update_librarian_googleapis.yaml‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,18 @@ jobs:
5757
uses: actions/setup-go@v5
5858
with:
5959
go-version: '>=1.20.2'
60-
- name: Run librarian update
60+
- name: Get librarian version
61+
id: librarian
6162
run: |
6263
version=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
63-
go run "github.com/googleapis/librarian/cmd/librarian@${version}" update sources.googleapis
64+
echo "version=${version}" >> $GITHUB_OUTPUT
65+
- name: Run librarian update
66+
run: |
67+
go run "github.com/googleapis/librarian/cmd/librarian@${{ steps.librarian.outputs.version }}" update sources.googleapis
6468
- name: Get latest commit
6569
id: commit
6670
run: |
67-
version=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
68-
new_commit=$(go run "github.com/googleapis/librarian/cmd/librarian@${version}" config get sources.googleapis.commit)
71+
new_commit=$(go run "github.com/googleapis/librarian/cmd/librarian@${{ steps.librarian.outputs.version }}" config get sources.googleapis.commit)
6972
echo "new_commit=${new_commit}" >> $GITHUB_OUTPUT
7073
echo "short_commit=${new_commit:0:7}" >> $GITHUB_OUTPUT
7174
# TODO(https://github.com/googleapis/librarian/issues/6220): Remove this step.
@@ -115,14 +118,14 @@ jobs:
115118
- name: Run librarian install
116119
if: steps.detect_librarian.outputs.has_changes == 'true'
117120
run: |
118-
go run github.com/googleapis/librarian/cmd/librarian@latest install
121+
go run "github.com/googleapis/librarian/cmd/librarian@${{ steps.librarian.outputs.version }}" install
119122
echo "$HOME/.cache/librarian/bin/java_tools/bin" >> $GITHUB_PATH
120123
env:
121124
PYTHONPATH: ${{ github.workspace }}/sdk-platform-java/hermetic_build/library_generation/owlbot
122125
- name: Generate Libraries
123126
if: steps.detect_librarian.outputs.has_changes == 'true'
124127
run: |
125-
go run github.com/googleapis/librarian/cmd/librarian@latest generate --all
128+
go run "github.com/googleapis/librarian/cmd/librarian@${{ steps.librarian.outputs.version }}" generate --all
126129
- name: Commit and Create PR
127130
if: steps.detect_librarian.outputs.has_changes == 'true'
128131
env:

‎generation_config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
googleapis_commitish: f7b17174725f43b5cb11b0b8c6bbad20a3dc5bd1
1+
googleapis_commitish: 7af3f2c7b8927cffb548fd2cf09b04c6371437ee
22
libraries_bom_version: 26.83.0
33
is_monorepo: true
44
libraries:

‎google-auth-library-java/oauth2_http/java/com/google/auth/oauth2/DefaultCredentialsProvider.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ private final GoogleCredentials getDefaultCredentialsUnsynchronized(
239239
return credentials;
240240
}
241241

242-
private final File getWellKnownCredentialsFile() {
242+
private final File getWellKnownCredentialsFile() throws IOException {
243243
return GoogleAuthUtils.getWellKnownCredentialsFile(this);
244244
}
245245

‎google-auth-library-java/oauth2_http/java/com/google/auth/oauth2/GoogleAuthUtils.java‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
package com.google.auth.oauth2;
3333

3434
import java.io.File;
35+
import java.io.IOException;
3536

3637
/**
3738
* This public class provides shared utilities for common OAuth2 utils or ADC. It also exposes
@@ -45,7 +46,7 @@ public class GoogleAuthUtils {
4546
* @return the path to the well-known Application Default Credentials file location
4647
*/
4748
public static final String getWellKnownCredentialsPath() {
48-
return getWellKnownCredentialsFile(DefaultCredentialsProvider.DEFAULT).getAbsolutePath();
49+
return getWellKnownCredentialsPath(DefaultCredentialsProvider.DEFAULT);
4950
}
5051

5152
/**
@@ -54,7 +55,11 @@ public static final String getWellKnownCredentialsPath() {
5455
* @return the path to the well-known Application Default Credentials file location
5556
*/
5657
static final String getWellKnownCredentialsPath(DefaultCredentialsProvider provider) {
57-
return getWellKnownCredentialsFile(provider).getAbsolutePath();
58+
try {
59+
return getWellKnownCredentialsFile(provider).getAbsolutePath();
60+
} catch (IOException e) {
61+
throw new RuntimeException(e);
62+
}
5863
}
5964

6065
/**
@@ -64,13 +69,18 @@ static final String getWellKnownCredentialsPath(DefaultCredentialsProvider provi
6469
* purposes)
6570
* @return the well-known Application Default Credentials file
6671
*/
67-
static final File getWellKnownCredentialsFile(DefaultCredentialsProvider provider) {
72+
static final File getWellKnownCredentialsFile(DefaultCredentialsProvider provider)
73+
throws IOException {
6874
File cloudConfigPath;
6975
String envPath = provider.getEnv("CLOUDSDK_CONFIG");
7076
if (envPath != null) {
7177
cloudConfigPath = new File(envPath);
7278
} else if (provider.getOsName().indexOf("windows") >= 0) {
73-
File appDataPath = new File(provider.getEnv("APPDATA"));
79+
String appData = provider.getEnv("APPDATA");
80+
if (appData == null) {
81+
throw new IOException(DefaultCredentialsProvider.CLOUDSDK_MISSING_CREDENTIALS);
82+
}
83+
File appDataPath = new File(appData);
7484
cloudConfigPath = new File(appDataPath, provider.CLOUDSDK_CONFIG_DIRECTORY);
7585
} else {
7686
File configPath = new File(provider.getProperty("user.home", ""), ".config");

‎google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/DefaultCredentialsProviderTest.java‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,20 @@ void getDefaultCredentials_noCredentials_throws() {
115115
assertEquals(DefaultCredentialsProvider.CLOUDSDK_MISSING_CREDENTIALS, message);
116116
}
117117

118+
@Test
119+
void getDefaultCredentials_windowsMissingAppData_throws() {
120+
// When APPDATA is unset on Windows, the ADC resolution should fail gracefully
121+
// with a structured missing credentials exception, rather than crashing with an NPE.
122+
MockHttpTransportFactory transportFactory = new MockHttpTransportFactory();
123+
TestDefaultCredentialsProvider testProvider = new TestDefaultCredentialsProvider();
124+
testProvider.setProperty("os.name", "windows");
125+
testProvider.setEnv("APPDATA", null);
126+
127+
IOException e =
128+
assertThrows(IOException.class, () -> testProvider.getDefaultCredentials(transportFactory));
129+
assertEquals(DefaultCredentialsProvider.CLOUDSDK_MISSING_CREDENTIALS, e.getMessage());
130+
}
131+
118132
@Test
119133
void getDefaultCredentials_noCredentialsSandbox_throwsNonSecurity() {
120134
MockHttpTransportFactory transportFactory = new MockHttpTransportFactory();

‎java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20789,6 +20789,15 @@
2078920789
"allDeclaredClasses": true,
2079020790
"allPublicClasses": true
2079120791
},
20792+
{
20793+
"name": "com.google.cloud.aiplatform.v1beta1.PublisherModelConfig$ModelProvider",
20794+
"queryAllDeclaredConstructors": true,
20795+
"queryAllPublicConstructors": true,
20796+
"queryAllDeclaredMethods": true,
20797+
"allPublicMethods": true,
20798+
"allDeclaredClasses": true,
20799+
"allPublicClasses": true
20800+
},
2079220801
{
2079320802
"name": "com.google.cloud.aiplatform.v1beta1.PublisherModelEulaAcceptance",
2079420803
"queryAllDeclaredConstructors": true,

‎java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java‎

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
224224
+ "\024bigquery_destination\030\003 \001(\01324.googl"
225225
+ "e.cloud.aiplatform.v1beta1.BigQueryDestination\0224\n"
226226
+ "\'request_response_logging_schema_version\030\004 \001(\tB\003\340A\003\022\033\n"
227-
+ "\023enable_otel_logging\030\006 \001(\010\"t\n"
227+
+ "\023enable_otel_logging\030\006 \001(\010\"\245\002\n"
228228
+ "\024PublisherModelConfig\022\\\n"
229-
+ "\016logging_config\030\003 \001(\0132D.google.cloud.aiplatf"
230-
+ "orm.v1beta1.PredictRequestResponseLoggingConfig\"N\n"
229+
+ "\016logging_config\030\003 \001(\0132D.google.cloud.aiplat"
230+
+ "form.v1beta1.PredictRequestResponseLoggingConfig\022o\n"
231+
+ "\035data_sharing_enabled_provider\030\004 \001(\0162C.google.cloud.aiplatform.v1beta"
232+
+ "1.PublisherModelConfig.ModelProviderB\003\340A\001\">\n\r"
233+
+ "ModelProvider\022\036\n"
234+
+ "\032MODEL_PROVIDER_UNSPECIFIED\020\000\022\r\n"
235+
+ "\tANTHROPIC\020\001\"N\n"
231236
+ "\026ClientConnectionConfig\0224\n"
232237
+ "\021inference_timeout\030\001 \001(\0132\031.google.protobuf.Duration\"5\n"
233238
+ "\026FasterDeploymentConfig\022\033\n"
@@ -242,15 +247,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
242247
+ "\017max_unavailableB\013\n"
243248
+ "\tmax_surge\"\232\001\n"
244249
+ "\033GenAiAdvancedFeaturesConfig\022Z\n\n"
245-
+ "rag_config\030\001"
246-
+ " \001(\0132F.google.cloud.aiplatform.v1beta1.GenAiAdvancedFeaturesConfig.RagConfig\032\037\n"
250+
+ "rag_config\030\001 \001(\0132F.google.cloud.ai"
251+
+ "platform.v1beta1.GenAiAdvancedFeaturesConfig.RagConfig\032\037\n"
247252
+ "\tRagConfig\022\022\n\n"
248253
+ "enable_rag\030\001 \001(\010\"\243\003\n"
249254
+ "\027SpeculativeDecodingSpec\022q\n"
250-
+ "\027draft_model_speculation\030\002 \001(\0132N.google.cloud.aiplatform.v1b"
251-
+ "eta1.SpeculativeDecodingSpec.DraftModelSpeculationH\000\022f\n"
252-
+ "\021ngram_speculation\030\003 \001(\0132"
253-
+ "I.google.cloud.aiplatform.v1beta1.SpeculativeDecodingSpec.NgramSpeculationH\000\022\037\n"
255+
+ "\027draft_model_speculation\030\002 \001(\0132N.google.cl"
256+
+ "oud.aiplatform.v1beta1.SpeculativeDecodingSpec.DraftModelSpeculationH\000\022f\n"
257+
+ "\021ngram_speculation\030\003 \001(\0132I.google.cloud.aiplatf"
258+
+ "orm.v1beta1.SpeculativeDecodingSpec.NgramSpeculationH\000\022\037\n"
254259
+ "\027speculative_token_count\030\001 \001(\005\032U\n"
255260
+ "\025DraftModelSpeculation\022<\n"
256261
+ "\013draft_model\030\001 \001(\tB\'\340A\002\372A!\n"
@@ -259,10 +264,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
259264
+ "ngram_size\030\001 \001(\005B\r\n"
260265
+ "\013speculationB\344\001\n"
261266
+ "#com.google.cloud.aiplatform.v1beta1B\r"
262-
+ "EndpointProtoP\001ZCcloud.google.com/go/aiplatform/apiv1beta1/aiplatfo"
263-
+ "rmpb;aiplatformpb\252\002\037Google.Cloud.AIPlatf"
264-
+ "orm.V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1"
265-
+ "beta1\352\002\"Google::Cloud::AIPlatform::V1beta1b\006proto3"
267+
+ "EndpointProtoP\001ZCcloud.google.com/go/aiplatform/a"
268+
+ "piv1beta1/aiplatformpb;aiplatformpb\252\002\037Go"
269+
+ "ogle.Cloud.AIPlatform.V1Beta1\312\002\037Google\\C"
270+
+ "loud\\AIPlatform\\V1beta1\352\002\"Google::Cloud::AIPlatform::V1beta1b\006proto3"
266271
};
267272
descriptor =
268273
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -395,7 +400,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
395400
new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
396401
internal_static_google_cloud_aiplatform_v1beta1_PublisherModelConfig_descriptor,
397402
new java.lang.String[] {
398-
"LoggingConfig",
403+
"LoggingConfig", "DataSharingEnabledProvider",
399404
});
400405
internal_static_google_cloud_aiplatform_v1beta1_ClientConnectionConfig_descriptor =
401406
getDescriptor().getMessageType(5);

0 commit comments

Comments
 (0)