Skip to content

Commit b149d90

Browse files
committed
squash
1 parent 340c7d2 commit b149d90

607 files changed

Lines changed: 216172 additions & 14926 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/release-note-generation/generate_module_notes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def parse_commit_overrides(commit_data, short_name, prefix_regex, commit_hash, c
120120

121121
should_include = False
122122
if short_name:
123-
if f"[{short_name}]" in line_stripped:
123+
if f"[{short_name}]" in line_stripped or f"({short_name})" in line_stripped:
124124
should_include = True
125125
else:
126126
should_include = True

.github/release-note-generation/test_generate_module_notes.py

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import subprocess
2+
import sys
23
import unittest
34
from pathlib import Path
45

@@ -17,7 +18,7 @@ def test_java_run_generation(self):
1718
expected_output = f.read()
1819

1920
cmd = [
20-
"python3",
21+
sys.executable,
2122
str(self.script_path),
2223
"--module",
2324
"google-cloud-run",
@@ -29,10 +30,9 @@ def test_java_run_generation(self):
2930
"run",
3031
]
3132
result = subprocess.run(
32-
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
33+
cmd, capture_output=True, text=True, check=True
3334
)
3435

35-
self.assertEqual(result.returncode, 0)
3636
self.assertEqual(result.stdout, expected_output)
3737

3838
def test_root_generation(self):
@@ -41,7 +41,7 @@ def test_root_generation(self):
4141
expected_output = f.read()
4242

4343
cmd = [
44-
"python3",
44+
sys.executable,
4545
str(self.script_path),
4646
"--module",
4747
"google-cloud-java",
@@ -51,10 +51,30 @@ def test_root_generation(self):
5151
"1.85.0",
5252
]
5353
result = subprocess.run(
54-
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
54+
cmd, capture_output=True, text=True, check=True
5555
)
5656

57-
self.assertEqual(result.returncode, 0)
57+
self.assertEqual(result.stdout, expected_output)
58+
59+
60+
def test_java_dataplex_generation(self):
61+
"""Test generating release notes for Dataplex module version 1.86.0."""
62+
args = [
63+
"--module", "google-cloud-dataplex",
64+
"--directory", "java-dataplex",
65+
"--version", "1.86.0",
66+
"--short-name", "dataplex"
67+
]
68+
69+
cmd = [sys.executable, str(self.script_path)] + args
70+
result = subprocess.run(
71+
cmd, capture_output=True, text=True, check=True
72+
)
73+
74+
golden_path = self.testdata_dir / "golden_java-dataplex_1.86.0.txt"
75+
with open(golden_path, "r") as f:
76+
expected_output = f.read()
77+
5878
self.assertEqual(result.stdout, expected_output)
5979

6080

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## [1.86.0](https://github.com/googleapis/google-cloud-java/compare/601ea6a901e...v1.82.0) (2026-03-20)
2+
3+
### ⚠ BREAKING CHANGES
4+
5+
* fix(dataplex)!: remove deprecated Explore-related methods and messages from public client libraries Breaking Changes: - Removed ContentService and all associated methods (CreateContent, UpdateContent, DeleteContent, GetContent, ListContent, etc.) and request/response messages. - Removed Environment and Session management methods from DataplexService (CreateEnvironment, UpdateEnvironment, DeleteEnvironment, ListEnvironments, GetEnvironment, ListSessions) and their associated messages. [googleapis/googleapis@69ca7ae](https://github.com/googleapis/googleapis/commit/69ca7ae2e66cd5623cafecc00971ef5397a4b258) ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
6+
7+
### Features
8+
9+
* feat(dataplex): add DataProductService to manage data products and underlying data assets ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
10+
* feat(dataplex): add MetadataFeed to CatalogService for tracking metadata changes ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
11+
* feat(dataplex): add LookupContext to CatalogService for LLM-generated resource context ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
12+
* feat(dataplex): add support for attaching aspects to EntryLinks ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
13+
* feat(dataplex): add UpdateEntryLink and LookupEntryLinks methods to CatalogService ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
14+
* feat(dataplex): support OneTime triggers for DataScan operations ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
15+
* feat(dataplex): add debug query support to Data Quality rules ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
16+
* feat(dataplex): allow selective generation scope for Data Documentation scans ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
17+
* feat(dataplex): add SKIPPED state to DataScan catalog publishing status ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
18+
19+
### Documentation
20+
21+
* docs(dataplex): remove deprecated metadata change warnings in Dataplex Catalog The DataProductService provides APIs to curate and manage collections of data assets as data products, enabling more organized sharing and usage for specific business cases. MetadataFeeds allow users to monitor metadata changes (CREATE, UPDATE, DELETE) within a specified scope (organization, project, or entry group) and publish them to Pub/Sub. CatalogService now includes a LookupContext API to provide LLM-generated context for resources, and enhanced EntryLink management, including the ability to attach aspects. DataScan operations now support a OneTime trigger for single-run scans, and Data Quality rules support DebugQueries to help investigate rule failures by returning diagnostic values. ([e29dd99](https://github.com/googleapis/google-cloud-java/commit/e29dd99559b04de62d2f91792a6352b5ce980438))
22+

generation_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
googleapis_commitish: 260e3f5d5dcf9692c77d14b01b47c16ef01837e9
1+
googleapis_commitish: 89c3153888201c9e80bc5ec78d6ffca0debe6b52
22
libraries_bom_version: 26.80.0
33
is_monorepo: true
44
libraries:

google-auth-library-java/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@
7676
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
7777
<project.google.http.version>2.1.0</project.google.http.version>
7878
<project.junit.version>5.11.4</project.junit.version>
79-
<project.guava.version>33.5.0-android</project.guava.version>
79+
<project.guava.version>33.5.0-jre</project.guava.version>
8080
<project.appengine.version>2.0.33</project.appengine.version>
8181
<project.findbugs.version>3.0.2</project.findbugs.version>
8282
<deploy.autorelease>false</deploy.autorelease>
83-
<project.error-prone.version>2.42.0</project.error-prone.version>
83+
<project.error-prone.version>2.45.0</project.error-prone.version>
8484
<project.protobuf.version>4.33.2</project.protobuf.version>
8585
<project.cel.version>0.9.0-proto3</project.cel.version>
8686
<project.tink.version>1.15.0</project.tink.version>
8787
<project.slf4j.version>2.0.17</project.slf4j.version>
8888
<project.gson.version>2.12.1</project.gson.version>
89-
<project.api-common.version>2.53.0</project.api-common.version>
89+
<project.api-common.version>2.62.0</project.api-common.version><!-- {x-version-update:api-common:current} -->
9090
<surefire.version>3.5.2</surefire.version>
9191
<clirr.skip>true</clirr.skip>
9292
</properties>

java-bigquery/google-cloud-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/BigQueryConnection.java

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,8 @@
4141
import com.google.cloud.bigquery.storage.v1.BigQueryWriteClient;
4242
import com.google.cloud.bigquery.storage.v1.BigQueryWriteSettings;
4343
import com.google.cloud.http.HttpTransportOptions;
44-
import com.google.gson.JsonObject;
45-
import com.google.gson.JsonParser;
4644
import java.io.IOException;
4745
import java.io.InputStream;
48-
import java.nio.charset.StandardCharsets;
4946
import java.sql.CallableStatement;
5047
import java.sql.Connection;
5148
import java.sql.DatabaseMetaData;
@@ -56,7 +53,6 @@
5653
import java.sql.Statement;
5754
import java.time.Duration;
5855
import java.util.ArrayList;
59-
import java.util.Base64;
6056
import java.util.ConcurrentModificationException;
6157
import java.util.List;
6258
import java.util.Map;
@@ -177,7 +173,7 @@ public class BigQueryConnection extends BigQueryNoOpsConnection {
177173
this.jobTimeoutInSeconds = ds.getJobTimeout();
178174
this.authProperties =
179175
BigQueryJdbcOAuthUtility.parseOAuthProperties(ds, this.connectionClassName);
180-
this.isReadOnlyTokenUsed = checkisReadOnlyTokenUsed(this.authProperties);
176+
this.isReadOnlyTokenUsed = checkIsReadOnlyTokenUsed(this.authProperties);
181177
this.catalog = ds.getProjectId();
182178
this.universeDomain = ds.getUniverseDomain();
183179

@@ -1204,39 +1200,12 @@ public boolean isReadOnlyTokenUsed() {
12041200
return this.isReadOnlyTokenUsed;
12051201
}
12061202

1207-
private boolean checkisReadOnlyTokenUsed(Map<String, String> authProps) {
1208-
if (authProps == null) {
1209-
return false;
1210-
}
1211-
BigQueryJdbcOAuthUtility.AuthType oauthType =
1212-
BigQueryJdbcOAuthUtility.AuthType.fromValue(
1213-
authProps.get(BigQueryJdbcUrlUtility.OAUTH_TYPE_PROPERTY_NAME));
1214-
if (oauthType != BigQueryJdbcOAuthUtility.AuthType.PRE_GENERATED_TOKEN) {
1215-
return false;
1216-
}
1217-
String token = authProps.get(BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_PROPERTY_NAME);
1218-
if (token == null || token.isEmpty()) {
1219-
return false;
1220-
}
1221-
1222-
// Try to parse scope from the token if it is a JWT
1223-
try {
1224-
String[] parts = token.split("\\.");
1225-
if (parts.length != 3) {
1226-
return false;
1227-
}
1228-
String payloadJson =
1229-
new String(Base64.getUrlDecoder().decode(parts[1]), StandardCharsets.UTF_8);
1230-
JsonObject payload = JsonParser.parseString(payloadJson).getAsJsonObject();
1231-
if (!payload.has("scope")) {
1232-
return false;
1233-
}
1234-
String scope = payload.get("scope").getAsString();
1235-
if (scope.contains("https://www.googleapis.com/auth/bigquery.readonly")) {
1236-
return true;
1237-
}
1238-
} catch (Exception e) {
1239-
// Likely invalid token and auth is going to fail later.
1203+
private boolean checkIsReadOnlyTokenUsed(Map<String, String> authProps) {
1204+
String readonlyValue =
1205+
authProps.get(BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_READONLY_PROPERTY_NAME);
1206+
if (readonlyValue != null) {
1207+
return BigQueryJdbcUrlUtility.convertIntToBoolean(
1208+
readonlyValue, BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_READONLY_PROPERTY_NAME);
12401209
}
12411210
return false;
12421211
}

java-bigquery/google-cloud-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/BigQueryJdbcOAuthUtility.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ static Map<String, String> parseOAuthProperties(DataSource ds, String callerClas
170170
}
171171
oauthProperties.put(
172172
BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_PROPERTY_NAME, ds.getOAuthAccessToken());
173+
oauthProperties.put(
174+
BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_READONLY_PROPERTY_NAME,
175+
String.valueOf(ds.getOAuthAccessTokenReadonly()));
173176
LOG.fine("OAuthAccessToken provided.");
174177
break;
175178
case APPLICATION_DEFAULT_CREDENTIALS:

java-bigquery/google-cloud-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/BigQueryJdbcUrlUtility.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ protected boolean removeEldestEntry(Map.Entry<String, Map<String, String>> eldes
9898
static final String BIGQUERY_ENDPOINT_OVERRIDE_PROPERTY_NAME = "BIGQUERY";
9999
static final String STS_ENDPOINT_OVERRIDE_PROPERTY_NAME = "STS";
100100
static final String OAUTH_ACCESS_TOKEN_PROPERTY_NAME = "OAuthAccessToken";
101+
static final String OAUTH_ACCESS_TOKEN_READONLY_PROPERTY_NAME = "OAuthAccessTokenReadonly";
101102
static final String OAUTH_REFRESH_TOKEN_PROPERTY_NAME = "OAuthRefreshToken";
102103
static final String OAUTH_CLIENT_ID_PROPERTY_NAME = "OAuthClientId";
103104
static final String OAUTH_CLIENT_SECRET_PROPERTY_NAME = "OAuthClientSecret";
@@ -248,6 +249,11 @@ protected boolean removeEldestEntry(Map.Entry<String, Map<String, String>> eldes
248249
"The pre-generated access token to be used with BigQuery for"
249250
+ " authentication.")
250251
.build(),
252+
BigQueryConnectionProperty.newBuilder()
253+
.setName(OAUTH_ACCESS_TOKEN_READONLY_PROPERTY_NAME)
254+
.setDescription(
255+
"Set to true if the pre-generated access token has a read-only scope.")
256+
.build(),
251257
BigQueryConnectionProperty.newBuilder()
252258
.setName(OAUTH_CLIENT_ID_PROPERTY_NAME)
253259
.setDescription(

java-bigquery/google-cloud-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/BigQueryStatement.java

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -581,31 +581,21 @@ ExecuteResult executeJob(QueryJobConfiguration jobConfiguration)
581581
// so we need to explicitly set it;
582582
// Do not set custom JobId here or it will disable jobless queries.
583583
JobId jobId = JobId.newBuilder().setLocation(connection.getLocation()).build();
584-
if (connection.getUseStatelessQueryMode()) {
585-
Object result = bigQuery.queryWithTimeout(jobConfiguration, jobId, null);
586-
if (result instanceof TableResult) {
587-
TableResult tableResult = (TableResult) result;
588-
if (tableResult.getJobId() != null) {
589-
return new ExecuteResult(tableResult, bigQuery.getJob(tableResult.getJobId()));
590-
}
591-
return new ExecuteResult((TableResult) result, null);
584+
Object result = bigQuery.queryWithTimeout(jobConfiguration, jobId, null);
585+
if (result instanceof TableResult) {
586+
TableResult tableResult = (TableResult) result;
587+
if (tableResult.getJobId() != null) {
588+
return new ExecuteResult(tableResult, bigQuery.getJob(tableResult.getJobId()));
592589
}
590+
return new ExecuteResult((TableResult) result, null);
591+
}
593592

594-
if (result instanceof Job) {
595-
job = (Job) result;
596-
} else {
597-
throw new BigQueryJdbcException("Unexpected result type from queryWithTimeout");
598-
}
593+
if (result instanceof Job) {
594+
job = (Job) result;
599595
} else {
600-
// Update jobId with custom JobId if jobless query is disabled.
601-
jobId = jobId.toBuilder().setJob(generateJobId()).build();
602-
JobInfo jobInfo = JobInfo.newBuilder(jobConfiguration).setJobId(jobId).build();
603-
job = bigQuery.create(jobInfo);
596+
throw new BigQueryJdbcException("Unexpected result type from queryWithTimeout");
604597
}
605598

606-
if (job == null) {
607-
throw new BigQueryJdbcException("Failed to create BQ Job.");
608-
}
609599
synchronized (cancelLock) {
610600
if (isCanceled) {
611601
job.cancel();
@@ -615,12 +605,12 @@ ExecuteResult executeJob(QueryJobConfiguration jobConfiguration)
615605
jobIds.add(jobId);
616606
}
617607
LOG.info("Query submitted with Job ID: " + job.getJobId().getJob());
618-
TableResult result =
608+
TableResult tableResult =
619609
job.getQueryResults(QueryResultsOption.pageSize(querySettings.getMaxResultPerPage()));
620610
synchronized (cancelLock) {
621611
jobIds.remove(jobId);
622612
}
623-
return new ExecuteResult(result, job);
613+
return new ExecuteResult(tableResult, job);
624614
}
625615

626616
/**

java-bigquery/google-cloud-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/DataSource.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public class DataSource implements javax.sql.DataSource {
6262
private String oAuthPvtKeyPath;
6363
private String oAuthPvtKey;
6464
private String oAuthAccessToken;
65+
private Boolean oAuthAccessTokenReadonly;
6566
private String oAuthRefreshToken;
6667
private Boolean useQueryCache;
6768
private String queryDialect;
@@ -175,6 +176,12 @@ public class DataSource implements javax.sql.DataSource {
175176
.put(
176177
BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_PROPERTY_NAME,
177178
DataSource::setOAuthAccessToken)
179+
.put(
180+
BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_READONLY_PROPERTY_NAME,
181+
(ds, val) ->
182+
ds.setOAuthAccessTokenReadonly(
183+
BigQueryJdbcUrlUtility.convertIntToBoolean(
184+
val, BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_READONLY_PROPERTY_NAME)))
178185
.put(
179186
BigQueryJdbcUrlUtility.OAUTH_REFRESH_TOKEN_PROPERTY_NAME,
180187
DataSource::setOAuthRefreshToken)
@@ -451,6 +458,11 @@ private Properties createProperties() {
451458
connectionProperties.setProperty(
452459
BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_PROPERTY_NAME, this.oAuthAccessToken);
453460
}
461+
if (this.oAuthAccessTokenReadonly != null) {
462+
connectionProperties.setProperty(
463+
BigQueryJdbcUrlUtility.OAUTH_ACCESS_TOKEN_READONLY_PROPERTY_NAME,
464+
String.valueOf(this.oAuthAccessTokenReadonly));
465+
}
454466
if (this.oAuthRefreshToken != null) {
455467
connectionProperties.setProperty(
456468
BigQueryJdbcUrlUtility.OAUTH_REFRESH_TOKEN_PROPERTY_NAME, this.oAuthRefreshToken);
@@ -879,6 +891,14 @@ public void setOAuthAccessToken(String oAuthAccessToken) {
879891
this.oAuthAccessToken = oAuthAccessToken;
880892
}
881893

894+
public Boolean getOAuthAccessTokenReadonly() {
895+
return oAuthAccessTokenReadonly != null ? oAuthAccessTokenReadonly : false;
896+
}
897+
898+
public void setOAuthAccessTokenReadonly(Boolean oAuthAccessTokenReadonly) {
899+
this.oAuthAccessTokenReadonly = oAuthAccessTokenReadonly;
900+
}
901+
882902
public String getOAuthRefreshToken() {
883903
return oAuthRefreshToken;
884904
}

0 commit comments

Comments
 (0)