Skip to content

Commit

Permalink
Merge branch 'main' into renovate/googleapis-java-cloud-bom-digest
Browse files Browse the repository at this point in the history
  • Loading branch information
alicejli committed May 3, 2024
2 parents afb3c00 + 1cbb681 commit ca5059e
Show file tree
Hide file tree
Showing 85 changed files with 1,653 additions and 501 deletions.
2 changes: 1 addition & 1 deletion .cloudbuild/graalvm/cloudbuild-test-a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.29.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_SHARED_DEPENDENCIES_VERSION: '3.30.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.7.7'

steps:
Expand Down
2 changes: 1 addition & 1 deletion .cloudbuild/graalvm/cloudbuild-test-b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.29.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_SHARED_DEPENDENCIES_VERSION: '3.30.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.7.7'

steps:
Expand Down
2 changes: 1 addition & 1 deletion .cloudbuild/graalvm/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.29.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_SHARED_DEPENDENCIES_VERSION: '3.30.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.7.7'
steps:
# GraalVM A build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

timeout: 7200s # 2 hours
substitutions:
_GAPIC_GENERATOR_JAVA_VERSION: '2.39.1-SNAPSHOT' # {x-version-update:gapic-generator-java:current}
_GAPIC_GENERATOR_JAVA_VERSION: '2.40.1-SNAPSHOT' # {x-version-update:gapic-generator-java:current}
_IMAGE_ID: "gcr.io/cloud-devrel-public-resources/java-library-generation:${_GAPIC_GENERATOR_JAVA_VERSION}"
steps:
# Library generation build
Expand Down
66 changes: 54 additions & 12 deletions .cloudbuild/library_generation/library_generation.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,68 @@
# build from the root of this repo:
FROM gcr.io/cloud-devrel-public-resources/python

# install tools
ARG SYNTHTOOL_COMMITTISH=63cc541da2c45fcfca2136c43e638da1fbae174d
ARG OWLBOT_CLI_COMMITTISH=ac84fa5c423a0069bbce3d2d869c9730c8fdf550
ENV HOME=/home

# install OS tools
RUN apt-get update && apt-get install -y \
unzip openjdk-17-jdk rsync maven jq \
&& apt-get clean

COPY library_generation /src

# use python 3.11 (the base image has several python versions; here we define the default one)
RUN rm $(which python3)
RUN ln -s $(which python3.11) /usr/local/bin/python
RUN ln -s $(which python3.11) /usr/local/bin/python3
RUN python -m pip install --upgrade pip
RUN cd /src && python -m pip install -r requirements.txt
RUN cd /src && python -m pip install .

# set dummy git credentials for empty commit used in postprocessing
RUN git config --global user.email "cloud-java-bot@google.com"
RUN git config --global user.name "Cloud Java Bot"
# copy source code
COPY library_generation /src

WORKDIR /workspace
RUN chmod 750 /workspace
RUN chmod 750 /src/generate_repo.py
# install scripts as a python package
WORKDIR /src
RUN python -m pip install -r requirements.txt
RUN python -m pip install .

# install synthtool
WORKDIR /tools
RUN git clone https://github.com/googleapis/synthtool
WORKDIR /tools/synthtool
RUN git checkout "${SYNTHTOOL_COMMITTISH}"
RUN python3 -m pip install --no-deps -e .
RUN python3 -m pip install -r requirements.in

CMD [ "/src/generate_repo.py" ]
# Install nvm with node and npm
ENV NODE_VERSION 20.12.0
WORKDIR /home
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
RUN chmod o+rx /home/.nvm
ENV NODE_PATH=/home/.nvm/versions/node/v${NODE_VERSION}/bin
ENV PATH=${PATH}:${NODE_PATH}
RUN node --version
RUN npm --version

