Skip to content

Commit ecfc3df

Browse files
authored
Merge branch 'main' into add-cumulative-hasher
2 parents f5a9e50 + bc90e19 commit ecfc3df

2,802 files changed

Lines changed: 240435 additions & 59564 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/ISSUE_TEMPLATE/bug_report.md

Lines changed: 95 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,119 @@ about: Create a report to help us improve
66

77
Thanks for stopping by to let us know something could be better!
88

9-
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
9+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. We try to review GitHub issues on a regular basis, however we cannot guarantee an SLO.
1010

11-
Please run down the following list and make sure you've tried the usual "quick fixes":
11+
Before creating this issue, please run down the following list and make sure you've tried the usual "quick fixes":
1212

1313
- Search the issues already opened: https://github.com/googleapis/google-cloud-java/issues
1414
- Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform
15+
- Refer to the [Google Cloud Java Getting Started guides](https://docs.cloud.google.com/java/getting-started) for common usage patterns and troubleshooting.
16+
- Verify you are using the latest versions of the Java SDK. If not, is it possible to upgrade? We recommend using the [Libraries-Bom](https://cloud.google.com/java/docs/bom) to manage dependency versions.
1517

16-
If you are still having issues, please include as much information as possible:
18+
To help expedite the resolution of the issue, please fill out as much information as possible. If unable to provide information, please note down why the information is unable to be provided.
1719

18-
#### Environment details
20+
## Issue Details
1921

20-
1. Specify the API at the beginning of the title. For example, "[vision]: ...").
21-
General, Core, and Other are also allowed as types
22-
2. OS type and version:
23-
3. Java version:
24-
4. Version(s):
22+
Required: Provide a detailed description of the issue. Any additional information helps with figuring out the issue.
2523

26-
#### Steps to reproduce
24+
### Example
25+
I am seeing {ISSUE} when running X, Y... after doing Z. This behavior started after the X library upgrade a few weeks ago ...
2726

28-
1. ?
29-
2. ?
27+
## Environment
3028

31-
#### Code example
29+
Required: Provide details about your environment. If relevant, please also provide details about your GCP environment. The environment details MUST be filled out.
3230

33-
```java
34-
// example
31+
Provide the relevant details about your environment:
32+
33+
- OS Type and Version:
34+
- Java Version and JDK Vendor:
35+
- (If using GraalVM) GraalVM Version:
36+
37+
(Optional) If deployed on GCP, provide the relevant details about your GCP deployment environment:
38+
39+
- Project ID:
40+
- Cloud Services:
41+
- Deployment Environment (Compute, GKE, Run, etc):
42+
43+
## Dependencies
44+
45+
Required: Provide a list of the dependencies that are being used. If unable to provide the list, please list the relevant libraries shown below. One of the two sections below MUST be filled out.
46+
47+
1. List your application’s dependency versions. Please provide the output of `mvn dependency:tree`, `gradle dependencies`, or your build system.
48+
49+
### Example `mvn dependency:tree` output
3550
```
51+
maven-dependency-plugin:tree
52+
53+
- com.google.cloud:{X}:{Y}
54+
55+
- com.google.auth:{X}:{Y}
56+
57+
...
58+
```
59+
60+
2. Provide the versions of the relevant libraries:
61+
- Libraries-Bom ([com.google.cloud:libraries-bom](https://central.sonatype.com/artifact/com.google.cloud/libraries-bom)):
62+
- (If not using Libraries-Bom) Client Libraries:
63+
- Gax (gax / gax-grpc / gax-httpjson):
64+
- Auth (google-auth-library-oauth2-http / google-auth-library-credentials):
65+
- Any other relevant Java SDK dependencies:
66+
- Google-Http-Java-Client ([com.google.http-client:google-http-client](https://central.sonatype.com/artifact/com.google.http-client/google-http-client)):
67+
68+
## Reproducer
69+
70+
Required: Provide a reproducer and the steps needed to reproduce this issue locally. If unable to provide a reproducer, please provide code snippets to help reproduce the issue. One of the two sections below MUST be filled out.
3671

37-
#### Stack trace
72+
1. A reproducer is the quickest method to resolve this issue. It could be a test case or a sample application. It is easier for us to troubleshoot the problem and to verify the solution.
73+
74+
Steps to reproduce:
75+
76+
### Example
77+
1. Enable Speech API
78+
2. Upload a .mp4 file to GCS
79+
3. ...
80+
4. See {ERROR}
81+
82+
If unable to provide a reproducer, please provide a reason: ...
83+
84+
2. Provide as many code snippets as possible:
85+
86+
### Example
87+
```java
88+
try (InstancesClient instancesClient = InstancesClient.create()) {
89+
...
90+
}
3891
```
39-
Any relevant stacktrace here.
92+
93+
## Logs and Stack Trace
94+
95+
Required: Provide logs that showcase the error. This will help show the flow of the application and help narrow down the cause. Additionally, provide a stack trace of the error if possible.
96+
97+
The Java SDK has a troubleshooting [guide](https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md) for enabling logs. This contains information regarding client-server communication, request and response details, and logging in dependency libraries. If using this guide, please obfuscate any private information (bearer tokens, request and response params, etc).
98+
99+
Additionally, please provide a stack trace of the error seen:
100+
101+
### Example
40102
```
103+
TransportContext.java:347|Fatal (CERTIFICATE_UNKNOWN): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (
104+
105+
"throwable" : {
41106
42-
#### External references such as API reference guides
107+
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
43108
44-
- ?
109+
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:456)
110+
111+
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:323)
112+
113+
...
114+
```
45115

46-
#### Any additional information below
116+
## Behavior
47117

118+
Optional: Any additional information about the behavior of the error is helpful to debug.
48119

49-
Following these steps guarantees the quickest resolution possible.
120+
Behavioral Questions:
50121

51-
Thanks!
122+
- When did the issue begin? Is this behavior related to any dependency version upgrade?
123+
- Is this behavior flaky? Or is this consistently seen in production?
124+
- Is this behavior related to the volume of data?

.github/workflows/generated_files_sync.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
pull_request:
1818
name: generation diff
1919
env:
20-
library_generation_image_tag: 2.73.0-SNAPSHOT # {x-version-update:gapic-generator-java:current}
20+
library_generation_image_tag: 2.73.0 # {x-version-update:gapic-generator-java:current}
2121
jobs:
2222
root-pom:
2323
# root pom.xml does not have diff from generated one

.github/workflows/hermetic_library_generation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
2222
GITHUB_REPOSITORY: ${{ github.repository }}
2323
# {x-version-update-start:gapic-generator-java:current}
24-
GENERATOR_VERSION: 2.73.0-SNAPSHOT
24+
GENERATOR_VERSION: 2.73.0
2525
# {x-version-update-end}
2626
jobs:
2727
library_generation:

.github/workflows/librarian_generation_check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
name: Librarian generate diff check on pull requests
14+
name: Librarian - Generate diff check on pull requests
1515
on:
1616
pull_request:
1717

.github/workflows/showcase-version-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Showcase Version Check
15+
name: Librarian - Showcase Version Check
1616

1717
on:
1818
schedule:

.github/workflows/update_generation_config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# downstream client libraries before they are released.
1616
name: Update generation configuration
1717
on:
18-
schedule:
19-
- cron: '0 2 * * *'
2018
workflow_dispatch:
2119
jobs:
2220
update-generation-config:

.github/workflows/update_librarian_googleapis.yaml

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Update librarian googleapis commitish
15+
name: Librarian - Update googleapis commitish and generate all
1616
on:
1717
schedule:
1818
- cron: '0 3 * * *' # Run once a day at 3:00 AM UTC
@@ -68,8 +68,13 @@ jobs:
6868
new_commit=$(go run "github.com/googleapis/librarian/cmd/librarian@${version}" config get sources.googleapis.commit)
6969
echo "new_commit=${new_commit}" >> $GITHUB_OUTPUT
7070
echo "short_commit=${new_commit:0:7}" >> $GITHUB_OUTPUT
71-
- name: Detect Changes
72-
id: detect
71+
# TODO(https://github.com/googleapis/librarian/issues/6220): Remove this step.
72+
- name: Update generation_config.yaml
73+
run: |
74+
sed -i -e "s/^googleapis_commitish.*$/googleapis_commitish: ${{ steps.commit.outputs.new_commit }}/" generation_config.yaml
75+
git diff generation_config.yaml
76+
- name: Detect Changes To Librarian.yaml
77+
id: detect_librarian
7378
run: |
7479
git add librarian.yaml
7580
changed_files=$(git diff --cached --name-only)
@@ -79,19 +84,58 @@ jobs:
7984
else
8085
echo "has_changes=true" >> $GITHUB_OUTPUT
8186
fi
87+
- name: Install protoc
88+
if: steps.detect_librarian.outputs.has_changes == 'true'
89+
run: |
90+
set -e
91+
VERSION="33.2"
92+
curl -fsSL --retry 5 --retry-delay 15 -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v$VERSION/protoc-$VERSION-linux-x86_64.zip"
93+
cd /usr/local
94+
sudo unzip -o /tmp/protoc.zip
95+
protoc --version
96+
- uses: actions/setup-java@v4
97+
if: steps.detect_librarian.outputs.has_changes == 'true'
98+
with:
99+
java-version: "17"
100+
distribution: "temurin"
101+
cache: "maven"
102+
- name: Verify Java and Maven installation
103+
if: steps.detect_librarian.outputs.has_changes == 'true'
104+
run: |
105+
java -version
106+
if ! command -v mvn &> /dev/null; then
107+
sudo apt-get update && sudo apt-get install -y maven
108+
fi
109+
mvn -version
110+
- uses: actions/setup-python@v5
111+
if: steps.detect_librarian.outputs.has_changes == 'true'
112+
with:
113+
python-version: "3.12"
114+
cache: 'pip'
115+
- name: Run librarian install
116+
if: steps.detect_librarian.outputs.has_changes == 'true'
117+
run: |
118+
go run github.com/googleapis/librarian/cmd/librarian@latest install
119+
echo "$HOME/java_tools/bin" >> $GITHUB_PATH
120+
env:
121+
PYTHONPATH: ${{ github.workspace }}/sdk-platform-java/hermetic_build/library_generation/owlbot
122+
- name: Generate Libraries
123+
if: steps.detect_librarian.outputs.has_changes == 'true'
124+
run: |
125+
go run github.com/googleapis/librarian/cmd/librarian@latest generate --all
82126
- name: Commit and Create PR
83-
if: steps.detect.outputs.has_changes == 'true'
127+
if: steps.detect_librarian.outputs.has_changes == 'true'
84128
env:
85129
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
86130
PR_TITLE: "chore: update googleapis commitish to ${{ steps.commit.outputs.short_commit }}"
87-
PR_BODY: "Updated googleapis commitish in librarian.yaml to https://github.com/googleapis/googleapis/commit/${{ steps.commit.outputs.new_commit }}"
131+
PR_BODY: "Updated googleapis commitish in librarian.yaml and generation_config.yaml to https://github.com/googleapis/googleapis/commit/${{ steps.commit.outputs.new_commit }}"
88132
run: |
89133
set -x
90134
91135
if [ "${{ github.event_name }}" = "pull_request" ]; then
92136
echo "=== PR Test: DRY RUN MODE ACTIVE ==="
93137
echo "Would have checked out branch: update-librarian-googleapis-main"
94-
echo "Would have committed with title: $PR_TITLE"
138+
echo "Would have committed configs with title: $PR_TITLE"
95139
echo "Would have pushed branch and created PR."
96140
exit 0
97141
fi
@@ -105,8 +149,22 @@ jobs:
105149
# Create and switch to the branch (force checkout -B to discard any local state on this branch name if it existed)
106150
git checkout -B "${current_branch}"
107151
108-
# Commit the changes (they are already staged by the Detect Changes step!)
109-
git commit -m "${PR_TITLE}"
152+
# 1. Commit Config Changes
153+
# Ensure they are staged
154+
git add librarian.yaml generation_config.yaml
155+
if ! git diff --cached --quiet; then
156+
git commit -m "${PR_TITLE}"
157+
else
158+
echo "No config changes to commit"
159+
fi
160+
161+
# 2. Commit Generated Code
162+
git add .
163+
if ! git diff --cached --quiet; then
164+
git commit -m "chore: generate libraries"
165+
else
166+
echo "No generated code changes to commit"
167+
fi
110168
111169
# Push to remote (force push to overwrite any stale branch on remote)
112170
git remote add remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${{ github.repository }}.git" || git remote set-url remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${{ github.repository }}.git"

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.86.0"
2+
".": "1.87.0"
33
}

0 commit comments

Comments
 (0)