From 712af4b51352d4fc42026af0e58a6a525a7d9201 Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:49:58 -0400 Subject: [PATCH 01/18] chore: update plugin version pom template (#2704) In this PR: - The `maven-deploy-plugin` in google-cloud-java is updated to `3.1.2`, update the version in template. - Restore `typing` version to `3.7.4.3` because this is the highest version supported by python 3.11.x --- library_generation/requirements.txt | 2 +- library_generation/templates/root-pom.xml.j2 | 2 +- .../test/resources/test_monorepo_postprocessing/pom-golden.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library_generation/requirements.txt b/library_generation/requirements.txt index e194b4813b..bd8fc35915 100644 --- a/library_generation/requirements.txt +++ b/library_generation/requirements.txt @@ -14,7 +14,7 @@ pathspec==0.12.1 platformdirs==4.1.0 PyYAML==6.0.1 smmap==5.0.1 -typing==3.10.0.0 +typing==3.7.4.3 parameterized==0.9.0 # used in parameterized test colorlog==6.8.2 watchdog==4.0.0 diff --git a/library_generation/templates/root-pom.xml.j2 b/library_generation/templates/root-pom.xml.j2 index c48e8b71ef..a713cefa2c 100644 --- a/library_generation/templates/root-pom.xml.j2 +++ b/library_generation/templates/root-pom.xml.j2 @@ -25,7 +25,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.1 + 3.1.2 true diff --git a/library_generation/test/resources/test_monorepo_postprocessing/pom-golden.xml b/library_generation/test/resources/test_monorepo_postprocessing/pom-golden.xml index 8347287bc3..44a1df9409 100644 --- a/library_generation/test/resources/test_monorepo_postprocessing/pom-golden.xml +++ b/library_generation/test/resources/test_monorepo_postprocessing/pom-golden.xml @@ -25,7 +25,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.1 + 3.1.2 true From b45eb847b91e1c65404f75f42cd4e9a900222d4b Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:50:03 -0400 Subject: [PATCH 02/18] chore: run library generation jobs conditionally (#2698) In this PR: - Add a job to get changed directories in pull request. - Run library generation tests only if the changed directories contains `library_generation`. Verified in - [Run tests](https://github.com/googleapis/sdk-platform-java/actions/runs/8887270660/job/24402267953) - [Don't run tests](https://github.com/googleapis/sdk-platform-java/actions/runs/8887279933/job/24402294618) The goal is to make library generation tests as a required check. Moreover, we don't want these tests run against every pull requests because only pull requests change library_generation directory should be tested. Currently, the workflow can only run if the files changed are within `paths`. Therefore, we can't set this workflow as required because it will get stuck and prevent merging for pull requests that don't change files within paths. Using this approach, this workflow runs on every pull request and only run actual tests when the condition is met (determined by the first job). Official docs: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks We can make the workflow required after merging this PR and the tests in the workflow will only run if the changed directories contains `library_generation`. --- .../workflows/verify_library_generation.yaml | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index c51f8ed7b0..8feec8a9d6 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -3,14 +3,38 @@ on: 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 + git checkout "${base_ref}" + git checkout "${head_ref}" + changed_directories="$(git diff --name-only ${base_ref} ${head_ref})" + 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 }} + 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 @@ -41,12 +65,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) @@ -88,8 +114,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 @@ -98,8 +126,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 From aab99687e9a63cf78face29102361bf797fd700f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 30 Apr 2024 22:04:17 +0200 Subject: [PATCH 03/18] build(deps): update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.3 (#2701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-shade-plugin](https://maven.apache.org/plugins/) | `3.5.2` -> `3.5.3` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.apache.maven.plugins:maven-shade-plugin/3.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.apache.maven.plugins:maven-shade-plugin/3.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.apache.maven.plugins:maven-shade-plugin/3.5.2/3.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.apache.maven.plugins:maven-shade-plugin/3.5.2/3.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/sdk-platform-java). --- gapic-generator-java/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapic-generator-java/pom.xml b/gapic-generator-java/pom.xml index 923191445c..5b1145d0bd 100644 --- a/gapic-generator-java/pom.xml +++ b/gapic-generator-java/pom.xml @@ -351,7 +351,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.5.2 + 3.5.3 package From eb365760726342f3fe7aa9badf08ef0a8077de36 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 30 Apr 2024 22:04:21 +0200 Subject: [PATCH 04/18] build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3.1.2 (#2702) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-deploy-plugin](https://maven.apache.org/plugins/) | `3.1.1` -> `3.1.2` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.apache.maven.plugins:maven-deploy-plugin/3.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.apache.maven.plugins:maven-deploy-plugin/3.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.apache.maven.plugins:maven-deploy-plugin/3.1.1/3.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.apache.maven.plugins:maven-deploy-plugin/3.1.1/3.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/sdk-platform-java). --- .../owlbot/templates/java_library/samples/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library_generation/owlbot/templates/java_library/samples/pom.xml b/library_generation/owlbot/templates/java_library/samples/pom.xml index add08dc502..e653958eb4 100644 --- a/library_generation/owlbot/templates/java_library/samples/pom.xml +++ b/library_generation/owlbot/templates/java_library/samples/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.1 + 3.1.2 true diff --git a/pom.xml b/pom.xml index bb18ea81cd..a26c57a42a 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.1 + 3.1.2 true From 87069bc9618704e2607aeae486d8481e4454dc17 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 30 Apr 2024 22:06:23 +0200 Subject: [PATCH 05/18] deps: update dependency net.bytebuddy:byte-buddy to v1.14.14 (#2703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [net.bytebuddy:byte-buddy](https://bytebuddy.net) | `1.14.13` -> `1.14.14` | [![age](https://developer.mend.io/api/mc/badges/age/maven/net.bytebuddy:byte-buddy/1.14.14?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/net.bytebuddy:byte-buddy/1.14.14?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/net.bytebuddy:byte-buddy/1.14.13/1.14.14?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/net.bytebuddy:byte-buddy/1.14.13/1.14.14?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/sdk-platform-java). --- gax-java/dependencies.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gax-java/dependencies.properties b/gax-java/dependencies.properties index 6519fdfe96..e76c827179 100644 --- a/gax-java/dependencies.properties +++ b/gax-java/dependencies.properties @@ -83,5 +83,5 @@ maven.org_mockito_mockito_core=org.mockito:mockito-core:2.28.2 maven.org_hamcrest_hamcrest_core=org.hamcrest:hamcrest-core:1.3 maven.com_google_truth_truth=com.google.truth:truth:1.4.2 maven.com_googlecode_java_diff_utils_diffutils=com.googlecode.java-diff-utils:diffutils:1.3.0 -maven.net_bytebuddy_byte_buddy=net.bytebuddy:byte-buddy:1.14.13 +maven.net_bytebuddy_byte_buddy=net.bytebuddy:byte-buddy:1.14.14 maven.org_objenesis_objenesis=org.objenesis:objenesis:2.6 From 16aec03465be61e9732a2213d0df2fd2181c7149 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Wed, 1 May 2024 13:14:23 -0400 Subject: [PATCH 06/18] chore: bake synthtool and owl-bot into library_generation docker image (#2615) ## Context [Milestone 7 of Hermetic Build](https://docs.google.com/document/d/1v-sJBmdNEVBRryL8n90XK8OIiqVphaJemXVhANw14Jk/edit?pli=1&resourcekey=0-QGUb2do-JBlDWKvptWBp_g&tab=t.0#bookmark=id.bkbj04ib2d4n) ## In this PR - Bake synthtool into the docker image (we won't `git clone` it anymore) - Bake the owlbot CLI into the docker image (we won't use docker inside docker anymore) - Create a DEVELOPMENT.md file with instructions for local setup (example: install owlbot CLI locally) ## Follow ups - [ ] modify google-cloud-java's workflows to correct the volume mapping being used --------- Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> --- .../library_generation.Dockerfile | 66 +++++-- library_generation/DEVELOPMENT.md | 171 ++++++++++++++++++ library_generation/README.md | 4 - .../generate_composed_library.py | 2 - library_generation/model/generation_config.py | 8 - library_generation/owlbot/bin/entrypoint.sh | 9 +- library_generation/postprocess_library.sh | 71 +------- .../generate_pr_description_unit_tests.py | 2 - .../test/generate_repo_unit_tests.py | 2 - library_generation/test/integration_tests.py | 84 +++------ .../test/model/config_change_unit_tests.py | 2 - .../test/model/generation_config_unit_test.py | 11 -- .../baseline_generation_config.yaml | 4 +- .../current_generation_config.yaml | 4 +- .../java-bigtable/generation_config.yaml | 2 - .../test-config/config_without_owlbot.yaml | 10 - .../test-config/config_without_synthtool.yaml | 11 -- .../config_without_temp_excludes.yaml | 2 - .../test-config/generation_config.yaml | 2 - .../test/utilities_unit_tests.py | 2 - ...generation_config_comparator_unit_tests.py | 32 ---- 21 files changed, 264 insertions(+), 237 deletions(-) create mode 100644 library_generation/DEVELOPMENT.md delete mode 100644 library_generation/test/resources/test-config/config_without_owlbot.yaml delete mode 100644 library_generation/test/resources/test-config/config_without_synthtool.yaml diff --git a/.cloudbuild/library_generation/library_generation.Dockerfile b/.cloudbuild/library_generation/library_generation.Dockerfile index 09d23a106b..f6ef6f1609 100644 --- a/.cloudbuild/library_generation/library_generation.Dockerfile +++ b/.cloudbuild/library_generation/library_generation.Dockerfile @@ -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" ] diff --git a/library_generation/DEVELOPMENT.md b/library_generation/DEVELOPMENT.md new file mode 100644 index 0000000000..cede089ae9 --- /dev/null +++ b/library_generation/DEVELOPMENT.md @@ -0,0 +1,171 @@ +> [!IMPORTANT] +> All examples assume you are inside the `library_generation` folder + + +# Linting + +When contributing, ensure your changes to python code have a valid +format. + +``` +python -m pip install black +black . +``` + +# Running the integration tests + +The integration tests build the docker image declared in +`.cloudbuild/library_generation/library_generation.Dockerfile`, pull GAPIC +repositories, generate the libraries and compares the results with the source +code declared in a "golden branch" of the repo. + +It requires docker and python 3.x to be installed. + +``` +python -m pip install . +python -m pip install -r requirements.txt +python -m unittest test/integration_tests.py +``` + +# Running the unit tests + +The unit tests of the hermetic build scripts are contained in several scripts, +corresponding to a specific component. Every unit test script ends with +`unit_tests.py`. To avoid them specifying them +individually, we can use the following command: + +```bash +python -m unittest discover -s test/ -p "*unit_tests.py" +``` + +> [!NOTE] +> The output of this command may look erratic during the first 30 seconds. +> This is normal. After the tests are done, an "OK" message should be shown. + +# Running the scripts in your local environment + +Although the scripts are designed to be run in a Docker container, you can also +run them directly. This section explains how to run the entrypoint script +(`library_generation/cli/entry_point.py`). + +## Installing prerequisites + +In order to run the generation scripts directly, there are a few tools we +need to install beforehand. + +### Install synthtool + +It requires python 3.x to be installed. +You will need to specify a committish of the synthtool repo in order to have +your generation results matching exactly what the docker image would produce. +You can achieve this by inspecting `SYNTHTOOL_COMMITISH` in +`.cloudbuild/library_generation/library_generation.Dockerfile`. + +```bash +# obtained from .cloudbuild/library_generation/library_generation.Dockerfile +export SYNTHTOOL_COMMITTISH=6612ab8f3afcd5e292aecd647f0fa68812c9f5b5 +``` + +```bash +git clone https://github.com/googleapis/synthtool +cd synthtool +git checkout "${SYNTHTOOL_COMMITTISH}" +python -m pip install --require-hashes -r requirements.txt +python -m pip install --no-deps -e . +python -m synthtool --version +``` + +### Install the owl-bot CLI + +Requires node.js to be installed. +Check this [installation guide](https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script) +for NVM, Node.js's version manager. + +After you install it, you can install the owl-bot CLI with the following +commands: +```bash +git clone https://github.com/googleapis/repo-automation-bots +cd repo-automation-bots/packages/owl-bot +npm i && npm run compile && npm link +owl-bot copy-code --version +``` + +The key step is `npm link`, which will make the command available in you current +shell session. + +## Running the script +The entrypoint script (`library_generation/cli/entry_point.py`) allows you to +update the target repository with the latest changes starting from the +googleapis committish declared in `generation_config.yaml`. + +### Download the repo +For example, google-cloud-java +``` +git clone https://github.com/googleapis/google-cloud-java +export path_to_repo="$(pwd)/google-cloud-java" +``` + +### Install the scripts +``` +python -m pip install . +``` + +### Run the script +``` +python cli/entry_point.py generate --repository-path="${path_to_repo}" +``` + + +# Running the scripts using the docker container image +This is convenient in order to avoid installing the dependencies manually. + +> [!IMPORTANT] +> From now, the examples assume you are in the root of your sdk-platform-java +> folder + +## Build the docker image +```bash +docker build --file .cloudbuild/library_generation/library_generation.Dockerfile --iidfile image-id . +``` + +This will create an `image-id` file at the root of the repo with the hash ID of +the image. + +## Run the docker image +The docker image will perform changes on its internal `/workspace` folder, to which you +need to map a folder on your host machine (i.e. map your downloaded repo to this +folder). + +To run the docker container on the google-cloud-java repo, you must run: +```bash +docker run -u "$(id -u)":"$(id -g)" -v/path/to/google-cloud-java:/workspace $(cat image-id) +``` + + * `-u "$(id -u)":"$(id -g)"` makes docker run the container impersonating + yourself. This avoids folder ownership changes since it runs as root by + default. + * `-v/path/to/google-cloud-java:/workspace` maps the host machine's + google-cloud-java folder to the /workspace folder. The image is configured to + perform changes in this directory + * `$(cat image-id)` obtains the image ID created in the build step + +## Debug the created containers +If you are working on changing the way the containers are created, you may want +to inspect the containers to check the setup. It would be convenient in such +case to have a text editor/viewer available. You can achieve this by modifying +the Dockerfile as follows: + +```docker +# install OS tools +RUN apt-get update && apt-get install -y \ + unzip openjdk-17-jdk rsync maven jq less vim \ + && apt-get clean +``` + +We add `less` and `vim` as text tools for further inspection. + +You can also run a shell in a new container by running: + +```bash +docker run --rm -it -u=$(id -u):$(id -g) -v/path/to/google-cloud-java:/workspace --entrypoint="bash" $(cat image-id) +``` diff --git a/library_generation/README.md b/library_generation/README.md index 4a51f665ef..b94fe2de53 100644 --- a/library_generation/README.md +++ b/library_generation/README.md @@ -98,8 +98,6 @@ They are shared by library level parameters. | grpc_version | No | inferred from the generator if not specified | | googleapis-commitish | Yes | | | libraries_bom_version | Yes | | -| owlbot-cli-image | Yes | | -| synthtool-commitish | Yes | | | template_excludes | Yes | | ### Library level parameters @@ -149,8 +147,6 @@ gapic_generator_version: 2.34.0 protoc_version: 25.2 googleapis_commitish: 1a45bf7393b52407188c82e63101db7dc9c72026 libraries_bom_version: 26.37.0 -owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 -synthtool_commitish: 6612ab8f3afcd5e292aecd647f0fa68812c9f5b5 destination_path: google-cloud-java template_excludes: - ".github/*" diff --git a/library_generation/generate_composed_library.py b/library_generation/generate_composed_library.py index a2f8d9f401..ae5b535e3e 100755 --- a/library_generation/generate_composed_library.py +++ b/library_generation/generate_composed_library.py @@ -112,8 +112,6 @@ def generate_composed_library( "", versions_file, owlbot_cli_source_folder, - config.owlbot_cli_image, - config.synthtool_commitish, str(config.is_monorepo()).lower(), config_path, ], diff --git a/library_generation/model/generation_config.py b/library_generation/model/generation_config.py index 2a5d453981..bc9c5e3f20 100644 --- a/library_generation/model/generation_config.py +++ b/library_generation/model/generation_config.py @@ -32,8 +32,6 @@ def __init__( gapic_generator_version: str, googleapis_commitish: str, libraries_bom_version: str, - owlbot_cli_image: str, - synthtool_commitish: str, template_excludes: list[str], libraries: list[LibraryConfig], grpc_version: Optional[str] = None, @@ -42,8 +40,6 @@ def __init__( self.gapic_generator_version = gapic_generator_version self.googleapis_commitish = googleapis_commitish self.libraris_bom_version = libraries_bom_version - self.owlbot_cli_image = owlbot_cli_image - self.synthtool_commitish = synthtool_commitish self.template_excludes = template_excludes self.libraries = libraries self.grpc_version = grpc_version @@ -145,10 +141,6 @@ def from_yaml(path_to_yaml: str) -> GenerationConfig: libraries_bom_version=__required( config, "libraries_bom_version", REPO_LEVEL_PARAMETER ), - owlbot_cli_image=__required(config, "owlbot_cli_image", REPO_LEVEL_PARAMETER), - synthtool_commitish=__required( - config, "synthtool_commitish", REPO_LEVEL_PARAMETER - ), template_excludes=__required(config, "template_excludes", REPO_LEVEL_PARAMETER), libraries=parsed_libraries, ) diff --git a/library_generation/owlbot/bin/entrypoint.sh b/library_generation/owlbot/bin/entrypoint.sh index 37f50152ce..789737b2a5 100755 --- a/library_generation/owlbot/bin/entrypoint.sh +++ b/library_generation/owlbot/bin/entrypoint.sh @@ -70,7 +70,12 @@ echo "Fixing missing license headers..." python3 "${scripts_root}/owlbot/src/fix-license-headers.py" echo "...done" -# ensure formatting on all .java files in the repository +# Ensure formatting on all .java files in the repository. +# Here we manually set the user.home system variable. Unfortunately, Maven +# user.home inference involves the /etc/passwd file (confirmed empirically), +# instead of the presumable $HOME env var, which may not work properly +# when `docker run`ning with the -u flag because we may incur in users +# not registered in the container's /etc/passwd file echo "Reformatting source..." -mvn fmt:format -V --batch-mode --no-transfer-progress +mvn fmt:format -Duser.home="${HOME}" -V --batch-mode --no-transfer-progress echo "...done" diff --git a/library_generation/postprocess_library.sh b/library_generation/postprocess_library.sh index 397716c843..411c93fd08 100755 --- a/library_generation/postprocess_library.sh +++ b/library_generation/postprocess_library.sh @@ -15,12 +15,9 @@ # 3 - versions_file: path to file containing versions to be applied to the poms # 4 - owlbot_cli_source_folder: alternative folder with a structure exactly like # googleapis-gen. It will be used instead of preprocessed_sources_path if -# 5 - owlbot_cli_image_sha: SHA of the image containing the OwlBot CLI -# 6 - synthtool_commitish: Commit SHA of the synthtool repo -# provided -# 7 - is_monorepo: whether this library is a monorepo, which implies slightly +# 5 - is_monorepo: whether this library is a monorepo, which implies slightly # different logic -# 8 - configuration_yaml_path: path to the configuration yaml containing library +# 6 - configuration_yaml_path: path to the configuration yaml containing library # generation information for this library set -exo pipefail scripts_root=$(dirname "$(readlink -f "$0")") @@ -29,15 +26,13 @@ postprocessing_target=$1 preprocessed_sources_path=$2 versions_file=$3 owlbot_cli_source_folder=$4 -owlbot_cli_image_sha=$5 -synthtool_commitish=$6 -is_monorepo=$7 -configuration_yaml_path=$8 +is_monorepo=$5 +configuration_yaml_path=$6 owlbot_yaml_file_name=".OwlBot-hermetic.yaml" source "${scripts_root}"/utils/utilities.sh -declare -a required_inputs=("postprocessing_target" "versions_file" "owlbot_cli_image_sha" "synthtool_commitish" "is_monorepo") +declare -a required_inputs=("postprocessing_target" "versions_file" "is_monorepo") for required_input in "${required_inputs[@]}"; do if [[ -z "${!required_input}" ]]; then echo "missing required ${required_input} argument, please specify one" @@ -84,70 +79,22 @@ else fi # Default values for running copy-code directly from host -repo_bindings="-v ${postprocessing_target}:/workspace" repo_workspace="/workspace" preprocessed_libraries_binding="${owlbot_cli_source_folder}" -# When running docker inside docker, we run into the issue of volume bindings -# being mapped from the host machine to the child container (instead of the -# parent container to child container) because we bind the `docker.sock` socket -# to the parent container (i.e. docker calls use the host's filesystem context) -# see https://serverfault.com/a/819371 -# We solve this by referencing environment variables that will be -# set to produce the correct volume mapping. -# -# The workflow is: to check if we are in a docker container (via passed env var) -# and use managed volumes (docker volume create) instead of bindings -# (-v /path:/other-path). The volume names are also received as env vars. - -if [[ -n "${RUNNING_IN_DOCKER}" ]]; then - set -u # temporarily fail on unset variables - repo_bindings="${REPO_BINDING_VOLUMES}" - set +u - library_name=$(echo "${postprocessing_target}" | rev | cut -d'/' -f1 | rev) - repo_workspace="/workspace/" - if [[ "${is_monorepo}" == "true" ]]; then - monorepo_name=$(echo "${postprocessing_target}" | rev | cut -d'/' -f2 | rev) - repo_workspace+="${monorepo_name}/" - fi - repo_workspace+="${library_name}" -fi +pushd "${postprocessing_target}" -docker run --rm \ - --user "$(id -u)":"$(id -g)" \ - ${repo_bindings} \ - -v "/tmp:/tmp" \ - -w "${repo_workspace}" \ - --env HOME=/tmp \ - gcr.io/cloud-devrel-public-resources/owlbot-cli@"${owlbot_cli_image_sha}" \ - copy-code \ +owl-bot copy-code \ --source-repo-commit-hash=none \ - --source-repo="${preprocessed_libraries_binding}" \ + --source-repo="${owlbot_cli_source_folder}" \ --config-file="${owlbot_yaml_relative_path}" + # clean the custom owlbot yaml if [[ "${is_monorepo}" == "true" ]]; then rm "${postprocessing_target}/.OwlBot.hermetic.yaml" fi -# we clone the synthtool library and manually build it -mkdir -p /tmp/synthtool -pushd /tmp/synthtool - -if [ ! -d "synthtool" ]; then - git clone https://github.com/googleapis/synthtool.git -fi -git config --global --add safe.directory /tmp/synthtool/synthtool -pushd "synthtool" - -git fetch --all -git reset --hard "${synthtool_commitish}" - -python3 -m pip install -e . -python3 -m pip install -r requirements.in -popd # synthtool -popd # temp dir - # run the postprocessor echo 'running owl-bot post-processor' pushd "${postprocessing_target}" diff --git a/library_generation/test/generate_pr_description_unit_tests.py b/library_generation/test/generate_pr_description_unit_tests.py index c977728859..959c442805 100644 --- a/library_generation/test/generate_pr_description_unit_tests.py +++ b/library_generation/test/generate_pr_description_unit_tests.py @@ -61,8 +61,6 @@ def test_generate_pr_description_with_same_googleapis_commits(self): gapic_generator_version="", googleapis_commitish=commit_sha, libraries_bom_version="", - owlbot_cli_image="", - synthtool_commitish="", template_excludes=[], grpc_version="", protoc_version="", diff --git a/library_generation/test/generate_repo_unit_tests.py b/library_generation/test/generate_repo_unit_tests.py index a947e29f5e..9269fb08a1 100644 --- a/library_generation/test/generate_repo_unit_tests.py +++ b/library_generation/test/generate_repo_unit_tests.py @@ -46,8 +46,6 @@ def __get_an_empty_generation_config() -> GenerationConfig: gapic_generator_version="", googleapis_commitish="", libraries_bom_version="", - synthtool_commitish="", - owlbot_cli_image="", template_excludes=[], libraries=[], ) diff --git a/library_generation/test/integration_tests.py b/library_generation/test/integration_tests.py index 356bdec447..e3f950300e 100644 --- a/library_generation/test/integration_tests.py +++ b/library_generation/test/integration_tests.py @@ -65,31 +65,25 @@ def test_entry_point_running_in_container(self): config_files = self.__get_config_files(config_dir) for repo, config_file in config_files: config = from_yaml(config_file) + repo_location = f"{output_dir}/{repo}" + config_location = f"{golden_dir}/../{repo}" # 1. pull repository repo_dest = self.__pull_repo_to( - Path(f"{output_dir}/{repo}"), repo, committish_map[repo] + Path(repo_location), repo, committish_map[repo] ) # 2. prepare golden files library_names = self.__get_library_names_from_config(config) self.__prepare_golden_files( config=config, library_names=library_names, repo_dest=repo_dest ) - # 3. bind repository and configuration to docker volumes - self.__bind_device_to_volumes( - volume_name=f"repo-{repo}", device_dir=f"{output_dir}/{repo}" - ) - self.__bind_device_to_volumes( - volume_name=f"config-{repo}", device_dir=f"{golden_dir}/../{repo}" - ) - repo_volumes = f"-v repo-{repo}:/workspace/{repo} -v config-{repo}:/workspace/config-{repo}" - # 4. run entry_point.py in docker container + # 3. run entry_point.py in docker container self.__run_entry_point_in_docker_container( - repo=repo, - repo_volumes=repo_volumes, + repo_location=repo_location, + config_location=config_location, baseline_config=baseline_config_name, current_config=current_config_name, ) - # 5. compare generation result with golden files + # 4. compare generation result with golden files print( "Generation finished successfully. " "Will now compare differences between generated and existing " @@ -233,71 +227,35 @@ def __prepare_golden_files( else: copy_tree(f"{repo_dest}", f"{golden_dir}/{library_name}") - @classmethod - def __bind_device_to_volumes(cls, volume_name: str, device_dir: str): - # We use a volume to hold the repositories used in the integration - # tests. This is because the test container creates a child container - # using the host machine's docker socket, meaning that we can only - # reference volumes created from within the host machine (i.e. the - # machine running this script). - # - # To summarize, we create a special volume that can be referenced both - # in the main container and in any child containers created by this one. - - # use subprocess.run because we don't care about the return value (we - # want to remove the volume in any case). - subprocess.run(["docker", "volume", "rm", volume_name]) - subprocess.check_call( - [ - "docker", - "volume", - "create", - "--name", - volume_name, - "--opt", - "type=none", - "--opt", - f"device={device_dir}", - "--opt", - "o=bind", - ] - ) - @classmethod def __run_entry_point_in_docker_container( cls, - repo: str, - repo_volumes: str, + repo_location: str, + config_location: str, baseline_config: str, current_config: str, ): + # we use the calling user to prevent the mapped volumes from changing + # owners + user_id = shell_call("id -u") + group_id = shell_call("id -g") subprocess.check_call( [ "docker", "run", + "-u", + f"{user_id}:{group_id}", "--rm", "-v", - f"repo-{repo}:/workspace/{repo}", - "-v", - f"config-{repo}:/workspace/config-{repo}", - "-v", - "/tmp:/tmp", + f"{repo_location}:/workspace/repo", "-v", - "/var/run/docker.sock:/var/run/docker.sock", - "-e", - "RUNNING_IN_DOCKER=true", - "-e", - f"REPO_BINDING_VOLUMES={repo_volumes}", + f"{config_location}:/workspace/config", "-w", - "/src", + "/workspace/repo", image_tag, - "python", - "/src/cli/entry_point.py", - "generate", - f"--baseline-generation-config-path=/workspace/config-{repo}/{baseline_config}", - f"--current-generation-config-path=/workspace/config-{repo}/{current_config}", - f"--repository-path=/workspace/{repo}", - ] + f"--baseline-generation-config-path=/workspace/config/{baseline_config}", + f"--current-generation-config-path=/workspace/config/{current_config}", + ], ) @classmethod diff --git a/library_generation/test/model/config_change_unit_tests.py b/library_generation/test/model/config_change_unit_tests.py index 323edd3cc0..8349a7e1fa 100644 --- a/library_generation/test/model/config_change_unit_tests.py +++ b/library_generation/test/model/config_change_unit_tests.py @@ -240,8 +240,6 @@ def __get_a_gen_config( gapic_generator_version="", googleapis_commitish=googleapis_commitish, libraries_bom_version="", - owlbot_cli_image="", - synthtool_commitish="", template_excludes=[], grpc_version="", protoc_version="", diff --git a/library_generation/test/model/generation_config_unit_test.py b/library_generation/test/model/generation_config_unit_test.py index 2c8b3fc93d..d9efb494c0 100644 --- a/library_generation/test/model/generation_config_unit_test.py +++ b/library_generation/test/model/generation_config_unit_test.py @@ -46,13 +46,6 @@ def test_from_yaml_succeeds(self): "1a45bf7393b52407188c82e63101db7dc9c72026", config.googleapis_commitish ) self.assertEqual("26.37.0", config.libraris_bom_version) - self.assertEqual( - "sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409", - config.owlbot_cli_image, - ) - self.assertEqual( - "6612ab8f3afcd5e292aecd647f0fa68812c9f5b5", config.synthtool_commitish - ) self.assertEqual( [ ".github/*", @@ -115,8 +108,6 @@ def test_is_monorepo_with_one_library_returns_false(self): gapic_generator_version="", googleapis_commitish="", libraries_bom_version="", - owlbot_cli_image="", - synthtool_commitish="", template_excludes=[], libraries=[library_1], ) @@ -127,8 +118,6 @@ def test_is_monorepo_with_two_libraries_returns_true(self): gapic_generator_version="", googleapis_commitish="", libraries_bom_version="", - owlbot_cli_image="", - synthtool_commitish="", template_excludes=[], libraries=[library_1, library_2], ) diff --git a/library_generation/test/resources/integration/google-cloud-java/baseline_generation_config.yaml b/library_generation/test/resources/integration/google-cloud-java/baseline_generation_config.yaml index 6a100856b7..2b13ebb50f 100644 --- a/library_generation/test/resources/integration/google-cloud-java/baseline_generation_config.yaml +++ b/library_generation/test/resources/integration/google-cloud-java/baseline_generation_config.yaml @@ -2,8 +2,6 @@ gapic_generator_version: 2.38.1 protoc_version: 25.2 googleapis_commitish: a17d4caf184b050d50cacf2b0d579ce72c31ce74 libraries_bom_version: 26.37.0 -owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 -synthtool_commitish: 63cc541da2c45fcfca2136c43e638da1fbae174d template_excludes: - ".github/*" - ".kokoro/*" @@ -56,4 +54,4 @@ libraries: api_description: Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. GAPICs: - proto_path: google/cloud/cloudcontrolspartner/v1 - - proto_path: google/cloud/cloudcontrolspartner/v1beta \ No newline at end of file + - proto_path: google/cloud/cloudcontrolspartner/v1beta diff --git a/library_generation/test/resources/integration/google-cloud-java/current_generation_config.yaml b/library_generation/test/resources/integration/google-cloud-java/current_generation_config.yaml index e34916a344..995ab31eb9 100644 --- a/library_generation/test/resources/integration/google-cloud-java/current_generation_config.yaml +++ b/library_generation/test/resources/integration/google-cloud-java/current_generation_config.yaml @@ -2,8 +2,6 @@ gapic_generator_version: 2.38.1 protoc_version: 25.2 googleapis_commitish: 4ce0ff67a3d4509be641cbe47a35844ddc1268fc libraries_bom_version: 26.37.0 -owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 -synthtool_commitish: 63cc541da2c45fcfca2136c43e638da1fbae174d template_excludes: - ".github/*" - ".kokoro/*" @@ -56,4 +54,4 @@ libraries: api_description: Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. GAPICs: - proto_path: google/cloud/cloudcontrolspartner/v1 - - proto_path: google/cloud/cloudcontrolspartner/v1beta \ No newline at end of file + - proto_path: google/cloud/cloudcontrolspartner/v1beta diff --git a/library_generation/test/resources/integration/java-bigtable/generation_config.yaml b/library_generation/test/resources/integration/java-bigtable/generation_config.yaml index f1eb4948d5..784206521f 100644 --- a/library_generation/test/resources/integration/java-bigtable/generation_config.yaml +++ b/library_generation/test/resources/integration/java-bigtable/generation_config.yaml @@ -1,8 +1,6 @@ gapic_generator_version: 2.37.0 protoc_version: 25.2 googleapis_commitish: 9868a57470a969ffa1d21194a5c05d7a6e4e98cc -owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 -synthtool_commitish: a6fb7d5f072b75698af1cbf06c5b001565753cfb template_excludes: - ".gitignore" - ".kokoro/presubmit/integration.cfg" diff --git a/library_generation/test/resources/test-config/config_without_owlbot.yaml b/library_generation/test/resources/test-config/config_without_owlbot.yaml deleted file mode 100644 index 0d1bb7deea..0000000000 --- a/library_generation/test/resources/test-config/config_without_owlbot.yaml +++ /dev/null @@ -1,10 +0,0 @@ -gapic_generator_version: 2.34.0 -googleapis_commitish: 1a45bf7393b52407188c82e63101db7dc9c72026 -libraries_bom_version: 26.37.0 -libraries: - - api_shortname: apigeeconnect - name_pretty: Apigee Connect - api_description: "allows the Apigee hybrid management" - product_documentation: "https://cloud.google.com/apigee/docs/hybrid/v1.3/apigee-connect/" - GAPICs: - - proto_path: google/cloud/apigeeconnect/v1 diff --git a/library_generation/test/resources/test-config/config_without_synthtool.yaml b/library_generation/test/resources/test-config/config_without_synthtool.yaml deleted file mode 100644 index 820c53032e..0000000000 --- a/library_generation/test/resources/test-config/config_without_synthtool.yaml +++ /dev/null @@ -1,11 +0,0 @@ -gapic_generator_version: 2.34.0 -googleapis_commitish: 1a45bf7393b52407188c82e63101db7dc9c72026 -libraries_bom_version: 26.37.0 -owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 -libraries: - - api_shortname: apigeeconnect - name_pretty: Apigee Connect - api_description: "allows the Apigee hybrid management" - product_documentation: "https://cloud.google.com/apigee/docs/hybrid/v1.3/apigee-connect/" - GAPICs: - - proto_path: google/cloud/apigeeconnect/v1 diff --git a/library_generation/test/resources/test-config/config_without_temp_excludes.yaml b/library_generation/test/resources/test-config/config_without_temp_excludes.yaml index 54dab6449d..0d1bb7deea 100644 --- a/library_generation/test/resources/test-config/config_without_temp_excludes.yaml +++ b/library_generation/test/resources/test-config/config_without_temp_excludes.yaml @@ -1,8 +1,6 @@ gapic_generator_version: 2.34.0 googleapis_commitish: 1a45bf7393b52407188c82e63101db7dc9c72026 libraries_bom_version: 26.37.0 -owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 -synthtool_commitish: 6612ab8f3afcd5e292aecd647f0fa68812c9f5b5 libraries: - api_shortname: apigeeconnect name_pretty: Apigee Connect diff --git a/library_generation/test/resources/test-config/generation_config.yaml b/library_generation/test/resources/test-config/generation_config.yaml index 8930e982da..6bd83e20d2 100644 --- a/library_generation/test/resources/test-config/generation_config.yaml +++ b/library_generation/test/resources/test-config/generation_config.yaml @@ -2,8 +2,6 @@ gapic_generator_version: 2.34.0 protoc_version: 25.2 googleapis_commitish: 1a45bf7393b52407188c82e63101db7dc9c72026 libraries_bom_version: 26.37.0 -owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 -synthtool_commitish: 6612ab8f3afcd5e292aecd647f0fa68812c9f5b5 template_excludes: - ".github/*" - ".kokoro/*" diff --git a/library_generation/test/utilities_unit_tests.py b/library_generation/test/utilities_unit_tests.py index 7e8eccbcf8..736eba26e4 100644 --- a/library_generation/test/utilities_unit_tests.py +++ b/library_generation/test/utilities_unit_tests.py @@ -372,8 +372,6 @@ def __get_a_gen_config( gapic_generator_version="", googleapis_commitish="", libraries_bom_version="", - owlbot_cli_image="", - synthtool_commitish="", template_excludes=[ ".github/*", ".kokoro/*", diff --git a/library_generation/test/utils/generation_config_comparator_unit_tests.py b/library_generation/test/utils/generation_config_comparator_unit_tests.py index 04d9661fcd..fa466ac34d 100644 --- a/library_generation/test/utils/generation_config_comparator_unit_tests.py +++ b/library_generation/test/utils/generation_config_comparator_unit_tests.py @@ -40,8 +40,6 @@ def setUp(self) -> None: gapic_generator_version="", googleapis_commitish="", libraries_bom_version="", - owlbot_cli_image="", - synthtool_commitish="", template_excludes=[], grpc_version="", protoc_version="", @@ -51,8 +49,6 @@ def setUp(self) -> None: gapic_generator_version="", googleapis_commitish="", libraries_bom_version="", - owlbot_cli_image="", - synthtool_commitish="", template_excludes=[], grpc_version="", protoc_version="", @@ -107,34 +103,6 @@ def test_compare_config_libraries_bom_update(self): self.assertEqual("libraris_bom_version", config_change.changed_param) self.assertEqual("26.37.0", config_change.current_value) - def test_compare_config_owlbot_cli_update(self): - self.baseline_config.owlbot_cli_image = "image_version_123" - self.current_config.owlbot_cli_image = "image_version_456" - result = compare_config( - baseline_config=self.baseline_config, - current_config=self.current_config, - ) - self.assertTrue( - len(result.change_to_libraries[ChangeType.REPO_LEVEL_CHANGE]) == 1 - ) - config_change = result.change_to_libraries[ChangeType.REPO_LEVEL_CHANGE][0] - self.assertEqual("owlbot_cli_image", config_change.changed_param) - self.assertEqual("image_version_456", config_change.current_value) - - def test_compare_config_synthtool_update(self): - self.baseline_config.synthtool_commitish = "commit123" - self.current_config.synthtool_commitish = "commit456" - result = compare_config( - baseline_config=self.baseline_config, - current_config=self.current_config, - ) - self.assertTrue( - len(result.change_to_libraries[ChangeType.REPO_LEVEL_CHANGE]) == 1 - ) - config_change = result.change_to_libraries[ChangeType.REPO_LEVEL_CHANGE][0] - self.assertEqual("synthtool_commitish", config_change.changed_param) - self.assertEqual("commit456", config_change.current_value) - def test_compare_protobuf_update(self): self.baseline_config.protoc_version = "3.25.2" self.current_config.protoc_version = "3.27.0" From 766646a9e0bed6c8e804eb1e6ab4d133d1465dca Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Wed, 1 May 2024 15:26:38 -0400 Subject: [PATCH 07/18] chore: update java version to 17 in dependency analyzer (#2711) --- .../{anaylze_dependency.yaml => analyze_dependency.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{anaylze_dependency.yaml => analyze_dependency.yaml} (97%) diff --git a/.github/workflows/anaylze_dependency.yaml b/.github/workflows/analyze_dependency.yaml similarity index 97% rename from .github/workflows/anaylze_dependency.yaml rename to .github/workflows/analyze_dependency.yaml index 1030e469d1..22b350d53c 100644 --- a/.github/workflows/anaylze_dependency.yaml +++ b/.github/workflows/analyze_dependency.yaml @@ -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 From 1810451e1ed01329c4af9ea0247672818ba7ac0f Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Thu, 2 May 2024 15:25:50 +0000 Subject: [PATCH 08/18] chore: skip library generation tests after merging a pull request (#2712) In this PR: - Skip running library generation test after merging a pull request. Related error: ``` Run set -ex set -ex git checkout "${base_ref}" git checkout "${head_ref}" changed_directories="$(git diff --name-only ${base_ref} ${head_ref})" if [[ ${changed_directories} =~ "library_generation/" ]]; then echo "should_run=true" >> $GITHUB_OUTPUT else echo "should_run=false" >> $GITHUB_OUTPUT fi shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} env: base_ref: head_ref: + git checkout '' fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths ``` Full log: https://github.com/googleapis/sdk-platform-java/actions/runs/8913958564/job/24480528068 --- .github/workflows/verify_library_generation.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index 8feec8a9d6..8f2520c858 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -3,7 +3,8 @@ on: branches: - main pull_request: - + # do not run this workflow when merging the pull request. + types: [opened, reopened, edited, synchronize] workflow_dispatch: name: verify_library_generation jobs: From 3ab0aa3313ae223d0dd16d1bdfffe51e137f5ac6 Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Thu, 2 May 2024 16:16:08 +0000 Subject: [PATCH 09/18] chore: remove test output (#2713) In this PR: - Remove test output directory. --- library_generation/test/integration_tests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library_generation/test/integration_tests.py b/library_generation/test/integration_tests.py index e3f950300e..47ad22b6dc 100644 --- a/library_generation/test/integration_tests.py +++ b/library_generation/test/integration_tests.py @@ -190,8 +190,7 @@ def __build_image(cls, docker_file: str, cwd: str): @classmethod def __remove_generated_files(cls): - # uncomment this line when the generated files don't owned by root. - # shutil.rmtree(f"{output_dir}", ignore_errors=True) + shutil.rmtree(f"{output_dir}", ignore_errors=True) if os.path.isdir(f"{golden_dir}"): shutil.rmtree(f"{golden_dir}") From 5d4567f883b1e29cd5f299d392c5a809b451aa18 Mon Sep 17 00:00:00 2001 From: Alice <65933803+alicejli@users.noreply.github.com> Date: Thu, 2 May 2024 13:14:28 -0400 Subject: [PATCH 10/18] chore: fix verify_library_generation.yaml for forks (#2716) PRs opened by renovate-bot are failing `verify_library_generation` because renovate-bot opens PRs from a fork rather than main. For instance https://github.com/googleapis/sdk-platform-java/pull/2657 is failing: ``` env: base_ref: main head_ref: renovate/markupsafe-2.x + git checkout main Previous HEAD position was d84e6072d Merge 645951c0497bf9cdb42e6323cd90a08d77a1926a into 766646a9e0bed6c8e804eb1e6ab4d[13](https://github.com/googleapis/sdk-platform-java/actions/runs/8914757209/job/24482995077?pr=2657#step:3:13)3d1465dca Switched to a new branch 'main' branch 'main' set up to track 'origin/main'. + git checkout renovate/markupsafe-2.x error: pathspec 'renovate/markupsafe-2.x' did not match any file(s) known to git ``` This updates the yaml file to explicitly fetch specific branches which should fix the issue. --------- Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> --- .github/workflows/verify_library_generation.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index 8f2520c858..51c276504d 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -21,8 +21,10 @@ jobs: shell: bash run: | set -ex - git checkout "${base_ref}" - git checkout "${head_ref}" + git checkout "${base_ref}" # Checkout a detached head, and then fetch the base ref to populate the detached head. + git fetch --no-tags --prune origin +${base_ref}:refs/remotes/origin/${base_ref} + git checkout "${head_ref}" # Checkout a detached head, and then fetch the head ref to populate the detached head. + git fetch --no-tags --prune origin +${head_ref}:refs/remotes/origin/${head_ref} changed_directories="$(git diff --name-only ${base_ref} ${head_ref})" if [[ ${changed_directories} =~ "library_generation/" ]]; then echo "should_run=true" >> $GITHUB_OUTPUT From 8f21be6c8e2eee11b4cea857c8ede4f44178c546 Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Thu, 2 May 2024 18:05:00 +0000 Subject: [PATCH 11/18] chore: do not run workflow on push (#2718) In this PR: - Remove `on.push` trigger so that the workflow doesn't run against a specific branch. Official doc: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore --- .github/workflows/verify_library_generation.yaml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index 51c276504d..768325f9f5 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -1,11 +1,6 @@ on: - push: - branches: - - main pull_request: - # do not run this workflow when merging the pull request. - types: [opened, reopened, edited, synchronize] - workflow_dispatch: + name: verify_library_generation jobs: should-run-library-generation-tests: @@ -21,9 +16,11 @@ jobs: shell: bash run: | set -ex - git checkout "${base_ref}" # Checkout a detached head, and then fetch the base ref to populate the detached head. + # Checkout a detached head, and then fetch the base ref to populate the detached head. + git checkout "${base_ref}" git fetch --no-tags --prune origin +${base_ref}:refs/remotes/origin/${base_ref} - git checkout "${head_ref}" # Checkout a detached head, and then fetch the head ref to populate the detached head. + # Checkout a detached head, and then fetch the head ref to populate the detached head. + git checkout "${head_ref}" git fetch --no-tags --prune origin +${head_ref}:refs/remotes/origin/${head_ref} changed_directories="$(git diff --name-only ${base_ref} ${head_ref})" if [[ ${changed_directories} =~ "library_generation/" ]]; then From 32c99953496fe3e0ab47c67aad4117c242d1c798 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 2 May 2024 20:25:24 +0000 Subject: [PATCH 12/18] fix: Return resolved endpoint from StubSettings' Builder (#2715) --- .../google/api/gax/grpc/GrpcCallContext.java | 8 ++--- .../api/gax/httpjson/HttpJsonCallContext.java | 8 ++--- .../com/google/api/gax/rpc/ClientContext.java | 32 ++++++++----------- .../google/api/gax/rpc/EndpointContext.java | 16 ++++++++++ .../com/google/api/gax/rpc/StubSettings.java | 32 ++++++++++++++++--- .../api/gax/rpc/testing/FakeCallContext.java | 9 ++---- .../v1beta1/it/ITEndpointContext.java | 26 ++++++++++++--- 7 files changed, 85 insertions(+), 46 deletions(-) diff --git a/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/GrpcCallContext.java b/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/GrpcCallContext.java index 3de00ec671..94099dd96b 100644 --- a/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/GrpcCallContext.java +++ b/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/GrpcCallContext.java @@ -154,12 +154,8 @@ private GrpcCallContext( this.retryableCodes = retryableCodes == null ? null : ImmutableSet.copyOf(retryableCodes); // Attempt to create an empty, non-functioning EndpointContext by default. The client will have // a valid EndpointContext with user configurations after the client has been initialized. - try { - this.endpointContext = - endpointContext == null ? EndpointContext.newBuilder().build() : endpointContext; - } catch (IOException ex) { - throw new RuntimeException(ex); - } + this.endpointContext = + endpointContext == null ? EndpointContext.getDefaultInstance() : endpointContext; } /** diff --git a/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallContext.java b/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallContext.java index bb20811058..bde0c432a8 100644 --- a/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallContext.java +++ b/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallContext.java @@ -135,12 +135,8 @@ private HttpJsonCallContext( defaultRetryableCodes == null ? null : ImmutableSet.copyOf(defaultRetryableCodes); // Attempt to create an empty, non-functioning EndpointContext by default. The client will have // a valid EndpointContext with user configurations after the client has been initialized. - try { - this.endpointContext = - endpointContext == null ? EndpointContext.newBuilder().build() : endpointContext; - } catch (IOException ex) { - throw new RuntimeException(ex); - } + this.endpointContext = + endpointContext == null ? EndpointContext.getDefaultInstance() : endpointContext; } /** diff --git a/gax-java/gax/src/main/java/com/google/api/gax/rpc/ClientContext.java b/gax-java/gax/src/main/java/com/google/api/gax/rpc/ClientContext.java index afe6ab0655..26cf63eb85 100644 --- a/gax-java/gax/src/main/java/com/google/api/gax/rpc/ClientContext.java +++ b/gax-java/gax/src/main/java/com/google/api/gax/rpc/ClientContext.java @@ -126,24 +126,20 @@ public abstract class ClientContext { /** Create a new ClientContext with default values */ public static Builder newBuilder() { - try { - return new AutoValue_ClientContext.Builder() - .setBackgroundResources(Collections.emptyList()) - .setExecutor(Executors.newScheduledThreadPool(0)) - .setHeaders(Collections.emptyMap()) - .setInternalHeaders(Collections.emptyMap()) - .setClock(NanoClock.getDefaultClock()) - .setStreamWatchdog(null) - .setStreamWatchdogCheckInterval(Duration.ZERO) - .setTracerFactory(BaseApiTracerFactory.getInstance()) - .setQuotaProjectId(null) - .setGdchApiAudience(null) - // Attempt to create an empty, non-functioning EndpointContext by default. This is - // not exposed to the user via getters/setters. - .setEndpointContext(EndpointContext.newBuilder().build()); - } catch (IOException e) { - throw new RuntimeException(e); - } + return new AutoValue_ClientContext.Builder() + .setBackgroundResources(Collections.emptyList()) + .setExecutor(Executors.newScheduledThreadPool(0)) + .setHeaders(Collections.emptyMap()) + .setInternalHeaders(Collections.emptyMap()) + .setClock(NanoClock.getDefaultClock()) + .setStreamWatchdog(null) + .setStreamWatchdogCheckInterval(Duration.ZERO) + .setTracerFactory(BaseApiTracerFactory.getInstance()) + .setQuotaProjectId(null) + .setGdchApiAudience(null) + // Attempt to create an empty, non-functioning EndpointContext by default. This is + // not exposed to the user via getters/setters. + .setEndpointContext(EndpointContext.getDefaultInstance()); } public abstract Builder toBuilder(); diff --git a/gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java b/gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java index de99b01995..efe0f517f5 100644 --- a/gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java +++ b/gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java @@ -47,12 +47,28 @@ @InternalApi @AutoValue public abstract class EndpointContext { + + private static final EndpointContext INSTANCE; + + // static block initialization for exception handling + static { + try { + INSTANCE = EndpointContext.newBuilder().setServiceName("").build(); + } catch (IOException e) { + throw new RuntimeException("Unable to create a default empty EndpointContext", e); + } + } + public static final String GOOGLE_CLOUD_UNIVERSE_DOMAIN = "GOOGLE_CLOUD_UNIVERSE_DOMAIN"; public static final String INVALID_UNIVERSE_DOMAIN_ERROR_TEMPLATE = "The configured universe domain (%s) does not match the universe domain found in the credentials (%s). If you haven't configured the universe domain explicitly, `googleapis.com` is the default."; public static final String UNABLE_TO_RETRIEVE_CREDENTIALS_ERROR_MESSAGE = "Unable to retrieve the Universe Domain from the Credentials."; + public static EndpointContext getDefaultInstance() { + return INSTANCE; + } + /** * ServiceName is host URI for Google Cloud Services. It follows the format of * `{ServiceName}.googleapis.com`. For example, speech.googleapis.com would have a ServiceName of diff --git a/gax-java/gax/src/main/java/com/google/api/gax/rpc/StubSettings.java b/gax-java/gax/src/main/java/com/google/api/gax/rpc/StubSettings.java index 0e37c12cad..4dc67c9a2d 100644 --- a/gax-java/gax/src/main/java/com/google/api/gax/rpc/StubSettings.java +++ b/gax-java/gax/src/main/java/com/google/api/gax/rpc/StubSettings.java @@ -266,6 +266,7 @@ public abstract static class Builder< @Nonnull private ApiTracerFactory tracerFactory; private boolean deprecatedExecutorProviderSet; private String universeDomain; + private final EndpointContext endpointContext; /** * Indicate when creating transport whether it is allowed to use mTLS endpoint instead of the @@ -300,6 +301,9 @@ protected Builder(StubSettings settings) { this.switchToMtlsEndpointAllowed = settings.getEndpointContext().switchToMtlsEndpointAllowed(); this.universeDomain = settings.getEndpointContext().universeDomain(); + // Store the EndpointContext that was already created. This is used to return the state + // of the EndpointContext prior to any new modifications + this.endpointContext = settings.getEndpointContext(); } /** Get Quota Project ID from Client Context * */ @@ -327,16 +331,22 @@ protected Builder(ClientContext clientContext) { this.headerProvider = new NoHeaderProvider(); this.internalHeaderProvider = new NoHeaderProvider(); this.clock = NanoClock.getDefaultClock(); - this.clientSettingsEndpoint = null; - this.transportChannelProviderEndpoint = null; - this.mtlsEndpoint = null; this.quotaProjectId = null; this.streamWatchdogProvider = InstantiatingWatchdogProvider.create(); this.streamWatchdogCheckInterval = Duration.ofSeconds(10); this.tracerFactory = BaseApiTracerFactory.getInstance(); this.deprecatedExecutorProviderSet = false; this.gdchApiAudience = null; + + this.clientSettingsEndpoint = null; + this.transportChannelProviderEndpoint = null; + this.mtlsEndpoint = null; + this.switchToMtlsEndpointAllowed = false; this.universeDomain = null; + // Attempt to create an empty, non-functioning EndpointContext by default. The client will + // have + // a valid EndpointContext with user configurations after the client has been initialized. + this.endpointContext = EndpointContext.getDefaultInstance(); } else { ExecutorProvider fixedExecutorProvider = FixedExecutorProvider.create(clientContext.getExecutor()); @@ -365,6 +375,9 @@ protected Builder(ClientContext clientContext) { this.switchToMtlsEndpointAllowed = clientContext.getEndpointContext().switchToMtlsEndpointAllowed(); this.universeDomain = clientContext.getEndpointContext().universeDomain(); + // Store the EndpointContext that was already created. This is used to return the state + // of the EndpointContext prior to any new modifications + this.endpointContext = clientContext.getEndpointContext(); } } @@ -584,8 +597,19 @@ public ApiClock getClock() { return clock; } + /** + * @return the resolved endpoint when the Builder was created. If invoked after + * `StubSettings.newBuilder()` is called, it will return the clientSettingsEndpoint value. + * If other parameters are then set in the builder, the resolved endpoint is not + * automatically updated. The resolved endpoint will only be recomputed when the + * StubSettings is built again. + */ public String getEndpoint() { - return clientSettingsEndpoint; + // For the `StubSettings.newBuilder()` case + if (endpointContext.equals(EndpointContext.getDefaultInstance())) { + return clientSettingsEndpoint; + } + return endpointContext.resolvedEndpoint(); } public String getMtlsEndpoint() { diff --git a/gax-java/gax/src/test/java/com/google/api/gax/rpc/testing/FakeCallContext.java b/gax-java/gax/src/test/java/com/google/api/gax/rpc/testing/FakeCallContext.java index 77ae3d1fca..a075e02cc1 100644 --- a/gax-java/gax/src/test/java/com/google/api/gax/rpc/testing/FakeCallContext.java +++ b/gax-java/gax/src/test/java/com/google/api/gax/rpc/testing/FakeCallContext.java @@ -44,7 +44,6 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import java.io.IOException; import java.util.List; import java.util.Map; import java.util.Set; @@ -88,12 +87,8 @@ private FakeCallContext( this.tracer = tracer; this.retrySettings = retrySettings; this.retryableCodes = retryableCodes == null ? null : ImmutableSet.copyOf(retryableCodes); - try { - this.endpointContext = - endpointContext == null ? EndpointContext.newBuilder().build() : endpointContext; - } catch (IOException e) { - throw new RuntimeException(e); - } + this.endpointContext = + endpointContext == null ? EndpointContext.getDefaultInstance() : endpointContext; } public static FakeCallContext createDefault() { diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITEndpointContext.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITEndpointContext.java index ad44622471..812a52696b 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITEndpointContext.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITEndpointContext.java @@ -416,17 +416,33 @@ public void universeDomainValidation_noCredentials_userSetUniverseDomain() throw @Test public void endpointResolution_defaultViaBuilder() { EchoSettings.Builder echoSettingsBuilder = EchoSettings.newBuilder(); - // The getter in the builder returns the user set value. No configuration - // means the getter will return null + // `StubSettings.newBuilder()` will return the clientSettingsEndpoint Truth.assertThat(echoSettingsBuilder.getEndpoint()).isEqualTo(null); } // User configuration in Builder @Test public void endpointResolution_userConfigurationViaBuilder() { - String customEndpoint = "test.com:123"; EchoSettings.Builder echoSettingsBuilder = - EchoSettings.newBuilder().setEndpoint(customEndpoint); - Truth.assertThat(echoSettingsBuilder.getEndpoint()).isEqualTo(customEndpoint); + EchoSettings.newBuilder().setEndpoint("test.com:123"); + // `StubSettings.newBuilder()` will return the clientSettingsEndpoint + Truth.assertThat(echoSettingsBuilder.getEndpoint()).isEqualTo("test.com:123"); + } + + @Test + public void endpointResolution_builderBuilderBackToBuilder() throws IOException { + String customEndpoint = "test.com:123"; + EchoStubSettings.Builder echoStubSettingsBuilder = + EchoStubSettings.newBuilder().setEndpoint(customEndpoint); + // `StubSettings.newBuilder()` will return the clientSettingsEndpoint + Truth.assertThat(echoStubSettingsBuilder.getEndpoint()).isEqualTo(customEndpoint); + + // EndpointContext is recomputed when the Builder is re-built + EchoStubSettings echoStubSettings = echoStubSettingsBuilder.build(); + Truth.assertThat(echoStubSettings.getEndpoint()).isEqualTo(customEndpoint); + + // Calling toBuilder on StubSettings keeps the configurations the same + echoStubSettingsBuilder = echoStubSettings.toBuilder(); + Truth.assertThat(echoStubSettingsBuilder.getEndpoint()).isEqualTo(customEndpoint); } } From 5bb97700ddcef1b0494808b1e7d8029d92c74d13 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 17:55:54 -0400 Subject: [PATCH 13/18] feat: [common-protos] add `Weight` to common types for Shopping APIs to be used for accounts bundle (#2699) - [ ] Regenerate this pull request now. docs: A comment for field `amount_micros` in message `.google.shopping.type.Price` is changed PiperOrigin-RevId: 629159171 Source-Link: https://github.com/googleapis/googleapis/commit/a3a2dc62816053b6e9dc2b67d52048133794b178 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7a598761f9021328bc2dea46ec0c0852adc26d83 Copy-Tag: eyJwIjoiamF2YS1jb21tb24tcHJvdG9zLy5Pd2xCb3QueWFtbCIsImgiOiI3YTU5ODc2MWY5MDIxMzI4YmMyZGVhNDZlYzBjMDg1MmFkYzI2ZDgzIn0= --------- Co-authored-by: Owl Bot Co-authored-by: Alice <65933803+alicejli@users.noreply.github.com> --- java-common-protos/README.md | 6 +- .../java/com/google/shopping/type/Price.java | 12 - .../google/shopping/type/PriceOrBuilder.java | 4 - .../com/google/shopping/type/TypesProto.java | 81 +- .../java/com/google/shopping/type/Weight.java | 905 ++++++++++++++++++ .../google/shopping/type/WeightOrBuilder.java | 86 ++ .../proto/google/shopping/type/types.proto | 28 +- 7 files changed, 1069 insertions(+), 53 deletions(-) create mode 100644 java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/Weight.java create mode 100644 java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/WeightOrBuilder.java diff --git a/java-common-protos/README.md b/java-common-protos/README.md index a062c7dc57..e9d4a96727 100644 --- a/java-common-protos/README.md +++ b/java-common-protos/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.api.grpc proto-google-common-protos - 2.37.1 + 2.38.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.api.grpc:proto-google-common-protos:2.37.1' +implementation 'com.google.api.grpc:proto-google-common-protos:2.38.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.api.grpc" % "proto-google-common-protos" % "2.37.1" +libraryDependencies += "com.google.api.grpc" % "proto-google-common-protos" % "2.38.0" ``` ## Authentication diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/Price.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/Price.java index 0e32d2884b..54a67678ff 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/Price.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/Price.java @@ -72,8 +72,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -91,8 +89,6 @@ public boolean hasAmountMicros() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -554,8 +550,6 @@ public Builder mergeFrom( * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -573,8 +567,6 @@ public boolean hasAmountMicros() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -592,8 +584,6 @@ public long getAmountMicros() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -615,8 +605,6 @@ public Builder setAmountMicros(long value) { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/PriceOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/PriceOrBuilder.java index 738b7268d0..bee4a652c5 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/PriceOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/PriceOrBuilder.java @@ -31,8 +31,6 @@ public interface PriceOrBuilder * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -47,8 +45,6 @@ public interface PriceOrBuilder * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/TypesProto.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/TypesProto.java index 9ae914ad08..79c44df517 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/TypesProto.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/TypesProto.java @@ -28,6 +28,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_type_Weight_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_type_Weight_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_shopping_type_Price_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -58,39 +62,52 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n google/shopping/type/types.proto\022\024goog" - + "le.shopping.type\"c\n\005Price\022\032\n\ramount_micr" - + "os\030\001 \001(\003H\000\210\001\001\022\032\n\rcurrency_code\030\002 \001(\tH\001\210\001" - + "\001B\020\n\016_amount_microsB\020\n\016_currency_code\"\210\001" - + "\n\017CustomAttribute\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005" - + "value\030\002 \001(\tH\001\210\001\001\022;\n\014group_values\030\003 \003(\0132%" - + ".google.shopping.type.CustomAttributeB\007\n" - + "\005_nameB\010\n\006_value\"\301\001\n\013Destination\"\261\001\n\017Des" - + "tinationEnum\022 \n\034DESTINATION_ENUM_UNSPECI" - + "FIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\017\n\013DISPLAY_ADS\020" - + "\002\022\027\n\023LOCAL_INVENTORY_ADS\020\003\022\021\n\rFREE_LISTI" - + "NGS\020\004\022\027\n\023FREE_LOCAL_LISTINGS\020\005\022\024\n\020YOUTUB" - + "E_SHOPPING\020\006\"\226\003\n\020ReportingContext\"\201\003\n\024Re" - + "portingContextEnum\022&\n\"REPORTING_CONTEXT_" - + "ENUM_UNSPECIFIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\025\n\r" - + "DISCOVERY_ADS\020\002\032\002\010\001\022\022\n\016DEMAND_GEN_ADS\020\r\022" - + "#\n\037DEMAND_GEN_ADS_DISCOVER_SURFACE\020\016\022\r\n\t" - + "VIDEO_ADS\020\003\022\017\n\013DISPLAY_ADS\020\004\022\027\n\023LOCAL_IN" - + "VENTORY_ADS\020\005\022\031\n\025VEHICLE_INVENTORY_ADS\020\006" - + "\022\021\n\rFREE_LISTINGS\020\007\022\027\n\023FREE_LOCAL_LISTIN" - + "GS\020\010\022\037\n\033FREE_LOCAL_VEHICLE_LISTINGS\020\t\022\024\n" - + "\020YOUTUBE_SHOPPING\020\n\022\020\n\014CLOUD_RETAIL\020\013\022\026\n" - + "\022LOCAL_CLOUD_RETAIL\020\014\"M\n\007Channel\"B\n\013Chan" - + "nelEnum\022\034\n\030CHANNEL_ENUM_UNSPECIFIED\020\000\022\n\n" - + "\006ONLINE\020\001\022\t\n\005LOCAL\020\002Bp\n\030com.google.shopp" - + "ing.typeB\nTypesProtoP\001Z/cloud.google.com" - + "/go/shopping/type/typepb;typepb\252\002\024Google" - + ".Shopping.Typeb\006proto3" + + "le.shopping.type\"\261\001\n\006Weight\022\032\n\ramount_mi" + + "cros\030\001 \001(\003H\000\210\001\001\0225\n\004unit\030\002 \001(\0162\'.google.s" + + "hopping.type.Weight.WeightUnit\"B\n\nWeight" + + "Unit\022\033\n\027WEIGHT_UNIT_UNSPECIFIED\020\000\022\t\n\005POU" + + "ND\020\001\022\014\n\010KILOGRAM\020\002B\020\n\016_amount_micros\"c\n\005" + + "Price\022\032\n\ramount_micros\030\001 \001(\003H\000\210\001\001\022\032\n\rcur" + + "rency_code\030\002 \001(\tH\001\210\001\001B\020\n\016_amount_microsB" + + "\020\n\016_currency_code\"\210\001\n\017CustomAttribute\022\021\n" + + "\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005value\030\002 \001(\tH\001\210\001\001\022;\n\014" + + "group_values\030\003 \003(\0132%.google.shopping.typ" + + "e.CustomAttributeB\007\n\005_nameB\010\n\006_value\"\301\001\n" + + "\013Destination\"\261\001\n\017DestinationEnum\022 \n\034DEST" + + "INATION_ENUM_UNSPECIFIED\020\000\022\020\n\014SHOPPING_A" + + "DS\020\001\022\017\n\013DISPLAY_ADS\020\002\022\027\n\023LOCAL_INVENTORY" + + "_ADS\020\003\022\021\n\rFREE_LISTINGS\020\004\022\027\n\023FREE_LOCAL_" + + "LISTINGS\020\005\022\024\n\020YOUTUBE_SHOPPING\020\006\"\226\003\n\020Rep" + + "ortingContext\"\201\003\n\024ReportingContextEnum\022&" + + "\n\"REPORTING_CONTEXT_ENUM_UNSPECIFIED\020\000\022\020" + + "\n\014SHOPPING_ADS\020\001\022\025\n\rDISCOVERY_ADS\020\002\032\002\010\001\022" + + "\022\n\016DEMAND_GEN_ADS\020\r\022#\n\037DEMAND_GEN_ADS_DI" + + "SCOVER_SURFACE\020\016\022\r\n\tVIDEO_ADS\020\003\022\017\n\013DISPL" + + "AY_ADS\020\004\022\027\n\023LOCAL_INVENTORY_ADS\020\005\022\031\n\025VEH" + + "ICLE_INVENTORY_ADS\020\006\022\021\n\rFREE_LISTINGS\020\007\022" + + "\027\n\023FREE_LOCAL_LISTINGS\020\010\022\037\n\033FREE_LOCAL_V" + + "EHICLE_LISTINGS\020\t\022\024\n\020YOUTUBE_SHOPPING\020\n\022" + + "\020\n\014CLOUD_RETAIL\020\013\022\026\n\022LOCAL_CLOUD_RETAIL\020" + + "\014\"M\n\007Channel\"B\n\013ChannelEnum\022\034\n\030CHANNEL_E" + + "NUM_UNSPECIFIED\020\000\022\n\n\006ONLINE\020\001\022\t\n\005LOCAL\020\002" + + "Bp\n\030com.google.shopping.typeB\nTypesProto" + + "P\001Z/cloud.google.com/go/shopping/type/ty" + + "pepb;typepb\252\002\024Google.Shopping.Typeb\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); - internal_static_google_shopping_type_Price_descriptor = + internal_static_google_shopping_type_Weight_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_shopping_type_Weight_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_type_Weight_descriptor, + new java.lang.String[] { + "AmountMicros", "Unit", + }); + internal_static_google_shopping_type_Price_descriptor = + getDescriptor().getMessageTypes().get(1); internal_static_google_shopping_type_Price_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_type_Price_descriptor, @@ -98,7 +115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AmountMicros", "CurrencyCode", }); internal_static_google_shopping_type_CustomAttribute_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(2); internal_static_google_shopping_type_CustomAttribute_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_type_CustomAttribute_descriptor, @@ -106,18 +123,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Value", "GroupValues", }); internal_static_google_shopping_type_Destination_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_shopping_type_Destination_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_type_Destination_descriptor, new java.lang.String[] {}); internal_static_google_shopping_type_ReportingContext_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_shopping_type_ReportingContext_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_type_ReportingContext_descriptor, new java.lang.String[] {}); internal_static_google_shopping_type_Channel_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_shopping_type_Channel_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_type_Channel_descriptor, new java.lang.String[] {}); diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/Weight.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/Weight.java new file mode 100644 index 0000000000..f66f829d57 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/Weight.java @@ -0,0 +1,905 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +// Protobuf Java Version: 3.25.3 +package com.google.shopping.type; + +/** + * + * + *
+ * The weight represented as the value in string and the unit.
+ * 
+ * + * Protobuf type {@code google.shopping.type.Weight} + */ +public final class Weight extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.type.Weight) + WeightOrBuilder { + private static final long serialVersionUID = 0L; + // Use Weight.newBuilder() to construct. + private Weight(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Weight() { + unit_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Weight(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Weight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Weight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Weight.class, com.google.shopping.type.Weight.Builder.class); + } + + /** + * + * + *
+   * The weight unit.
+   * 
+ * + * Protobuf enum {@code google.shopping.type.Weight.WeightUnit} + */ + public enum WeightUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * unit unspecified
+     * 
+ * + * WEIGHT_UNIT_UNSPECIFIED = 0; + */ + WEIGHT_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * lb unit.
+     * 
+ * + * POUND = 1; + */ + POUND(1), + /** + * + * + *
+     * kg unit.
+     * 
+ * + * KILOGRAM = 2; + */ + KILOGRAM(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * unit unspecified
+     * 
+ * + * WEIGHT_UNIT_UNSPECIFIED = 0; + */ + public static final int WEIGHT_UNIT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * lb unit.
+     * 
+ * + * POUND = 1; + */ + public static final int POUND_VALUE = 1; + /** + * + * + *
+     * kg unit.
+     * 
+ * + * KILOGRAM = 2; + */ + public static final int KILOGRAM_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WeightUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WeightUnit forNumber(int value) { + switch (value) { + case 0: + return WEIGHT_UNIT_UNSPECIFIED; + case 1: + return POUND; + case 2: + return KILOGRAM; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WeightUnit findValueByNumber(int number) { + return WeightUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.type.Weight.getDescriptor().getEnumTypes().get(0); + } + + private static final WeightUnit[] VALUES = values(); + + public static WeightUnit valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WeightUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.type.Weight.WeightUnit) + } + + private int bitField0_; + public static final int AMOUNT_MICROS_FIELD_NUMBER = 1; + private long amountMicros_ = 0L; + /** + * + * + *
+   * Required. The weight represented as a number in micros (1 million micros is
+   * an equivalent to one's currency standard unit, for example, 1 kg = 1000000
+   * micros).
+   * This field can also be set as infinity by setting to -1.
+   * This field only support -1 and positive value.
+   * 
+ * + * optional int64 amount_micros = 1; + * + * @return Whether the amountMicros field is set. + */ + @java.lang.Override + public boolean hasAmountMicros() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The weight represented as a number in micros (1 million micros is
+   * an equivalent to one's currency standard unit, for example, 1 kg = 1000000
+   * micros).
+   * This field can also be set as infinity by setting to -1.
+   * This field only support -1 and positive value.
+   * 
+ * + * optional int64 amount_micros = 1; + * + * @return The amountMicros. + */ + @java.lang.Override + public long getAmountMicros() { + return amountMicros_; + } + + public static final int UNIT_FIELD_NUMBER = 2; + private int unit_ = 0; + /** + * + * + *
+   * Required. The weight unit.
+   * Acceptable values are: kg and lb
+   * 
+ * + * .google.shopping.type.Weight.WeightUnit unit = 2; + * + * @return The enum numeric value on the wire for unit. + */ + @java.lang.Override + public int getUnitValue() { + return unit_; + } + /** + * + * + *
+   * Required. The weight unit.
+   * Acceptable values are: kg and lb
+   * 
+ * + * .google.shopping.type.Weight.WeightUnit unit = 2; + * + * @return The unit. + */ + @java.lang.Override + public com.google.shopping.type.Weight.WeightUnit getUnit() { + com.google.shopping.type.Weight.WeightUnit result = + com.google.shopping.type.Weight.WeightUnit.forNumber(unit_); + return result == null ? com.google.shopping.type.Weight.WeightUnit.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, amountMicros_); + } + if (unit_ != com.google.shopping.type.Weight.WeightUnit.WEIGHT_UNIT_UNSPECIFIED.getNumber()) { + output.writeEnum(2, unit_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, amountMicros_); + } + if (unit_ != com.google.shopping.type.Weight.WeightUnit.WEIGHT_UNIT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, unit_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.type.Weight)) { + return super.equals(obj); + } + com.google.shopping.type.Weight other = (com.google.shopping.type.Weight) obj; + + if (hasAmountMicros() != other.hasAmountMicros()) return false; + if (hasAmountMicros()) { + if (getAmountMicros() != other.getAmountMicros()) return false; + } + if (unit_ != other.unit_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAmountMicros()) { + hash = (37 * hash) + AMOUNT_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAmountMicros()); + } + hash = (37 * hash) + UNIT_FIELD_NUMBER; + hash = (53 * hash) + unit_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.type.Weight parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Weight parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Weight parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Weight parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Weight parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Weight parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Weight parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Weight parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Weight parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Weight parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Weight parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Weight parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.shopping.type.Weight prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The weight represented as the value in string and the unit.
+   * 
+ * + * Protobuf type {@code google.shopping.type.Weight} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.type.Weight) + com.google.shopping.type.WeightOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Weight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Weight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Weight.class, com.google.shopping.type.Weight.Builder.class); + } + + // Construct using com.google.shopping.type.Weight.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + amountMicros_ = 0L; + unit_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Weight_descriptor; + } + + @java.lang.Override + public com.google.shopping.type.Weight getDefaultInstanceForType() { + return com.google.shopping.type.Weight.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.type.Weight build() { + com.google.shopping.type.Weight result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.type.Weight buildPartial() { + com.google.shopping.type.Weight result = new com.google.shopping.type.Weight(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.shopping.type.Weight result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.amountMicros_ = amountMicros_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.unit_ = unit_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.type.Weight) { + return mergeFrom((com.google.shopping.type.Weight) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.type.Weight other) { + if (other == com.google.shopping.type.Weight.getDefaultInstance()) return this; + if (other.hasAmountMicros()) { + setAmountMicros(other.getAmountMicros()); + } + if (other.unit_ != 0) { + setUnitValue(other.getUnitValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + amountMicros_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + unit_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long amountMicros_; + /** + * + * + *
+     * Required. The weight represented as a number in micros (1 million micros is
+     * an equivalent to one's currency standard unit, for example, 1 kg = 1000000
+     * micros).
+     * This field can also be set as infinity by setting to -1.
+     * This field only support -1 and positive value.
+     * 
+ * + * optional int64 amount_micros = 1; + * + * @return Whether the amountMicros field is set. + */ + @java.lang.Override + public boolean hasAmountMicros() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The weight represented as a number in micros (1 million micros is
+     * an equivalent to one's currency standard unit, for example, 1 kg = 1000000
+     * micros).
+     * This field can also be set as infinity by setting to -1.
+     * This field only support -1 and positive value.
+     * 
+ * + * optional int64 amount_micros = 1; + * + * @return The amountMicros. + */ + @java.lang.Override + public long getAmountMicros() { + return amountMicros_; + } + /** + * + * + *
+     * Required. The weight represented as a number in micros (1 million micros is
+     * an equivalent to one's currency standard unit, for example, 1 kg = 1000000
+     * micros).
+     * This field can also be set as infinity by setting to -1.
+     * This field only support -1 and positive value.
+     * 
+ * + * optional int64 amount_micros = 1; + * + * @param value The amountMicros to set. + * @return This builder for chaining. + */ + public Builder setAmountMicros(long value) { + + amountMicros_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The weight represented as a number in micros (1 million micros is
+     * an equivalent to one's currency standard unit, for example, 1 kg = 1000000
+     * micros).
+     * This field can also be set as infinity by setting to -1.
+     * This field only support -1 and positive value.
+     * 
+ * + * optional int64 amount_micros = 1; + * + * @return This builder for chaining. + */ + public Builder clearAmountMicros() { + bitField0_ = (bitField0_ & ~0x00000001); + amountMicros_ = 0L; + onChanged(); + return this; + } + + private int unit_ = 0; + /** + * + * + *
+     * Required. The weight unit.
+     * Acceptable values are: kg and lb
+     * 
+ * + * .google.shopping.type.Weight.WeightUnit unit = 2; + * + * @return The enum numeric value on the wire for unit. + */ + @java.lang.Override + public int getUnitValue() { + return unit_; + } + /** + * + * + *
+     * Required. The weight unit.
+     * Acceptable values are: kg and lb
+     * 
+ * + * .google.shopping.type.Weight.WeightUnit unit = 2; + * + * @param value The enum numeric value on the wire for unit to set. + * @return This builder for chaining. + */ + public Builder setUnitValue(int value) { + unit_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The weight unit.
+     * Acceptable values are: kg and lb
+     * 
+ * + * .google.shopping.type.Weight.WeightUnit unit = 2; + * + * @return The unit. + */ + @java.lang.Override + public com.google.shopping.type.Weight.WeightUnit getUnit() { + com.google.shopping.type.Weight.WeightUnit result = + com.google.shopping.type.Weight.WeightUnit.forNumber(unit_); + return result == null ? com.google.shopping.type.Weight.WeightUnit.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. The weight unit.
+     * Acceptable values are: kg and lb
+     * 
+ * + * .google.shopping.type.Weight.WeightUnit unit = 2; + * + * @param value The unit to set. + * @return This builder for chaining. + */ + public Builder setUnit(com.google.shopping.type.Weight.WeightUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + unit_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The weight unit.
+     * Acceptable values are: kg and lb
+     * 
+ * + * .google.shopping.type.Weight.WeightUnit unit = 2; + * + * @return This builder for chaining. + */ + public Builder clearUnit() { + bitField0_ = (bitField0_ & ~0x00000002); + unit_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.type.Weight) + } + + // @@protoc_insertion_point(class_scope:google.shopping.type.Weight) + private static final com.google.shopping.type.Weight DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.type.Weight(); + } + + public static com.google.shopping.type.Weight getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Weight parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.type.Weight getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/WeightOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/WeightOrBuilder.java new file mode 100644 index 0000000000..2e52f5a014 --- /dev/null +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/shopping/type/WeightOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +// Protobuf Java Version: 3.25.3 +package com.google.shopping.type; + +public interface WeightOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.type.Weight) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The weight represented as a number in micros (1 million micros is
+   * an equivalent to one's currency standard unit, for example, 1 kg = 1000000
+   * micros).
+   * This field can also be set as infinity by setting to -1.
+   * This field only support -1 and positive value.
+   * 
+ * + * optional int64 amount_micros = 1; + * + * @return Whether the amountMicros field is set. + */ + boolean hasAmountMicros(); + /** + * + * + *
+   * Required. The weight represented as a number in micros (1 million micros is
+   * an equivalent to one's currency standard unit, for example, 1 kg = 1000000
+   * micros).
+   * This field can also be set as infinity by setting to -1.
+   * This field only support -1 and positive value.
+   * 
+ * + * optional int64 amount_micros = 1; + * + * @return The amountMicros. + */ + long getAmountMicros(); + + /** + * + * + *
+   * Required. The weight unit.
+   * Acceptable values are: kg and lb
+   * 
+ * + * .google.shopping.type.Weight.WeightUnit unit = 2; + * + * @return The enum numeric value on the wire for unit. + */ + int getUnitValue(); + /** + * + * + *
+   * Required. The weight unit.
+   * Acceptable values are: kg and lb
+   * 
+ * + * .google.shopping.type.Weight.WeightUnit unit = 2; + * + * @return The unit. + */ + com.google.shopping.type.Weight.WeightUnit getUnit(); +} diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/shopping/type/types.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/shopping/type/types.proto index c23bf52d62..f5c218694f 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/shopping/type/types.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/shopping/type/types.proto @@ -22,13 +22,37 @@ option java_multiple_files = true; option java_outer_classname = "TypesProto"; option java_package = "com.google.shopping.type"; +// The weight represented as the value in string and the unit. +message Weight { + // The weight unit. + enum WeightUnit { + // unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0; + + // lb unit. + POUND = 1; + + // kg unit. + KILOGRAM = 2; + } + + // Required. The weight represented as a number in micros (1 million micros is + // an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + // micros). + // This field can also be set as infinity by setting to -1. + // This field only support -1 and positive value. + optional int64 amount_micros = 1; + + // Required. The weight unit. + // Acceptable values are: kg and lb + WeightUnit unit = 2; +} + // The price represented as a number and currency. message Price { // The price represented as a number in micros (1 million micros is an // equivalent to one's currency standard unit, for example, 1 USD = 1000000 // micros). - // This field can also be set as infinity by setting to -1. - // This field only support -1 and positive value. optional int64 amount_micros = 1; // The currency of the price using three-letter acronyms according to [ISO From 42251c3ad964fd38d90a6d53231b2467dfcca165 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 22:48:44 +0000 Subject: [PATCH 14/18] chore(main): release 2.40.0 (#2679) :robot: I have created a release *beep* *boop* ---
2.40.0 ## [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))
--- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .cloudbuild/graalvm/cloudbuild-test-a.yaml | 2 +- .cloudbuild/graalvm/cloudbuild-test-b.yaml | 2 +- .cloudbuild/graalvm/cloudbuild.yaml | 2 +- ...cloudbuild-library-generation-release.yaml | 2 +- .release-please-manifest.json | 2 +- CHANGELOG.md | 34 +++++++++++++++++++ WORKSPACE | 2 +- api-common-java/pom.xml | 4 +-- coverage-report/pom.xml | 8 ++--- gapic-generator-java-bom/pom.xml | 26 +++++++------- gapic-generator-java-pom-parent/pom.xml | 2 +- gapic-generator-java/pom.xml | 6 ++-- gax-java/README.md | 12 +++---- gax-java/dependencies.properties | 8 ++--- gax-java/gax-bom/pom.xml | 20 +++++------ gax-java/gax-grpc/pom.xml | 4 +-- gax-java/gax-httpjson/pom.xml | 4 +-- gax-java/gax/pom.xml | 4 +-- gax-java/pom.xml | 14 ++++---- .../grpc-google-common-protos/pom.xml | 4 +-- java-common-protos/pom.xml | 10 +++--- .../proto-google-common-protos/pom.xml | 4 +-- java-core/google-cloud-core-bom/pom.xml | 10 +++--- java-core/google-cloud-core-grpc/pom.xml | 4 +-- java-core/google-cloud-core-http/pom.xml | 4 +-- java-core/google-cloud-core/pom.xml | 4 +-- java-core/pom.xml | 6 ++-- java-iam/grpc-google-iam-v1/pom.xml | 4 +-- java-iam/grpc-google-iam-v2/pom.xml | 4 +-- java-iam/grpc-google-iam-v2beta/pom.xml | 4 +-- java-iam/pom.xml | 22 ++++++------ java-iam/proto-google-iam-v1/pom.xml | 4 +-- java-iam/proto-google-iam-v2/pom.xml | 4 +-- java-iam/proto-google-iam-v2beta/pom.xml | 4 +-- java-shared-dependencies/README.md | 2 +- .../dependency-convergence-check/pom.xml | 2 +- .../first-party-dependencies/pom.xml | 10 +++--- java-shared-dependencies/pom.xml | 8 ++--- .../third-party-dependencies/pom.xml | 4 +-- .../upper-bound-check/pom.xml | 4 +-- sdk-platform-java-config/pom.xml | 4 +-- showcase/pom.xml | 2 +- versions.txt | 32 ++++++++--------- 43 files changed, 176 insertions(+), 142 deletions(-) diff --git a/.cloudbuild/graalvm/cloudbuild-test-a.yaml b/.cloudbuild/graalvm/cloudbuild-test-a.yaml index 04a51730f7..580e48f9a4 100644 --- a/.cloudbuild/graalvm/cloudbuild-test-a.yaml +++ b/.cloudbuild/graalvm/cloudbuild-test-a.yaml @@ -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.0' # {x-version-update:google-cloud-shared-dependencies:current} _JAVA_SHARED_CONFIG_VERSION: '1.7.7' steps: diff --git a/.cloudbuild/graalvm/cloudbuild-test-b.yaml b/.cloudbuild/graalvm/cloudbuild-test-b.yaml index 00bfaeb62c..6d3cf99647 100644 --- a/.cloudbuild/graalvm/cloudbuild-test-b.yaml +++ b/.cloudbuild/graalvm/cloudbuild-test-b.yaml @@ -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.0' # {x-version-update:google-cloud-shared-dependencies:current} _JAVA_SHARED_CONFIG_VERSION: '1.7.7' steps: diff --git a/.cloudbuild/graalvm/cloudbuild.yaml b/.cloudbuild/graalvm/cloudbuild.yaml index 2a31854c32..2be8215d6b 100644 --- a/.cloudbuild/graalvm/cloudbuild.yaml +++ b/.cloudbuild/graalvm/cloudbuild.yaml @@ -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.0' # {x-version-update:google-cloud-shared-dependencies:current} _JAVA_SHARED_CONFIG_VERSION: '1.7.7' steps: # GraalVM A build diff --git a/.cloudbuild/library_generation/cloudbuild-library-generation-release.yaml b/.cloudbuild/library_generation/cloudbuild-library-generation-release.yaml index a35be62824..533625a41b 100644 --- a/.cloudbuild/library_generation/cloudbuild-library-generation-release.yaml +++ b/.cloudbuild/library_generation/cloudbuild-library-generation-release.yaml @@ -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.0' # {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 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9f6026f1c7..69efe8f538 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.39.0" + ".": "2.40.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 482017f58a..6b42bc76aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/WORKSPACE b/WORKSPACE index 4612984c09..1fea993ca6 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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.0" # {x-version-update:gapic-generator-java:current} maven_install( artifacts = [ diff --git a/api-common-java/pom.xml b/api-common-java/pom.xml index e289f6000f..e658f80be1 100644 --- a/api-common-java/pom.xml +++ b/api-common-java/pom.xml @@ -5,14 +5,14 @@ com.google.api api-common jar - 2.30.1-SNAPSHOT + 2.31.0 API Common Common utilities for Google APIs in Java com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../gapic-generator-java-pom-parent diff --git a/coverage-report/pom.xml b/coverage-report/pom.xml index 559d8ce86c..307f8aa643 100644 --- a/coverage-report/pom.xml +++ b/coverage-report/pom.xml @@ -31,22 +31,22 @@ com.google.api gax - 2.47.1-SNAPSHOT + 2.48.0 com.google.api gax-grpc - 2.47.1-SNAPSHOT + 2.48.0 com.google.api gax-httpjson - 2.47.1-SNAPSHOT + 2.48.0 com.google.api api-common - 2.30.1-SNAPSHOT + 2.31.0 diff --git a/gapic-generator-java-bom/pom.xml b/gapic-generator-java-bom/pom.xml index 31db5fd50a..ec5bfe9fa4 100644 --- a/gapic-generator-java-bom/pom.xml +++ b/gapic-generator-java-bom/pom.xml @@ -4,7 +4,7 @@ com.google.api gapic-generator-java-bom pom - 2.39.1-SNAPSHOT + 2.40.0 GAPIC Generator Java BOM BOM for the libraries in gapic-generator-java repository. Users should not @@ -15,7 +15,7 @@ com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../gapic-generator-java-pom-parent @@ -82,61 +82,61 @@ com.google.api api-common - 2.30.1-SNAPSHOT + 2.31.0 com.google.api gax-bom - 2.47.1-SNAPSHOT + 2.48.0 pom import com.google.api gapic-generator-java - 2.39.1-SNAPSHOT + 2.40.0 com.google.api.grpc grpc-google-common-protos - 2.38.1-SNAPSHOT + 2.39.0 com.google.api.grpc proto-google-common-protos - 2.38.1-SNAPSHOT + 2.39.0 com.google.api.grpc proto-google-iam-v1 - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc proto-google-iam-v2 - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc proto-google-iam-v2beta - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc grpc-google-iam-v1 - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc grpc-google-iam-v2 - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc grpc-google-iam-v2beta - 1.33.1-SNAPSHOT + 1.34.0 diff --git a/gapic-generator-java-pom-parent/pom.xml b/gapic-generator-java-pom-parent/pom.xml index 23c2a4f9db..8867ca6a97 100644 --- a/gapic-generator-java-pom-parent/pom.xml +++ b/gapic-generator-java-pom-parent/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 pom GAPIC Generator Java POM Parent https://github.com/googleapis/sdk-platform-java diff --git a/gapic-generator-java/pom.xml b/gapic-generator-java/pom.xml index 5b1145d0bd..979fcf00b9 100644 --- a/gapic-generator-java/pom.xml +++ b/gapic-generator-java/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.api gapic-generator-java - 2.39.1-SNAPSHOT + 2.40.0 GAPIC Generator Java GAPIC generator Java @@ -22,7 +22,7 @@ com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../gapic-generator-java-pom-parent @@ -31,7 +31,7 @@ com.google.api gapic-generator-java-bom - 2.39.1-SNAPSHOT + 2.40.0 pom import diff --git a/gax-java/README.md b/gax-java/README.md index 63cc6e4bfc..2f74b63d7d 100644 --- a/gax-java/README.md +++ b/gax-java/README.md @@ -34,27 +34,27 @@ If you are using Maven, add this to your pom.xml file com.google.api gax - 2.47.0 + 2.48.0 com.google.api gax-grpc - 2.47.0 + 2.48.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.api:gax:2.47.0', - 'com.google.api:gax-grpc:2.47.0' +compile 'com.google.api:gax:2.48.0', + 'com.google.api:gax-grpc:2.48.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.api" % "gax" % "2.47.0" -libraryDependencies += "com.google.api" % "gax-grpc" % "2.47.0" +libraryDependencies += "com.google.api" % "gax" % "2.48.0" +libraryDependencies += "com.google.api" % "gax-grpc" % "2.48.0" ``` [//]: # ({x-version-update-end}) diff --git a/gax-java/dependencies.properties b/gax-java/dependencies.properties index e76c827179..df29c20193 100644 --- a/gax-java/dependencies.properties +++ b/gax-java/dependencies.properties @@ -8,16 +8,16 @@ # Versions of oneself # {x-version-update-start:gax:current} -version.gax=2.47.1-SNAPSHOT +version.gax=2.48.0 # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_grpc=2.47.1-SNAPSHOT +version.gax_grpc=2.48.0 # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_bom=2.47.1-SNAPSHOT +version.gax_bom=2.48.0 # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_httpjson=2.47.1-SNAPSHOT +version.gax_httpjson=2.48.0 # {x-version-update-end} # Versions for dependencies which actual artifacts differ between Bazel and Gradle. diff --git a/gax-java/gax-bom/pom.xml b/gax-java/gax-bom/pom.xml index bb3b7f960b..422132ba17 100644 --- a/gax-java/gax-bom/pom.xml +++ b/gax-java/gax-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.api gax-bom - 2.47.1-SNAPSHOT + 2.48.0 pom GAX (Google Api eXtensions) for Java (BOM) Google Api eXtensions for Java (BOM) @@ -43,55 +43,55 @@ com.google.api gax - 2.47.1-SNAPSHOT + 2.48.0 com.google.api gax - 2.47.1-SNAPSHOT + 2.48.0 test-jar testlib com.google.api gax - 2.47.1-SNAPSHOT + 2.48.0 testlib com.google.api gax-grpc - 2.47.1-SNAPSHOT + 2.48.0 com.google.api gax-grpc - 2.47.1-SNAPSHOT + 2.48.0 test-jar testlib com.google.api gax-grpc - 2.47.1-SNAPSHOT + 2.48.0 testlib com.google.api gax-httpjson - 2.47.1-SNAPSHOT + 2.48.0 com.google.api gax-httpjson - 2.47.1-SNAPSHOT + 2.48.0 test-jar testlib com.google.api gax-httpjson - 2.47.1-SNAPSHOT + 2.48.0 testlib diff --git a/gax-java/gax-grpc/pom.xml b/gax-java/gax-grpc/pom.xml index ac0d4d8ff9..d23682c979 100644 --- a/gax-java/gax-grpc/pom.xml +++ b/gax-java/gax-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax-grpc - 2.47.1-SNAPSHOT + 2.48.0 jar GAX (Google Api eXtensions) for Java (gRPC) Google Api eXtensions for Java (gRPC) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.47.1-SNAPSHOT + 2.48.0 diff --git a/gax-java/gax-httpjson/pom.xml b/gax-java/gax-httpjson/pom.xml index fe52fbc94d..d7a0f46329 100644 --- a/gax-java/gax-httpjson/pom.xml +++ b/gax-java/gax-httpjson/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax-httpjson - 2.47.1-SNAPSHOT + 2.48.0 jar GAX (Google Api eXtensions) for Java (HTTP JSON) Google Api eXtensions for Java (HTTP JSON) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.47.1-SNAPSHOT + 2.48.0 diff --git a/gax-java/gax/pom.xml b/gax-java/gax/pom.xml index ffcd2b3070..19d7984415 100644 --- a/gax-java/gax/pom.xml +++ b/gax-java/gax/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax - 2.47.1-SNAPSHOT + 2.48.0 jar GAX (Google Api eXtensions) for Java (Core) Google Api eXtensions for Java (Core) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.47.1-SNAPSHOT + 2.48.0 diff --git a/gax-java/pom.xml b/gax-java/pom.xml index b44756ed55..37cea8847a 100644 --- a/gax-java/pom.xml +++ b/gax-java/pom.xml @@ -4,14 +4,14 @@ com.google.api gax-parent pom - 2.47.1-SNAPSHOT + 2.48.0 GAX (Google Api eXtensions) for Java (Parent) Google Api eXtensions for Java (Parent) com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../gapic-generator-java-pom-parent @@ -50,7 +50,7 @@ com.google.api api-common - 2.30.1-SNAPSHOT + 2.31.0 com.google.auth @@ -108,24 +108,24 @@ com.google.api gax - 2.47.1-SNAPSHOT + 2.48.0 com.google.api gax - 2.47.1-SNAPSHOT + 2.48.0 test-jar testlib com.google.api.grpc proto-google-common-protos - 2.38.1-SNAPSHOT + 2.39.0 com.google.api.grpc grpc-google-common-protos - 2.38.1-SNAPSHOT + 2.39.0 io.grpc diff --git a/java-common-protos/grpc-google-common-protos/pom.xml b/java-common-protos/grpc-google-common-protos/pom.xml index 586f7310ea..f37648bffa 100644 --- a/java-common-protos/grpc-google-common-protos/pom.xml +++ b/java-common-protos/grpc-google-common-protos/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-common-protos - 2.38.1-SNAPSHOT + 2.39.0 grpc-google-common-protos GRPC library for grpc-google-common-protos com.google.api.grpc google-common-protos-parent - 2.38.1-SNAPSHOT + 2.39.0 diff --git a/java-common-protos/pom.xml b/java-common-protos/pom.xml index 86f9cfb5d3..f25622868e 100644 --- a/java-common-protos/pom.xml +++ b/java-common-protos/pom.xml @@ -4,7 +4,7 @@ com.google.api.grpc google-common-protos-parent pom - 2.38.1-SNAPSHOT + 2.39.0 Google Common Protos Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../gapic-generator-java-pom-parent @@ -61,7 +61,7 @@ com.google.cloud third-party-dependencies - 3.29.1-SNAPSHOT + 3.30.0 pom import @@ -75,7 +75,7 @@ com.google.api.grpc grpc-google-common-protos - 2.38.1-SNAPSHOT + 2.39.0 io.grpc @@ -87,7 +87,7 @@ com.google.api.grpc proto-google-common-protos - 2.38.1-SNAPSHOT + 2.39.0 com.google.guava diff --git a/java-common-protos/proto-google-common-protos/pom.xml b/java-common-protos/proto-google-common-protos/pom.xml index 99e0c1ae96..84b183c35c 100644 --- a/java-common-protos/proto-google-common-protos/pom.xml +++ b/java-common-protos/proto-google-common-protos/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-common-protos - 2.38.1-SNAPSHOT + 2.39.0 proto-google-common-protos PROTO library for proto-google-common-protos com.google.api.grpc google-common-protos-parent - 2.38.1-SNAPSHOT + 2.39.0 diff --git a/java-core/google-cloud-core-bom/pom.xml b/java-core/google-cloud-core-bom/pom.xml index 8a1c19735f..754ecfa01d 100644 --- a/java-core/google-cloud-core-bom/pom.xml +++ b/java-core/google-cloud-core-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-core-bom - 2.37.1-SNAPSHOT + 2.38.0 pom com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../../gapic-generator-java-pom-parent @@ -23,17 +23,17 @@ com.google.cloud google-cloud-core - 2.37.1-SNAPSHOT + 2.38.0 com.google.cloud google-cloud-core-grpc - 2.37.1-SNAPSHOT + 2.38.0 com.google.cloud google-cloud-core-http - 2.37.1-SNAPSHOT + 2.38.0 diff --git a/java-core/google-cloud-core-grpc/pom.xml b/java-core/google-cloud-core-grpc/pom.xml index ffc02ccc4d..920e13e488 100644 --- a/java-core/google-cloud-core-grpc/pom.xml +++ b/java-core/google-cloud-core-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-grpc - 2.37.1-SNAPSHOT + 2.38.0 jar Google Cloud Core gRPC @@ -12,7 +12,7 @@ com.google.cloud google-cloud-core-parent - 2.37.1-SNAPSHOT + 2.38.0 google-cloud-core-grpc diff --git a/java-core/google-cloud-core-http/pom.xml b/java-core/google-cloud-core-http/pom.xml index f88d3ef6d9..1fa078c495 100644 --- a/java-core/google-cloud-core-http/pom.xml +++ b/java-core/google-cloud-core-http/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-http - 2.37.1-SNAPSHOT + 2.38.0 jar Google Cloud Core HTTP @@ -12,7 +12,7 @@ com.google.cloud google-cloud-core-parent - 2.37.1-SNAPSHOT + 2.38.0 google-cloud-core-http diff --git a/java-core/google-cloud-core/pom.xml b/java-core/google-cloud-core/pom.xml index 4abc1faf46..890e43177a 100644 --- a/java-core/google-cloud-core/pom.xml +++ b/java-core/google-cloud-core/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core - 2.37.1-SNAPSHOT + 2.38.0 jar Google Cloud Core @@ -12,7 +12,7 @@ com.google.cloud google-cloud-core-parent - 2.37.1-SNAPSHOT + 2.38.0 google-cloud-core diff --git a/java-core/pom.xml b/java-core/pom.xml index 6c6d776ed3..7ac69351ab 100644 --- a/java-core/pom.xml +++ b/java-core/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-core-parent pom - 2.37.1-SNAPSHOT + 2.38.0 Google Cloud Core Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../gapic-generator-java-pom-parent @@ -33,7 +33,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.29.1-SNAPSHOT + 3.30.0 pom import diff --git a/java-iam/grpc-google-iam-v1/pom.xml b/java-iam/grpc-google-iam-v1/pom.xml index 38daec9b3d..b26a08ea02 100644 --- a/java-iam/grpc-google-iam-v1/pom.xml +++ b/java-iam/grpc-google-iam-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v1 - 1.33.1-SNAPSHOT + 1.34.0 grpc-google-iam-v1 GRPC library for grpc-google-iam-v1 com.google.cloud google-iam-parent - 1.33.1-SNAPSHOT + 1.34.0 diff --git a/java-iam/grpc-google-iam-v2/pom.xml b/java-iam/grpc-google-iam-v2/pom.xml index fd47328a7a..5abe6cc942 100644 --- a/java-iam/grpc-google-iam-v2/pom.xml +++ b/java-iam/grpc-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2 - 1.33.1-SNAPSHOT + 1.34.0 grpc-google-iam-v2 GRPC library for proto-google-iam-v2 com.google.cloud google-iam-parent - 1.33.1-SNAPSHOT + 1.34.0 diff --git a/java-iam/grpc-google-iam-v2beta/pom.xml b/java-iam/grpc-google-iam-v2beta/pom.xml index 93016c76ed..6640054e61 100644 --- a/java-iam/grpc-google-iam-v2beta/pom.xml +++ b/java-iam/grpc-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2beta - 1.33.1-SNAPSHOT + 1.34.0 grpc-google-iam-v2beta GRPC library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.33.1-SNAPSHOT + 1.34.0 diff --git a/java-iam/pom.xml b/java-iam/pom.xml index 54bd260e75..f1ad1e8f21 100644 --- a/java-iam/pom.xml +++ b/java-iam/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-iam-parent pom - 1.33.1-SNAPSHOT + 1.34.0 Google IAM Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../gapic-generator-java-pom-parent @@ -60,7 +60,7 @@ com.google.cloud third-party-dependencies - 3.29.1-SNAPSHOT + 3.30.0 pom import @@ -88,44 +88,44 @@ com.google.api gax-bom - 2.47.1-SNAPSHOT + 2.48.0 pom import com.google.api.grpc proto-google-iam-v2 - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc grpc-google-iam-v2 - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc proto-google-common-protos - 2.38.1-SNAPSHOT + 2.39.0 com.google.api.grpc proto-google-iam-v2beta - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc grpc-google-iam-v1 - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc grpc-google-iam-v2beta - 1.33.1-SNAPSHOT + 1.34.0 com.google.api.grpc proto-google-iam-v1 - 1.33.1-SNAPSHOT + 1.34.0 javax.annotation diff --git a/java-iam/proto-google-iam-v1/pom.xml b/java-iam/proto-google-iam-v1/pom.xml index 7733548631..efc956697c 100644 --- a/java-iam/proto-google-iam-v1/pom.xml +++ b/java-iam/proto-google-iam-v1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v1 - 1.33.1-SNAPSHOT + 1.34.0 proto-google-iam-v1 PROTO library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.33.1-SNAPSHOT + 1.34.0 diff --git a/java-iam/proto-google-iam-v2/pom.xml b/java-iam/proto-google-iam-v2/pom.xml index 86010bcdce..1702ed7353 100644 --- a/java-iam/proto-google-iam-v2/pom.xml +++ b/java-iam/proto-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2 - 1.33.1-SNAPSHOT + 1.34.0 proto-google-iam-v2 Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.33.1-SNAPSHOT + 1.34.0 diff --git a/java-iam/proto-google-iam-v2beta/pom.xml b/java-iam/proto-google-iam-v2beta/pom.xml index 01468ba88a..b297ada47c 100644 --- a/java-iam/proto-google-iam-v2beta/pom.xml +++ b/java-iam/proto-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2beta - 1.33.1-SNAPSHOT + 1.34.0 proto-google-iam-v2beta Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.33.1-SNAPSHOT + 1.34.0 diff --git a/java-shared-dependencies/README.md b/java-shared-dependencies/README.md index 3e19280833..196798fd10 100644 --- a/java-shared-dependencies/README.md +++ b/java-shared-dependencies/README.md @@ -14,7 +14,7 @@ If you are using Maven, add this to the `dependencyManagement` section. com.google.cloud google-cloud-shared-dependencies - 3.29.0 + 3.30.0 pom import diff --git a/java-shared-dependencies/dependency-convergence-check/pom.xml b/java-shared-dependencies/dependency-convergence-check/pom.xml index 3ebaf69eeb..d26448d66e 100644 --- a/java-shared-dependencies/dependency-convergence-check/pom.xml +++ b/java-shared-dependencies/dependency-convergence-check/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud shared-dependencies-dependency-convergence-test - 3.29.1-SNAPSHOT + 3.30.0 Dependency convergence test for certain artifacts in Google Cloud Shared Dependencies An dependency convergence test case for the shared dependencies BOM. A failure of this test case means diff --git a/java-shared-dependencies/first-party-dependencies/pom.xml b/java-shared-dependencies/first-party-dependencies/pom.xml index 4d220b5830..0b118c73ad 100644 --- a/java-shared-dependencies/first-party-dependencies/pom.xml +++ b/java-shared-dependencies/first-party-dependencies/pom.xml @@ -6,7 +6,7 @@ com.google.cloud first-party-dependencies pom - 3.29.1-SNAPSHOT + 3.30.0 Google Cloud First-party Shared Dependencies Shared first-party dependencies for Google Cloud Java libraries. @@ -33,7 +33,7 @@ com.google.api gapic-generator-java-bom - 2.39.1-SNAPSHOT + 2.40.0 pom import @@ -45,7 +45,7 @@ com.google.cloud google-cloud-core-bom - 2.37.1-SNAPSHOT + 2.38.0 pom import @@ -69,13 +69,13 @@ com.google.cloud google-cloud-core - 2.37.1-SNAPSHOT + 2.38.0 test-jar com.google.cloud google-cloud-core - 2.37.1-SNAPSHOT + 2.38.0 tests diff --git a/java-shared-dependencies/pom.xml b/java-shared-dependencies/pom.xml index f56df18476..86ac4aecdf 100644 --- a/java-shared-dependencies/pom.xml +++ b/java-shared-dependencies/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-shared-dependencies pom - 3.29.1-SNAPSHOT + 3.30.0 first-party-dependencies third-party-dependencies @@ -17,7 +17,7 @@ com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../gapic-generator-java-pom-parent @@ -31,14 +31,14 @@ com.google.cloud first-party-dependencies - 3.29.1-SNAPSHOT + 3.30.0 pom import com.google.cloud third-party-dependencies - 3.29.1-SNAPSHOT + 3.30.0 pom import diff --git a/java-shared-dependencies/third-party-dependencies/pom.xml b/java-shared-dependencies/third-party-dependencies/pom.xml index 237ebec658..3c57411452 100644 --- a/java-shared-dependencies/third-party-dependencies/pom.xml +++ b/java-shared-dependencies/third-party-dependencies/pom.xml @@ -6,7 +6,7 @@ com.google.cloud third-party-dependencies pom - 3.29.1-SNAPSHOT + 3.30.0 Google Cloud Third-party Shared Dependencies Shared third-party dependencies for Google Cloud Java libraries. @@ -15,7 +15,7 @@ com.google.api gapic-generator-java-pom-parent - 2.39.1-SNAPSHOT + 2.40.0 ../../gapic-generator-java-pom-parent diff --git a/java-shared-dependencies/upper-bound-check/pom.xml b/java-shared-dependencies/upper-bound-check/pom.xml index b2efbf7571..c3c4531877 100644 --- a/java-shared-dependencies/upper-bound-check/pom.xml +++ b/java-shared-dependencies/upper-bound-check/pom.xml @@ -4,7 +4,7 @@ com.google.cloud shared-dependencies-upper-bound-test pom - 3.29.1-SNAPSHOT + 3.30.0 Upper bound test for Google Cloud Shared Dependencies An upper bound test case for the shared dependencies BOM. A failure of this test case means @@ -30,7 +30,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.29.1-SNAPSHOT + 3.30.0 pom import diff --git a/sdk-platform-java-config/pom.xml b/sdk-platform-java-config/pom.xml index f345dd575e..ca7f47f0b6 100644 --- a/sdk-platform-java-config/pom.xml +++ b/sdk-platform-java-config/pom.xml @@ -4,7 +4,7 @@ com.google.cloud sdk-platform-java-config pom - 3.29.1-SNAPSHOT + 3.30.0 SDK Platform For Java Configurations Shared build configuration for Google Cloud Java libraries. @@ -17,6 +17,6 @@ - 3.29.1-SNAPSHOT + 3.30.0 \ No newline at end of file diff --git a/showcase/pom.xml b/showcase/pom.xml index 9ef5738999..853d26c9cf 100644 --- a/showcase/pom.xml +++ b/showcase/pom.xml @@ -34,7 +34,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.29.1-SNAPSHOT + 3.30.0 pom import diff --git a/versions.txt b/versions.txt index 149d3c7a1a..71894be73a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,19 +1,19 @@ # Format: # module:released-version:current-version -gapic-generator-java:2.39.0:2.39.1-SNAPSHOT -api-common:2.30.0:2.30.1-SNAPSHOT -gax:2.47.0:2.47.1-SNAPSHOT -gax-grpc:2.47.0:2.47.1-SNAPSHOT -gax-httpjson:0.132.0:0.132.1-SNAPSHOT -proto-google-common-protos:2.38.0:2.38.1-SNAPSHOT -grpc-google-common-protos:2.38.0:2.38.1-SNAPSHOT -proto-google-iam-v1:1.33.0:1.33.1-SNAPSHOT -grpc-google-iam-v1:1.33.0:1.33.1-SNAPSHOT -proto-google-iam-v2beta:1.33.0:1.33.1-SNAPSHOT -grpc-google-iam-v2beta:1.33.0:1.33.1-SNAPSHOT -google-iam-policy:1.33.0:1.33.1-SNAPSHOT -proto-google-iam-v2:1.33.0:1.33.1-SNAPSHOT -grpc-google-iam-v2:1.33.0:1.33.1-SNAPSHOT -google-cloud-core:2.37.0:2.37.1-SNAPSHOT -google-cloud-shared-dependencies:3.29.0:3.29.1-SNAPSHOT +gapic-generator-java:2.40.0:2.40.0 +api-common:2.31.0:2.31.0 +gax:2.48.0:2.48.0 +gax-grpc:2.48.0:2.48.0 +gax-httpjson:0.133.0:0.133.0 +proto-google-common-protos:2.39.0:2.39.0 +grpc-google-common-protos:2.39.0:2.39.0 +proto-google-iam-v1:1.34.0:1.34.0 +grpc-google-iam-v1:1.34.0:1.34.0 +proto-google-iam-v2beta:1.34.0:1.34.0 +grpc-google-iam-v2beta:1.34.0:1.34.0 +google-iam-policy:1.34.0:1.34.0 +proto-google-iam-v2:1.34.0:1.34.0 +grpc-google-iam-v2:1.34.0:1.34.0 +google-cloud-core:2.38.0:2.38.0 +google-cloud-shared-dependencies:3.30.0:3.30.0 From acfddd7759f607da05724d09e1469d54311fad23 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 09:58:10 -0400 Subject: [PATCH 15/18] chore(main): release 2.40.1-SNAPSHOT (#2723) :robot: I have created a release *beep* *boop* ---
2.40.1-SNAPSHOT ### Updating meta-information for bleeding-edge SNAPSHOT release.
--- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .cloudbuild/graalvm/cloudbuild-test-a.yaml | 2 +- .cloudbuild/graalvm/cloudbuild-test-b.yaml | 2 +- .cloudbuild/graalvm/cloudbuild.yaml | 2 +- ...cloudbuild-library-generation-release.yaml | 2 +- WORKSPACE | 2 +- api-common-java/pom.xml | 4 +-- coverage-report/pom.xml | 8 ++--- gapic-generator-java-bom/pom.xml | 26 +++++++-------- gapic-generator-java-pom-parent/pom.xml | 2 +- gapic-generator-java/pom.xml | 6 ++-- gax-java/dependencies.properties | 8 ++--- gax-java/gax-bom/pom.xml | 20 ++++++------ gax-java/gax-grpc/pom.xml | 4 +-- gax-java/gax-httpjson/pom.xml | 4 +-- gax-java/gax/pom.xml | 4 +-- gax-java/pom.xml | 14 ++++---- .../grpc-google-common-protos/pom.xml | 4 +-- java-common-protos/pom.xml | 10 +++--- .../proto-google-common-protos/pom.xml | 4 +-- java-core/google-cloud-core-bom/pom.xml | 10 +++--- java-core/google-cloud-core-grpc/pom.xml | 4 +-- java-core/google-cloud-core-http/pom.xml | 4 +-- java-core/google-cloud-core/pom.xml | 4 +-- java-core/pom.xml | 6 ++-- java-iam/grpc-google-iam-v1/pom.xml | 4 +-- java-iam/grpc-google-iam-v2/pom.xml | 4 +-- java-iam/grpc-google-iam-v2beta/pom.xml | 4 +-- java-iam/pom.xml | 22 ++++++------- java-iam/proto-google-iam-v1/pom.xml | 4 +-- java-iam/proto-google-iam-v2/pom.xml | 4 +-- java-iam/proto-google-iam-v2beta/pom.xml | 4 +-- .../dependency-convergence-check/pom.xml | 2 +- .../first-party-dependencies/pom.xml | 10 +++--- java-shared-dependencies/pom.xml | 8 ++--- .../third-party-dependencies/pom.xml | 4 +-- .../upper-bound-check/pom.xml | 4 +-- sdk-platform-java-config/pom.xml | 4 +-- showcase/pom.xml | 2 +- versions.txt | 32 +++++++++---------- 39 files changed, 134 insertions(+), 134 deletions(-) diff --git a/.cloudbuild/graalvm/cloudbuild-test-a.yaml b/.cloudbuild/graalvm/cloudbuild-test-a.yaml index 580e48f9a4..7a0cdb5412 100644 --- a/.cloudbuild/graalvm/cloudbuild-test-a.yaml +++ b/.cloudbuild/graalvm/cloudbuild-test-a.yaml @@ -14,7 +14,7 @@ timeout: 7200s # 2 hours substitutions: - _SHARED_DEPENDENCIES_VERSION: '3.30.0' # {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: diff --git a/.cloudbuild/graalvm/cloudbuild-test-b.yaml b/.cloudbuild/graalvm/cloudbuild-test-b.yaml index 6d3cf99647..ff73ce5f29 100644 --- a/.cloudbuild/graalvm/cloudbuild-test-b.yaml +++ b/.cloudbuild/graalvm/cloudbuild-test-b.yaml @@ -14,7 +14,7 @@ timeout: 7200s # 2 hours substitutions: - _SHARED_DEPENDENCIES_VERSION: '3.30.0' # {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: diff --git a/.cloudbuild/graalvm/cloudbuild.yaml b/.cloudbuild/graalvm/cloudbuild.yaml index 2be8215d6b..1450ecb0b2 100644 --- a/.cloudbuild/graalvm/cloudbuild.yaml +++ b/.cloudbuild/graalvm/cloudbuild.yaml @@ -14,7 +14,7 @@ timeout: 7200s # 2 hours substitutions: - _SHARED_DEPENDENCIES_VERSION: '3.30.0' # {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 diff --git a/.cloudbuild/library_generation/cloudbuild-library-generation-release.yaml b/.cloudbuild/library_generation/cloudbuild-library-generation-release.yaml index 533625a41b..4c5e07d450 100644 --- a/.cloudbuild/library_generation/cloudbuild-library-generation-release.yaml +++ b/.cloudbuild/library_generation/cloudbuild-library-generation-release.yaml @@ -14,7 +14,7 @@ timeout: 7200s # 2 hours substitutions: - _GAPIC_GENERATOR_JAVA_VERSION: '2.40.0' # {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 diff --git a/WORKSPACE b/WORKSPACE index 1fea993ca6..58d3212a0b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -60,7 +60,7 @@ maven_install( repositories = ["https://repo.maven.apache.org/maven2/"], ) -_gapic_generator_java_version = "2.40.0" # {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 = [ diff --git a/api-common-java/pom.xml b/api-common-java/pom.xml index e658f80be1..c8740cd068 100644 --- a/api-common-java/pom.xml +++ b/api-common-java/pom.xml @@ -5,14 +5,14 @@ com.google.api api-common jar - 2.31.0 + 2.31.1-SNAPSHOT API Common Common utilities for Google APIs in Java com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../gapic-generator-java-pom-parent diff --git a/coverage-report/pom.xml b/coverage-report/pom.xml index 307f8aa643..231269f42d 100644 --- a/coverage-report/pom.xml +++ b/coverage-report/pom.xml @@ -31,22 +31,22 @@ com.google.api gax - 2.48.0 + 2.48.1-SNAPSHOT com.google.api gax-grpc - 2.48.0 + 2.48.1-SNAPSHOT com.google.api gax-httpjson - 2.48.0 + 2.48.1-SNAPSHOT com.google.api api-common - 2.31.0 + 2.31.1-SNAPSHOT
diff --git a/gapic-generator-java-bom/pom.xml b/gapic-generator-java-bom/pom.xml index ec5bfe9fa4..5f42b26a91 100644 --- a/gapic-generator-java-bom/pom.xml +++ b/gapic-generator-java-bom/pom.xml @@ -4,7 +4,7 @@ com.google.api gapic-generator-java-bom pom - 2.40.0 + 2.40.1-SNAPSHOT GAPIC Generator Java BOM BOM for the libraries in gapic-generator-java repository. Users should not @@ -15,7 +15,7 @@ com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../gapic-generator-java-pom-parent @@ -82,61 +82,61 @@ com.google.api api-common - 2.31.0 + 2.31.1-SNAPSHOT com.google.api gax-bom - 2.48.0 + 2.48.1-SNAPSHOT pom import com.google.api gapic-generator-java - 2.40.0 + 2.40.1-SNAPSHOT com.google.api.grpc grpc-google-common-protos - 2.39.0 + 2.39.1-SNAPSHOT com.google.api.grpc proto-google-common-protos - 2.39.0 + 2.39.1-SNAPSHOT com.google.api.grpc proto-google-iam-v1 - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc proto-google-iam-v2 - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc proto-google-iam-v2beta - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc grpc-google-iam-v1 - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc grpc-google-iam-v2 - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc grpc-google-iam-v2beta - 1.34.0 + 1.34.1-SNAPSHOT
diff --git a/gapic-generator-java-pom-parent/pom.xml b/gapic-generator-java-pom-parent/pom.xml index 8867ca6a97..9fd65ed3bc 100644 --- a/gapic-generator-java-pom-parent/pom.xml +++ b/gapic-generator-java-pom-parent/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT pom GAPIC Generator Java POM Parent https://github.com/googleapis/sdk-platform-java diff --git a/gapic-generator-java/pom.xml b/gapic-generator-java/pom.xml index 979fcf00b9..730ef82950 100644 --- a/gapic-generator-java/pom.xml +++ b/gapic-generator-java/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.api gapic-generator-java - 2.40.0 + 2.40.1-SNAPSHOT GAPIC Generator Java GAPIC generator Java @@ -22,7 +22,7 @@ com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../gapic-generator-java-pom-parent @@ -31,7 +31,7 @@ com.google.api gapic-generator-java-bom - 2.40.0 + 2.40.1-SNAPSHOT pom import diff --git a/gax-java/dependencies.properties b/gax-java/dependencies.properties index df29c20193..7dc4cf0e9a 100644 --- a/gax-java/dependencies.properties +++ b/gax-java/dependencies.properties @@ -8,16 +8,16 @@ # Versions of oneself # {x-version-update-start:gax:current} -version.gax=2.48.0 +version.gax=2.48.1-SNAPSHOT # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_grpc=2.48.0 +version.gax_grpc=2.48.1-SNAPSHOT # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_bom=2.48.0 +version.gax_bom=2.48.1-SNAPSHOT # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_httpjson=2.48.0 +version.gax_httpjson=2.48.1-SNAPSHOT # {x-version-update-end} # Versions for dependencies which actual artifacts differ between Bazel and Gradle. diff --git a/gax-java/gax-bom/pom.xml b/gax-java/gax-bom/pom.xml index 422132ba17..15ec6bf612 100644 --- a/gax-java/gax-bom/pom.xml +++ b/gax-java/gax-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.api gax-bom - 2.48.0 + 2.48.1-SNAPSHOT pom GAX (Google Api eXtensions) for Java (BOM) Google Api eXtensions for Java (BOM) @@ -43,55 +43,55 @@ com.google.api gax - 2.48.0 + 2.48.1-SNAPSHOT com.google.api gax - 2.48.0 + 2.48.1-SNAPSHOT test-jar testlib com.google.api gax - 2.48.0 + 2.48.1-SNAPSHOT testlib com.google.api gax-grpc - 2.48.0 + 2.48.1-SNAPSHOT com.google.api gax-grpc - 2.48.0 + 2.48.1-SNAPSHOT test-jar testlib com.google.api gax-grpc - 2.48.0 + 2.48.1-SNAPSHOT testlib com.google.api gax-httpjson - 2.48.0 + 2.48.1-SNAPSHOT com.google.api gax-httpjson - 2.48.0 + 2.48.1-SNAPSHOT test-jar testlib com.google.api gax-httpjson - 2.48.0 + 2.48.1-SNAPSHOT testlib
diff --git a/gax-java/gax-grpc/pom.xml b/gax-java/gax-grpc/pom.xml index d23682c979..bf50b8527e 100644 --- a/gax-java/gax-grpc/pom.xml +++ b/gax-java/gax-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax-grpc - 2.48.0 + 2.48.1-SNAPSHOT jar GAX (Google Api eXtensions) for Java (gRPC) Google Api eXtensions for Java (gRPC) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.48.0 + 2.48.1-SNAPSHOT diff --git a/gax-java/gax-httpjson/pom.xml b/gax-java/gax-httpjson/pom.xml index d7a0f46329..ff8930f609 100644 --- a/gax-java/gax-httpjson/pom.xml +++ b/gax-java/gax-httpjson/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax-httpjson - 2.48.0 + 2.48.1-SNAPSHOT jar GAX (Google Api eXtensions) for Java (HTTP JSON) Google Api eXtensions for Java (HTTP JSON) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.48.0 + 2.48.1-SNAPSHOT diff --git a/gax-java/gax/pom.xml b/gax-java/gax/pom.xml index 19d7984415..07fb0d7006 100644 --- a/gax-java/gax/pom.xml +++ b/gax-java/gax/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax - 2.48.0 + 2.48.1-SNAPSHOT jar GAX (Google Api eXtensions) for Java (Core) Google Api eXtensions for Java (Core) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.48.0 + 2.48.1-SNAPSHOT diff --git a/gax-java/pom.xml b/gax-java/pom.xml index 37cea8847a..5966898fc4 100644 --- a/gax-java/pom.xml +++ b/gax-java/pom.xml @@ -4,14 +4,14 @@ com.google.api gax-parent pom - 2.48.0 + 2.48.1-SNAPSHOT GAX (Google Api eXtensions) for Java (Parent) Google Api eXtensions for Java (Parent) com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../gapic-generator-java-pom-parent @@ -50,7 +50,7 @@ com.google.api api-common - 2.31.0 + 2.31.1-SNAPSHOT com.google.auth @@ -108,24 +108,24 @@ com.google.api gax - 2.48.0 + 2.48.1-SNAPSHOT com.google.api gax - 2.48.0 + 2.48.1-SNAPSHOT test-jar testlib com.google.api.grpc proto-google-common-protos - 2.39.0 + 2.39.1-SNAPSHOT com.google.api.grpc grpc-google-common-protos - 2.39.0 + 2.39.1-SNAPSHOT io.grpc diff --git a/java-common-protos/grpc-google-common-protos/pom.xml b/java-common-protos/grpc-google-common-protos/pom.xml index f37648bffa..2adbd8e308 100644 --- a/java-common-protos/grpc-google-common-protos/pom.xml +++ b/java-common-protos/grpc-google-common-protos/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-common-protos - 2.39.0 + 2.39.1-SNAPSHOT grpc-google-common-protos GRPC library for grpc-google-common-protos com.google.api.grpc google-common-protos-parent - 2.39.0 + 2.39.1-SNAPSHOT diff --git a/java-common-protos/pom.xml b/java-common-protos/pom.xml index f25622868e..64315b9c39 100644 --- a/java-common-protos/pom.xml +++ b/java-common-protos/pom.xml @@ -4,7 +4,7 @@ com.google.api.grpc google-common-protos-parent pom - 2.39.0 + 2.39.1-SNAPSHOT Google Common Protos Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../gapic-generator-java-pom-parent @@ -61,7 +61,7 @@ com.google.cloud third-party-dependencies - 3.30.0 + 3.30.1-SNAPSHOT pom import @@ -75,7 +75,7 @@ com.google.api.grpc grpc-google-common-protos - 2.39.0 + 2.39.1-SNAPSHOT io.grpc @@ -87,7 +87,7 @@ com.google.api.grpc proto-google-common-protos - 2.39.0 + 2.39.1-SNAPSHOT com.google.guava diff --git a/java-common-protos/proto-google-common-protos/pom.xml b/java-common-protos/proto-google-common-protos/pom.xml index 84b183c35c..eda6659fb8 100644 --- a/java-common-protos/proto-google-common-protos/pom.xml +++ b/java-common-protos/proto-google-common-protos/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-common-protos - 2.39.0 + 2.39.1-SNAPSHOT proto-google-common-protos PROTO library for proto-google-common-protos com.google.api.grpc google-common-protos-parent - 2.39.0 + 2.39.1-SNAPSHOT diff --git a/java-core/google-cloud-core-bom/pom.xml b/java-core/google-cloud-core-bom/pom.xml index 754ecfa01d..f32a426f1f 100644 --- a/java-core/google-cloud-core-bom/pom.xml +++ b/java-core/google-cloud-core-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-core-bom - 2.38.0 + 2.38.1-SNAPSHOT pom com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../../gapic-generator-java-pom-parent @@ -23,17 +23,17 @@ com.google.cloud google-cloud-core - 2.38.0 + 2.38.1-SNAPSHOT com.google.cloud google-cloud-core-grpc - 2.38.0 + 2.38.1-SNAPSHOT com.google.cloud google-cloud-core-http - 2.38.0 + 2.38.1-SNAPSHOT diff --git a/java-core/google-cloud-core-grpc/pom.xml b/java-core/google-cloud-core-grpc/pom.xml index 920e13e488..e34018d001 100644 --- a/java-core/google-cloud-core-grpc/pom.xml +++ b/java-core/google-cloud-core-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-grpc - 2.38.0 + 2.38.1-SNAPSHOT jar Google Cloud Core gRPC @@ -12,7 +12,7 @@ com.google.cloud google-cloud-core-parent - 2.38.0 + 2.38.1-SNAPSHOT google-cloud-core-grpc diff --git a/java-core/google-cloud-core-http/pom.xml b/java-core/google-cloud-core-http/pom.xml index 1fa078c495..fd9d09276d 100644 --- a/java-core/google-cloud-core-http/pom.xml +++ b/java-core/google-cloud-core-http/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core-http - 2.38.0 + 2.38.1-SNAPSHOT jar Google Cloud Core HTTP @@ -12,7 +12,7 @@ com.google.cloud google-cloud-core-parent - 2.38.0 + 2.38.1-SNAPSHOT google-cloud-core-http diff --git a/java-core/google-cloud-core/pom.xml b/java-core/google-cloud-core/pom.xml index 890e43177a..2fdb90a847 100644 --- a/java-core/google-cloud-core/pom.xml +++ b/java-core/google-cloud-core/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-core - 2.38.0 + 2.38.1-SNAPSHOT jar Google Cloud Core @@ -12,7 +12,7 @@ com.google.cloud google-cloud-core-parent - 2.38.0 + 2.38.1-SNAPSHOT google-cloud-core diff --git a/java-core/pom.xml b/java-core/pom.xml index 7ac69351ab..af452d0855 100644 --- a/java-core/pom.xml +++ b/java-core/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-core-parent pom - 2.38.0 + 2.38.1-SNAPSHOT Google Cloud Core Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../gapic-generator-java-pom-parent @@ -33,7 +33,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.30.0 + 3.30.1-SNAPSHOT pom import diff --git a/java-iam/grpc-google-iam-v1/pom.xml b/java-iam/grpc-google-iam-v1/pom.xml index b26a08ea02..56c5b61de2 100644 --- a/java-iam/grpc-google-iam-v1/pom.xml +++ b/java-iam/grpc-google-iam-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v1 - 1.34.0 + 1.34.1-SNAPSHOT grpc-google-iam-v1 GRPC library for grpc-google-iam-v1 com.google.cloud google-iam-parent - 1.34.0 + 1.34.1-SNAPSHOT diff --git a/java-iam/grpc-google-iam-v2/pom.xml b/java-iam/grpc-google-iam-v2/pom.xml index 5abe6cc942..5838319a4f 100644 --- a/java-iam/grpc-google-iam-v2/pom.xml +++ b/java-iam/grpc-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2 - 1.34.0 + 1.34.1-SNAPSHOT grpc-google-iam-v2 GRPC library for proto-google-iam-v2 com.google.cloud google-iam-parent - 1.34.0 + 1.34.1-SNAPSHOT diff --git a/java-iam/grpc-google-iam-v2beta/pom.xml b/java-iam/grpc-google-iam-v2beta/pom.xml index 6640054e61..5918a05c71 100644 --- a/java-iam/grpc-google-iam-v2beta/pom.xml +++ b/java-iam/grpc-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2beta - 1.34.0 + 1.34.1-SNAPSHOT grpc-google-iam-v2beta GRPC library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.34.0 + 1.34.1-SNAPSHOT diff --git a/java-iam/pom.xml b/java-iam/pom.xml index f1ad1e8f21..8f2e4c1266 100644 --- a/java-iam/pom.xml +++ b/java-iam/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-iam-parent pom - 1.34.0 + 1.34.1-SNAPSHOT Google IAM Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../gapic-generator-java-pom-parent @@ -60,7 +60,7 @@ com.google.cloud third-party-dependencies - 3.30.0 + 3.30.1-SNAPSHOT pom import @@ -88,44 +88,44 @@ com.google.api gax-bom - 2.48.0 + 2.48.1-SNAPSHOT pom import com.google.api.grpc proto-google-iam-v2 - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc grpc-google-iam-v2 - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc proto-google-common-protos - 2.39.0 + 2.39.1-SNAPSHOT com.google.api.grpc proto-google-iam-v2beta - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc grpc-google-iam-v1 - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc grpc-google-iam-v2beta - 1.34.0 + 1.34.1-SNAPSHOT com.google.api.grpc proto-google-iam-v1 - 1.34.0 + 1.34.1-SNAPSHOT javax.annotation diff --git a/java-iam/proto-google-iam-v1/pom.xml b/java-iam/proto-google-iam-v1/pom.xml index efc956697c..c402cd98fe 100644 --- a/java-iam/proto-google-iam-v1/pom.xml +++ b/java-iam/proto-google-iam-v1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v1 - 1.34.0 + 1.34.1-SNAPSHOT proto-google-iam-v1 PROTO library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.34.0 + 1.34.1-SNAPSHOT diff --git a/java-iam/proto-google-iam-v2/pom.xml b/java-iam/proto-google-iam-v2/pom.xml index 1702ed7353..e80853e336 100644 --- a/java-iam/proto-google-iam-v2/pom.xml +++ b/java-iam/proto-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2 - 1.34.0 + 1.34.1-SNAPSHOT proto-google-iam-v2 Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.34.0 + 1.34.1-SNAPSHOT diff --git a/java-iam/proto-google-iam-v2beta/pom.xml b/java-iam/proto-google-iam-v2beta/pom.xml index b297ada47c..31bce8419f 100644 --- a/java-iam/proto-google-iam-v2beta/pom.xml +++ b/java-iam/proto-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2beta - 1.34.0 + 1.34.1-SNAPSHOT proto-google-iam-v2beta Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.34.0 + 1.34.1-SNAPSHOT diff --git a/java-shared-dependencies/dependency-convergence-check/pom.xml b/java-shared-dependencies/dependency-convergence-check/pom.xml index d26448d66e..aafee63670 100644 --- a/java-shared-dependencies/dependency-convergence-check/pom.xml +++ b/java-shared-dependencies/dependency-convergence-check/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud shared-dependencies-dependency-convergence-test - 3.30.0 + 3.30.1-SNAPSHOT Dependency convergence test for certain artifacts in Google Cloud Shared Dependencies An dependency convergence test case for the shared dependencies BOM. A failure of this test case means diff --git a/java-shared-dependencies/first-party-dependencies/pom.xml b/java-shared-dependencies/first-party-dependencies/pom.xml index 0b118c73ad..4f1e8fabd2 100644 --- a/java-shared-dependencies/first-party-dependencies/pom.xml +++ b/java-shared-dependencies/first-party-dependencies/pom.xml @@ -6,7 +6,7 @@ com.google.cloud first-party-dependencies pom - 3.30.0 + 3.30.1-SNAPSHOT Google Cloud First-party Shared Dependencies Shared first-party dependencies for Google Cloud Java libraries. @@ -33,7 +33,7 @@ com.google.api gapic-generator-java-bom - 2.40.0 + 2.40.1-SNAPSHOT pom import @@ -45,7 +45,7 @@ com.google.cloud google-cloud-core-bom - 2.38.0 + 2.38.1-SNAPSHOT pom import @@ -69,13 +69,13 @@ com.google.cloud google-cloud-core - 2.38.0 + 2.38.1-SNAPSHOT test-jar com.google.cloud google-cloud-core - 2.38.0 + 2.38.1-SNAPSHOT tests diff --git a/java-shared-dependencies/pom.xml b/java-shared-dependencies/pom.xml index 86ac4aecdf..935504dbcd 100644 --- a/java-shared-dependencies/pom.xml +++ b/java-shared-dependencies/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-shared-dependencies pom - 3.30.0 + 3.30.1-SNAPSHOT first-party-dependencies third-party-dependencies @@ -17,7 +17,7 @@ com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../gapic-generator-java-pom-parent @@ -31,14 +31,14 @@ com.google.cloud first-party-dependencies - 3.30.0 + 3.30.1-SNAPSHOT pom import com.google.cloud third-party-dependencies - 3.30.0 + 3.30.1-SNAPSHOT pom import diff --git a/java-shared-dependencies/third-party-dependencies/pom.xml b/java-shared-dependencies/third-party-dependencies/pom.xml index 3c57411452..943069ce48 100644 --- a/java-shared-dependencies/third-party-dependencies/pom.xml +++ b/java-shared-dependencies/third-party-dependencies/pom.xml @@ -6,7 +6,7 @@ com.google.cloud third-party-dependencies pom - 3.30.0 + 3.30.1-SNAPSHOT Google Cloud Third-party Shared Dependencies Shared third-party dependencies for Google Cloud Java libraries. @@ -15,7 +15,7 @@ com.google.api gapic-generator-java-pom-parent - 2.40.0 + 2.40.1-SNAPSHOT ../../gapic-generator-java-pom-parent diff --git a/java-shared-dependencies/upper-bound-check/pom.xml b/java-shared-dependencies/upper-bound-check/pom.xml index c3c4531877..12d0bf6253 100644 --- a/java-shared-dependencies/upper-bound-check/pom.xml +++ b/java-shared-dependencies/upper-bound-check/pom.xml @@ -4,7 +4,7 @@ com.google.cloud shared-dependencies-upper-bound-test pom - 3.30.0 + 3.30.1-SNAPSHOT Upper bound test for Google Cloud Shared Dependencies An upper bound test case for the shared dependencies BOM. A failure of this test case means @@ -30,7 +30,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.30.0 + 3.30.1-SNAPSHOT pom import diff --git a/sdk-platform-java-config/pom.xml b/sdk-platform-java-config/pom.xml index ca7f47f0b6..5139be537c 100644 --- a/sdk-platform-java-config/pom.xml +++ b/sdk-platform-java-config/pom.xml @@ -4,7 +4,7 @@ com.google.cloud sdk-platform-java-config pom - 3.30.0 + 3.30.1-SNAPSHOT SDK Platform For Java Configurations Shared build configuration for Google Cloud Java libraries. @@ -17,6 +17,6 @@ - 3.30.0 + 3.30.1-SNAPSHOT \ No newline at end of file diff --git a/showcase/pom.xml b/showcase/pom.xml index 853d26c9cf..32c5cfc469 100644 --- a/showcase/pom.xml +++ b/showcase/pom.xml @@ -34,7 +34,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.30.0 + 3.30.1-SNAPSHOT pom import diff --git a/versions.txt b/versions.txt index 71894be73a..143167c1ea 100644 --- a/versions.txt +++ b/versions.txt @@ -1,19 +1,19 @@ # Format: # module:released-version:current-version -gapic-generator-java:2.40.0:2.40.0 -api-common:2.31.0:2.31.0 -gax:2.48.0:2.48.0 -gax-grpc:2.48.0:2.48.0 -gax-httpjson:0.133.0:0.133.0 -proto-google-common-protos:2.39.0:2.39.0 -grpc-google-common-protos:2.39.0:2.39.0 -proto-google-iam-v1:1.34.0:1.34.0 -grpc-google-iam-v1:1.34.0:1.34.0 -proto-google-iam-v2beta:1.34.0:1.34.0 -grpc-google-iam-v2beta:1.34.0:1.34.0 -google-iam-policy:1.34.0:1.34.0 -proto-google-iam-v2:1.34.0:1.34.0 -grpc-google-iam-v2:1.34.0:1.34.0 -google-cloud-core:2.38.0:2.38.0 -google-cloud-shared-dependencies:3.30.0:3.30.0 +gapic-generator-java:2.40.0:2.40.1-SNAPSHOT +api-common:2.31.0:2.31.1-SNAPSHOT +gax:2.48.0:2.48.1-SNAPSHOT +gax-grpc:2.48.0:2.48.1-SNAPSHOT +gax-httpjson:0.133.0:0.133.1-SNAPSHOT +proto-google-common-protos:2.39.0:2.39.1-SNAPSHOT +grpc-google-common-protos:2.39.0:2.39.1-SNAPSHOT +proto-google-iam-v1:1.34.0:1.34.1-SNAPSHOT +grpc-google-iam-v1:1.34.0:1.34.1-SNAPSHOT +proto-google-iam-v2beta:1.34.0:1.34.1-SNAPSHOT +grpc-google-iam-v2beta:1.34.0:1.34.1-SNAPSHOT +google-iam-policy:1.34.0:1.34.1-SNAPSHOT +proto-google-iam-v2:1.34.0:1.34.1-SNAPSHOT +grpc-google-iam-v2:1.34.0:1.34.1-SNAPSHOT +google-cloud-core:2.38.0:2.38.1-SNAPSHOT +google-cloud-shared-dependencies:3.30.0:3.30.1-SNAPSHOT From 2e360ef0fce84db3bb94a601ed0aea9e79b14b30 Mon Sep 17 00:00:00 2001 From: Alice <65933803+alicejli@users.noreply.github.com> Date: Fri, 3 May 2024 09:59:46 -0400 Subject: [PATCH 16/18] chore: follow up fix to verify_library_generation (#2721) https://github.com/googleapis/sdk-platform-java/pull/2716 didn't quite fix what it should have. Follow up to fix the error: ``` Previous HEAD position was e54601fce Merge 30c7c5b4f9825c14458d6ef31e0b3e3fccbb4207 into 5d4567f883b1e29cd5f299d392c5a809b451aa18 Switched to a new branch 'main' branch 'main' set up to track 'origin/main'. + git fetch --no-tags --prune origin +main:refs/remotes/origin/main From https://github.com/googleapis/sdk-platform-java - [deleted] (none) -> origin/main + git checkout renovate/markupsafe-2.x error: pathspec 'renovate/markupsafe-2.x' did not match any file(s) known to git ``` --------- Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> --- .../workflows/verify_library_generation.yaml | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index 768325f9f5..89e1e69c60 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -16,13 +16,17 @@ jobs: shell: bash run: | set -ex - # Checkout a detached head, and then fetch the base ref to populate the detached head. - git checkout "${base_ref}" - git fetch --no-tags --prune origin +${base_ref}:refs/remotes/origin/${base_ref} - # Checkout a detached head, and then fetch the head ref to populate the detached head. - git checkout "${head_ref}" - git fetch --no-tags --prune origin +${head_ref}:refs/remotes/origin/${head_ref} - changed_directories="$(git diff --name-only ${base_ref} ${head_ref})" + # 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 @@ -31,6 +35,9 @@ jobs: 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 From 805baf87cfd70bb74b345cff93a6a6e02ade3dd7 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 3 May 2024 17:17:24 +0200 Subject: [PATCH 17/18] deps: update dependency markupsafe to v2.1.5 (#2657) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [MarkupSafe](https://palletsprojects.com/p/markupsafe/) ([changelog](https://markupsafe.palletsprojects.com/changes/)) | `==2.1.3` -> `==2.1.5` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/MarkupSafe/2.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/MarkupSafe/2.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/MarkupSafe/2.1.3/2.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/MarkupSafe/2.1.3/2.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/sdk-platform-java). --------- Co-authored-by: Alice <65933803+alicejli@users.noreply.github.com> --- library_generation/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library_generation/requirements.txt b/library_generation/requirements.txt index bd8fc35915..be42b1fea3 100644 --- a/library_generation/requirements.txt +++ b/library_generation/requirements.txt @@ -7,7 +7,7 @@ gitdb==4.0.11 GitPython==3.1.43 Jinja2==3.1.3 lxml==5.2.1 -MarkupSafe==2.1.3 +MarkupSafe==2.1.5 mypy-extensions==1.0.0 packaging==23.2 pathspec==0.12.1 From 1cbb681f3f395afee4be63cd6b96fefda7083d97 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 3 May 2024 18:02:47 +0200 Subject: [PATCH 18/18] deps: update dependency black to v24.4.2 (#2660) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [black](https://togithub.com/psf/black) ([changelog](https://togithub.com/psf/black/blob/main/CHANGES.md)) | `==24.3.0` -> `==24.4.2` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/black/24.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/black/24.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/black/24.3.0/24.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/black/24.3.0/24.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
psf/black (black) ### [`v24.4.2`](https://togithub.com/psf/black/blob/HEAD/CHANGES.md#2442) [Compare Source](https://togithub.com/psf/black/compare/24.4.1...24.4.2) This is a bugfix release to fix two regressions in the new f-string parser introduced in 24.4.1. ##### Parser - Fix regression where certain complex f-strings failed to parse ([#​4332](https://togithub.com/psf/black/issues/4332)) ##### Performance - Fix bad performance on certain complex string literals ([#​4331](https://togithub.com/psf/black/issues/4331)) ### [`v24.4.1`](https://togithub.com/psf/black/blob/HEAD/CHANGES.md#2441) [Compare Source](https://togithub.com/psf/black/compare/24.4.0...24.4.1) ##### Highlights - Add support for the new Python 3.12 f-string syntax introduced by PEP 701 ([#​3822](https://togithub.com/psf/black/issues/3822)) ##### Stable style - Fix crash involving indented dummy functions containing newlines ([#​4318](https://togithub.com/psf/black/issues/4318)) ##### Parser - Add support for type parameter defaults, a new syntactic feature added to Python 3.13 by PEP 696 ([#​4327](https://togithub.com/psf/black/issues/4327)) ##### Integrations - Github Action now works even when `git archive` is skipped ([#​4313](https://togithub.com/psf/black/issues/4313)) ### [`v24.4.0`](https://togithub.com/psf/black/blob/HEAD/CHANGES.md#2440) [Compare Source](https://togithub.com/psf/black/compare/24.3.0...24.4.0) ##### Stable style - Fix unwanted crashes caused by AST equivalency check ([#​4290](https://togithub.com/psf/black/issues/4290)) ##### Preview style - `if` guards in `case` blocks are now wrapped in parentheses when the line is too long. ([#​4269](https://togithub.com/psf/black/issues/4269)) - Stop moving multiline strings to a new line unless inside brackets ([#​4289](https://togithub.com/psf/black/issues/4289)) ##### Integrations - Add a new option `use_pyproject` to the GitHub Action `psf/black`. This will read the Black version from `pyproject.toml`. ([#​4294](https://togithub.com/psf/black/issues/4294))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/sdk-platform-java). Co-authored-by: Alice <65933803+alicejli@users.noreply.github.com> --- library_generation/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library_generation/requirements.txt b/library_generation/requirements.txt index be42b1fea3..7d4ccf5ffe 100644 --- a/library_generation/requirements.txt +++ b/library_generation/requirements.txt @@ -1,7 +1,7 @@ absl-py==2.1.0 attr==0.3.2 attrs==23.2.0 -black==24.3.0 +black==24.4.2 click==8.1.7 gitdb==4.0.11 GitPython==3.1.43