# install the owl-bot CLI
WORKDIR /tools
RUN git clone https://github.com/googleapis/repo-automation-bots
WORKDIR /tools/repo-automation-bots/packages/owl-bot
RUN git checkout "${OWLBOT_CLI_COMMITTISH}"
RUN npm i && npm run compile && npm link
RUN owl-bot copy-code --version
RUN chmod -R o+rx ${NODE_PATH}
RUN ln -sf ${NODE_PATH}/* /usr/local/bin

# allow users to access the script folders
RUN chmod -R o+rx /src

# set dummy git credentials for the empty commit used in postprocessing
# we use system so all users using the container will use this configuration
RUN git config --system user.email "cloud-java-bot@google.com"
RUN git config --system user.name "Cloud Java Bot"

# allow read-write for /home and execution for binaries in /home/.nvm
RUN chmod -R a+rw /home
RUN chmod -R a+rx /home/.nvm

WORKDIR /workspace
ENTRYPOINT [ "python", "/src/cli/entry_point.py", "generate" ]
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
Expand Down
59 changes: 48 additions & 11 deletions .github/workflows/verify_library_generation.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
on:
push:
branches:
- main
pull_request:
paths:
- library_generation/**

workflow_dispatch:
name: verify_library_generation
jobs:
integration_tests:
should-run-library-generation-tests:
runs-on: ubuntu-22.04
outputs:
should_run: ${{ steps.get_changed_directories.outputs.should_run }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: get changed directories in the pull request
id: get_changed_directories
shell: bash
run: |
set -ex
# PRs that come from a fork need to be handled differently
if [[ ${head_repo_name} == ${base_repo} ]]; then
git checkout ${base_ref}
git checkout ${head_ref}
changed_directories="$(git diff --name-only ${base_ref} ${head_ref})"
else
git remote add fork ${head_repo_url}
git fetch fork # create a mapping of the fork
git checkout -b "${head_ref}" fork/${head_ref}
changed_directories="$(git diff --name-only "fork/${head_ref}" "origin/${base_ref}")"
fi
if [[ ${changed_directories} =~ "library_generation/" ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi
env:
base_ref: ${{ github.event.pull_request.base.ref }}
head_ref: ${{ github.event.pull_request.head.ref }}
head_repo_url: ${{ github.event.pull_request.head.repo.html_url }}
head_repo_name: ${{ github.event.pull_request.head.repo.full_name }}
base_repo: ${{ github.repository }}
library-generation-integration-tests:
runs-on: ubuntu-22.04
needs: should-run-library-generation-tests
if: needs.should-run-library-generation-tests.outputs.should_run == 'true'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -41,12 +72,14 @@ jobs:
run: |
set -x
python -m unittest library_generation/test/integration_tests.py
unit_tests:
library-generation-unit-tests:
runs-on: ${{ matrix.os }}
needs: should-run-library-generation-tests
if: needs.should-run-library-generation-tests.outputs.should_run == 'true'
strategy:
matrix:
java: [ 8 ]
os: [ ubuntu-22.04, macos-12 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: install utils (macos)
Expand Down Expand Up @@ -88,8 +121,10 @@ jobs:
run: |
set -x
python -m unittest discover -s library_generation/test/ -p "*unit_tests.py"
lint-shell:
library-generation-lint-shell:
runs-on: ubuntu-22.04
needs: should-run-library-generation-tests
if: needs.should-run-library-generation-tests.outputs.should_run == 'true'
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
Expand All @@ -98,8 +133,10 @@ jobs:
scandir: 'library_generation'
format: tty
severity: error
lint-python:
library-generation-lint-python:
runs-on: ubuntu-22.04
needs: should-run-library-generation-tests
if: needs.should-run-library-generation-tests.outputs.should_run == 'true'
steps:
- uses: actions/checkout@v4
- name: install python dependencies
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.39.0"
".": "2.40.0"
}
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## [2.40.0](https://github.com/googleapis/sdk-platform-java/compare/v2.39.0...v2.40.0) (2024-05-02)


### Features

* [common-protos] add `Weight` to common types for Shopping APIs to be used for accounts bundle ([#2699](https://github.com/googleapis/sdk-platform-java/issues/2699)) ([5bb9770](https://github.com/googleapis/sdk-platform-java/commit/5bb97700ddcef1b0494808b1e7d8029d92c74d13))
* add a CLI tool to validate generation configuration ([#2691](https://github.com/googleapis/sdk-platform-java/issues/2691)) ([f2ce524](https://github.com/googleapis/sdk-platform-java/commit/f2ce52478a03048b9daffc3fc535f12cf2a9f856))
* Parser to consume the api-versioning value from proto ([#2630](https://github.com/googleapis/sdk-platform-java/issues/2630)) ([40711fd](https://github.com/googleapis/sdk-platform-java/commit/40711fd69468a2021108bb5fba00bb02ac4bb19f))
* Update Gapic generator and Gax to emit api-versioning via header ([#2671](https://github.com/googleapis/sdk-platform-java/issues/2671)) ([e63d1b4](https://github.com/googleapis/sdk-platform-java/commit/e63d1b49159be07f0bb32bfe9d15c8445ac883c8))


### Bug Fixes

* change folder prefix for adding headers ([#2688](https://github.com/googleapis/sdk-platform-java/issues/2688)) ([4e92be8](https://github.com/googleapis/sdk-platform-java/commit/4e92be8885af8633ea5b3371c43be9423a0f95ef))
* Log HttpJson's async thread pool core size ([#2697](https://github.com/googleapis/sdk-platform-java/issues/2697)) ([34b4bc3](https://github.com/googleapis/sdk-platform-java/commit/34b4bc3362f3c30bd77f5a59c3cb3aea36358eee))
* replace `cfg = "host"` with `cfg = "exec"` ([#2637](https://github.com/googleapis/sdk-platform-java/issues/2637)) ([6d673f3](https://github.com/googleapis/sdk-platform-java/commit/6d673f39dc10b072ba6012fecc17deb22136650e))
* Return resolved endpoint from StubSettings' Builder ([#2715](https://github.com/googleapis/sdk-platform-java/issues/2715)) ([32c9995](https://github.com/googleapis/sdk-platform-java/commit/32c99953496fe3e0ab47c67aad4117c242d1c798))


### Dependencies

* Make opentelemetry-api an optional dependency. ([#2681](https://github.com/googleapis/sdk-platform-java/issues/2681)) ([3967a19](https://github.com/googleapis/sdk-platform-java/commit/3967a19e8b68c3a95cf1ced737f3a1aa73b02e93))
* update dependency absl-py to v2.1.0 ([#2659](https://github.com/googleapis/sdk-platform-java/issues/2659)) ([cae6d79](https://github.com/googleapis/sdk-platform-java/commit/cae6d79ed29fd9e64abe4e9390a46b1f9f1d305f))
* update dependency gitpython to v3.1.43 ([#2656](https://github.com/googleapis/sdk-platform-java/issues/2656)) ([208bef4](https://github.com/googleapis/sdk-platform-java/commit/208bef468b11d49e85d4df4008d99c7a2de9233c))
* update dependency lxml to v5.2.1 ([#2661](https://github.com/googleapis/sdk-platform-java/issues/2661)) ([b95ad49](https://github.com/googleapis/sdk-platform-java/commit/b95ad49834e0422e79f884b42cf5c81c89bb25fb))
* update dependency net.bytebuddy:byte-buddy to v1.14.14 ([#2703](https://github.com/googleapis/sdk-platform-java/issues/2703)) ([87069bc](https://github.com/googleapis/sdk-platform-java/commit/87069bc9618704e2607aeae486d8481e4454dc17))
* update dependency typing to v3.10.0.0 ([#2663](https://github.com/googleapis/sdk-platform-java/issues/2663)) ([7fb5653](https://github.com/googleapis/sdk-platform-java/commit/7fb565324427a98948c6d253066b734a4b5832bc))
* update gapic-showcase to v0.33.0 ([#2653](https://github.com/googleapis/sdk-platform-java/issues/2653)) ([0a71cbf](https://github.com/googleapis/sdk-platform-java/commit/0a71cbf7092279c50f9f5114b79d8c674cdef997))


### Documentation

* Add contributing guidelines to PR and issue templates ([#2682](https://github.com/googleapis/sdk-platform-java/issues/2682)) ([42526dc](https://github.com/googleapis/sdk-platform-java/commit/42526dc03e00a2e01e8f7a075817560089f378ee))

## [2.39.0](https://github.com/googleapis/sdk-platform-java/compare/v2.38.1...v2.39.0) (2024-04-18)


Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ maven_install(
repositories = ["https://repo.maven.apache.org/maven2/"],
)

_gapic_generator_java_version = "2.39.1-SNAPSHOT" # {x-version-update:gapic-generator-java:current}
_gapic_generator_java_version = "2.40.1-SNAPSHOT" # {x-version-update:gapic-generator-java:current}

maven_install(
artifacts = [
Expand Down
4 changes: 2 additions & 2 deletions api-common-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<groupId>com.google.api</groupId>
<artifactId>api-common</artifactId>
<packaging>jar</packaging>
<version>2.30.1-SNAPSHOT</version><!-- {x-version-update:api-common:current} -->
<version>2.31.1-SNAPSHOT</version><!-- {x-version-update:api-common:current} -->
<name>API Common</name>
<description>Common utilities for Google APIs in Java</description>

<parent>
<groupId>com.google.api</groupId>
<artifactId>gapic-generator-java-pom-parent</artifactId>
<version>2.39.1-SNAPSHOT</version><!-- {x-version-update:gapic-generator-java:current} -->
<version>2.40.1-SNAPSHOT</version><!-- {x-version-update:gapic-generator-java:current} -->
<relativePath>../gapic-generator-java-pom-parent</relativePath>
</parent>

Expand Down
8 changes: 4 additions & 4 deletions coverage-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax</artifactId>
<version>2.47.1-SNAPSHOT</version> <!-- {x-version-update:gax:current} -->
<version>2.48.1-SNAPSHOT</version> <!-- {x-version-update:gax:current} -->
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
<version>2.47.1-SNAPSHOT</version> <!-- {x-version-update:gax-grpc:current} -->
<version>2.48.1-SNAPSHOT</version> <!-- {x-version-update:gax-grpc:current} -->
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-httpjson</artifactId>
<version>2.47.1-SNAPSHOT</version> <!-- {x-version-update:gax:current} -->
<version>2.48.1-SNAPSHOT</version> <!-- {x-version-update:gax:current} -->
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>api-common</artifactId>
<version>2.30.1-SNAPSHOT</version> <!-- {x-version-update:api-common:current} -->
<version>2.31.1-SNAPSHOT</version> <!-- {x-version-update:api-common:current} -->
</dependency>
</dependencies>

Expand Down

0 comments on commit ca5059e

Please sign in to comment.