Skip to content

Commit

Permalink
Merge branch 'main' into count-with-aggregation-query
Browse files Browse the repository at this point in the history
  • Loading branch information
its-snorlax committed Apr 28, 2023
2 parents 2710d3e + 277f814 commit c69268f
Show file tree
Hide file tree
Showing 207 changed files with 1,028 additions and 546 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compatibilityCheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)"
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v2
- name: Read inputs
run: |
Expand Down
121 changes: 74 additions & 47 deletions .github/workflows/generateAutoConfigs.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,58 @@
name: Generate Spring Auto-Configurations
on:
pull_request:
workflow_dispatch:
inputs:
branch_name:
description: PR branch name
required: true
default: "renovate/main-gcp-libraries-bom.version"
forked_repo:
description: Fork name (enter none if repo branch)
required: true
default: "renovate-bot/GoogleCloudPlatform-_-spring-cloud-gcp"
pull_request:
types: [opened]
jobs:
generateLibraries:
# Run job if manually triggered, or on PR with matching branch condition
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'dependabot/maven/com.google.cloud-libraries-bom') && github.event.action == 'opened') }}
# Run this if workflow is manually triggered
# On initial opening of renovate or dependabot PR with matching branch condition,
# log information required for manually triggering workflow and exit with error to block PR
if: ${{ (github.event_name == 'workflow_dispatch') || startsWith(github.head_ref, 'renovate/main-gcp-libraries-bom.version') || startsWith(github.head_ref, 'dependabot/maven/com.google.cloud-libraries-bom') }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Get branch name
id: get_branch_name
- name: Get PR info
id: get_pr_info
continue-on-error: false
if: ${{ github.event_name == 'pull_request' }}
run: |
set -x
if ${{ github.event_name == 'pull_request' }}; then
echo "Branch name from PR event: $GITHUB_HEAD_REF"
echo "BRANCH_NAME=$GITHUB_HEAD_REF" >> $GITHUB_OUTPUT
else
echo "Branch name from manual trigger: $GITHUB_REF_NAME"
echo "BRANCH_NAME=$GITHUB_REF_NAME" >> $GITHUB_OUTPUT
fi
- name: Fail if not dependabot branch
echo "Please trigger update workflow manually. The following information may be helpful: "
echo "PR head repo full name: $HEAD_REPO_NAME"
echo "PR base repo full name: $BASE_REPO_NAME"
echo "PR branch name: $PR_BRANCH_NAME"
echo "Actor from PR event: $GITHUB_ACTOR"
exit 1
env:
HEAD_REPO_NAME: ${{ github.event.pull_request.head.repo.full_name }}
BASE_REPO_NAME: ${{ github.event.pull_request.base.repo.full_name }}
PR_BRANCH_NAME: ${{ github.head_ref }}
- name: Get libraries bom version
id: get_libraries_bom_version
continue-on-error: false
if: ${{ !startsWith(steps.get_branch_name.outputs.BRANCH_NAME, 'dependabot/maven/com.google.cloud-libraries-bom') }}
# Fetch updated pom file with the new libraries-bom version.
# This step differs slightly depending on whether the workflow is triggered for a forked repo.
run: |
echo "This workflow should only be triggered from a dependabot branch to update libraries-bom"
echo "Stopping workflow triggered from branch: ${{ steps.get_branch_name.outputs.BRANCH_NAME }}"
exit 1
set -x
sudo apt-get update
sudo apt-get install libxml2-utils
if [[ ${{ github.event.inputs.forked_repo }} != "none" ]]; then
git fetch https://github.com/${{ github.event.inputs.forked_repo }}.git ${{ github.event.inputs.branch_name }}
git checkout FETCH_HEAD -- spring-cloud-gcp-dependencies/pom.xml
else
git fetch origin ${{ github.event.inputs.branch_name }}
git checkout origin/${{ github.event.inputs.branch_name }} -- spring-cloud-gcp-dependencies/pom.xml
fi
echo "LIBRARIES_BOM_VERSION=$(xmllint --xpath "string(//*[local-name()='gcp-libraries-bom.version'])" spring-cloud-gcp-dependencies/pom.xml)" >> $GITHUB_OUTPUT
- name: Setup Java 17
uses: actions/setup-java@v1
with:
Expand All @@ -51,14 +76,19 @@ jobs:
set -x
bash reset-previews-folder.sh
- name: Generate library list
id: generate_library_list
continue-on-error: false
working-directory: spring-cloud-generator
run: |
set -x
set -e
sudo apt-get update
sudo apt-get install libxml2-utils
bash generate-library-list.sh
echo "Libraries BOM version: $LIBRARIES_BOM_VERSION"
MONOREPO_TAG=v$(bash compute-monorepo-tag.sh -v $LIBRARIES_BOM_VERSION)
echo "MONOREPO_COMMITISH=$MONOREPO_TAG" >> $GITHUB_OUTPUT
bash generate-library-list.sh -c $MONOREPO_TAG
cat library_list.txt
env:
LIBRARIES_BOM_VERSION: ${{ steps.get_libraries_bom_version.outputs.LIBRARIES_BOM_VERSION }}
- name: Compile non-autogen libraries
continue-on-error: false
run: |
Expand All @@ -76,7 +106,9 @@ jobs:
run: |
set -x
set -e
bash generate-all.sh
bash generate-all.sh -m $MONOREPO_COMMITISH
env:
MONOREPO_COMMITISH: ${{ steps.generate_library_list.outputs.MONOREPO_COMMITISH }}
- name: Check for generation errors
continue-on-error: false
working-directory: spring-cloud-generator
Expand All @@ -91,17 +123,6 @@ jobs:
cat failed-library-generations/$failed_lib_name
done
exit 1
- name: Check for compilation errors
continue-on-error: false
working-directory: spring-cloud-previews
run: |
../mvnw \
--batch-mode \
--show-version \
--threads 1.5C \
--define maven.test.skip=true \
--define maven.javadoc.skip=true \
install
#Compares the current contents of spring-cloud-previews with the new generated libraries
- name: Detect changes
id: detect_changes
Expand All @@ -122,27 +143,33 @@ jobs:
if: steps.detect_changes.outputs.CHANGED_FILES > 0
run: |
set -x
# stashes the changes from generated libs
git stash push -- spring-cloud-previews/
git reset --hard
git remote update
# pops the changes in branch
git checkout $BRANCH_NAME
git stash pop
git add ./spring-cloud-previews
# configure author
git config --global user.name "Cloud Java Bot"
git config --global user.email "[email protected]"
# commit
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git commit -m "chore: update starter modules in spring-cloud-previews"
git push --set-upstream origin $BRANCH_NAME
# push changes to branch
if [[ ${{ github.event.inputs.forked_repo }} != "none" ]]; then
git fetch https://github.com/${{ github.event.inputs.forked_repo }}.git ${{ github.event.inputs.branch_name }}
git checkout FETCH_HEAD
git stash pop
git add ./spring-cloud-previews
git commit -m "chore: update starter modules in spring-cloud-previews"
git push https://github.com/${{ github.event.inputs.forked_repo }}.git HEAD:${{ github.event.inputs.branch_name }}
else
git fetch origin ${{ github.event.inputs.branch_name }}
git checkout ${{ github.event.inputs.branch_name }}
git reset --hard
git stash pop
git add ./spring-cloud-previews
git commit -m "chore: update starter modules in spring-cloud-previews"
git push -u origin ${{ github.event.inputs.branch_name }}
fi
env:
BRANCH_NAME: ${{ steps.get_branch_name.outputs.BRANCH_NAME }}
GITHUB_ACTOR_EMAIL: ${{ steps.determine_workflow_author_email.outputs.GITHUB_ACTOR_EMAIL }}
GITHUB_ACTOR_NAME: ${{ steps.determine_workflow_author_email.outputs.GITHUB_ACTOR_NAME }}
GITHUB_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/integrationTests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)"
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v2
- name: Setup Java 17
uses: actions/setup-java@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linkageCheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)"
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)"
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unitTests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)"
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT

- uses: actions/checkout@v2

Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)"
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT

- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/updateDocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)"
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v2
- run: |
git config user.name github-actions
Expand Down
95 changes: 47 additions & 48 deletions .kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# pip-compile --allow-unsafe --generate-hashes requirements.in
#
cachetools==5.2.0 \
--hash=sha256:6a94c6402995a99c3970cc7e4884bb60b4a8639938157eeed436098bf9831757 \
--hash=sha256:f9f17d2aec496a9aa6b76f53e3b614c965223c061982d434d160f930c698a9db
cachetools==5.3.0 \
--hash=sha256:13dfddc7b8df938c21a940dfa6557ce6e94a2f1cdfa58eb90c805721d58f2c14 \
--hash=sha256:429e1a1e845c008ea6c85aa35d4b98b65d6a9763eeef3e37e92728a12d1de9d4
# via google-auth
certifi==2022.12.7 \
--hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \
Expand All @@ -24,19 +24,19 @@ colorlog==6.7.0 \
--hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \
--hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5
# via gcp-docuploader
gcp-docuploader==0.6.3 \
--hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \
--hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b
gcp-docuploader==0.6.5 \
--hash=sha256:30221d4ac3e5a2b9c69aa52fdbef68cc3f27d0e6d0d90e220fc024584b8d2318 \
--hash=sha256:b7458ef93f605b9d46a4bf3a8dc1755dad1f31d030c8679edf304e343b347eea
# via -r requirements.in
google-api-core==2.10.2 \
--hash=sha256:10c06f7739fe57781f87523375e8e1a3a4674bf6392cd6131a3222182b971320 \
--hash=sha256:34f24bd1d5f72a8c4519773d99ca6bf080a6c4e041b4e9f024fe230191dda62e
google-api-core==2.11.0 \
--hash=sha256:4b9bb5d5a380a0befa0573b302651b8a9a89262c1730e37bf423cec511804c22 \
--hash=sha256:ce222e27b0de0d7bc63eb043b956996d6dccab14cc3b690aaea91c9cc99dc16e
# via
# google-cloud-core
# google-cloud-storage
google-auth==2.14.1 \
--hash=sha256:ccaa901f31ad5cbb562615eb8b664b3dd0bf5404a67618e642307f00613eda4d \
--hash=sha256:f5d8701633bebc12e0deea4df8abd8aff31c28b355360597f7f2ee60f2e4d016
google-auth==2.17.3 \
--hash=sha256:ce311e2bc58b130fddf316df57c9b3943c2a7b4f6ec31de9663a9333e4064efc \
--hash=sha256:f586b274d3eb7bd932ea424b1c702a30e0393a2e2bc4ca3eae8263ffd8be229f
# via
# google-api-core
# google-cloud-core
Expand All @@ -45,9 +45,9 @@ google-cloud-core==2.3.2 \
--hash=sha256:8417acf6466be2fa85123441696c4badda48db314c607cf1e5d543fa8bdc22fe \
--hash=sha256:b9529ee7047fd8d4bf4a2182de619154240df17fbe60ead399078c1ae152af9a
# via google-cloud-storage
google-cloud-storage==2.6.0 \
--hash=sha256:104ca28ae61243b637f2f01455cc8a05e8f15a2a18ced96cb587241cdd3820f5 \
--hash=sha256:4ad0415ff61abdd8bb2ae81c1f8f7ec7d91a1011613f2db87c614c550f97bfe9
google-cloud-storage==2.8.0 \
--hash=sha256:248e210c13bc109909160248af546a91cb2dabaf3d7ebbf04def9dd49f02dbb6 \
--hash=sha256:4388da1ff5bda6d729f26dbcaf1bfa020a2a52a7b91f0a8123edbda51660802c
# via gcp-docuploader
google-crc32c==1.5.0 \
--hash=sha256:024894d9d3cfbc5943f8f230e23950cd4906b2fe004c72e29b209420a1e6b05a \
Expand Down Expand Up @@ -119,50 +119,49 @@ google-crc32c==1.5.0 \
--hash=sha256:fd8536e902db7e365f49e7d9029283403974ccf29b13fc7028b97e2295b33556 \
--hash=sha256:fe70e325aa68fa4b5edf7d1a4b6f691eb04bbccac0ace68e34820d283b5f80d4
# via google-resumable-media
google-resumable-media==2.4.0 \
--hash=sha256:2aa004c16d295c8f6c33b2b4788ba59d366677c0a25ae7382436cb30f776deaa \
--hash=sha256:8d5518502f92b9ecc84ac46779bd4f09694ecb3ba38a3e7ca737a86d15cbca1f
google-resumable-media==2.4.1 \
--hash=sha256:15b8a2e75df42dc6502d1306db0bce2647ba6013f9cd03b6e17368c0886ee90a \
--hash=sha256:831e86fd78d302c1a034730a0c6e5369dd11d37bad73fa69ca8998460d5bae8d
# via google-cloud-storage
googleapis-common-protos==1.56.4 \
--hash=sha256:8eb2cbc91b69feaf23e32452a7ae60e791e09967d81d4fcc7fc388182d1bd394 \
--hash=sha256:c25873c47279387cfdcbdafa36149887901d36202cb645a0e4f29686bf6e4417
googleapis-common-protos==1.59.0 \
--hash=sha256:4168fcb568a826a52f23510412da405abd93f4d23ba544bb68d943b14ba3cb44 \
--hash=sha256:b287dc48449d1d41af0c69f4ea26242b5ae4c3d7249a38b0984c86a4caffff1f
# via google-api-core
idna==3.4 \
--hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \
--hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2
# via requests
protobuf==4.21.9 \
--hash=sha256:2c9c2ed7466ad565f18668aa4731c535511c5d9a40c6da39524bccf43e441719 \
--hash=sha256:48e2cd6b88c6ed3d5877a3ea40df79d08374088e89bedc32557348848dff250b \
--hash=sha256:5b0834e61fb38f34ba8840d7dcb2e5a2f03de0c714e0293b3963b79db26de8ce \
--hash=sha256:61f21493d96d2a77f9ca84fefa105872550ab5ef71d21c458eb80edcf4885a99 \
--hash=sha256:6e0be9f09bf9b6cf497b27425487706fa48c6d1632ddd94dab1a5fe11a422392 \
--hash=sha256:6e312e280fbe3c74ea9e080d9e6080b636798b5e3939242298b591064470b06b \
--hash=sha256:7eb8f2cc41a34e9c956c256e3ac766cf4e1a4c9c925dc757a41a01be3e852965 \
--hash=sha256:84ea107016244dfc1eecae7684f7ce13c788b9a644cd3fca5b77871366556444 \
--hash=sha256:9227c14010acd9ae7702d6467b4625b6fe853175a6b150e539b21d2b2f2b409c \
--hash=sha256:a419cc95fca8694804709b8c4f2326266d29659b126a93befe210f5bbc772536 \
--hash=sha256:a7d0ea43949d45b836234f4ebb5ba0b22e7432d065394b532cdca8f98415e3cf \
--hash=sha256:b5ab0b8918c136345ff045d4b3d5f719b505b7c8af45092d7f45e304f55e50a1 \
--hash=sha256:e575c57dc8b5b2b2caa436c16d44ef6981f2235eb7179bfc847557886376d740 \
--hash=sha256:f9eae277dd240ae19bb06ff4e2346e771252b0e619421965504bd1b1bba7c5fa
protobuf==4.22.3 \
--hash=sha256:13233ee2b9d3bd9a5f216c1fa2c321cd564b93d8f2e4f521a85b585447747997 \
--hash=sha256:23452f2fdea754a8251d0fc88c0317735ae47217e0d27bf330a30eec2848811a \
--hash=sha256:52f0a78141078077cfe15fe333ac3e3a077420b9a3f5d1bf9b5fe9d286b4d881 \
--hash=sha256:70659847ee57a5262a65954538088a1d72dfc3e9882695cab9f0c54ffe71663b \
--hash=sha256:7760730063329d42a9d4c4573b804289b738d4931e363ffbe684716b796bde51 \
--hash=sha256:7cf56e31907c532e460bb62010a513408e6cdf5b03fb2611e4b67ed398ad046d \
--hash=sha256:8b54f56d13ae4a3ec140076c9d937221f887c8f64954673d46f63751209e839a \
--hash=sha256:d14fc1a41d1a1909998e8aff7e80d2a7ae14772c4a70e4bf7db8a36690b54425 \
--hash=sha256:d4b66266965598ff4c291416be429cef7989d8fae88b55b62095a2331511b3fa \
--hash=sha256:e0e630d8e6a79f48c557cd1835865b593d0547dce221c66ed1b827de59c66c97 \
--hash=sha256:ecae944c6c2ce50dda6bf76ef5496196aeb1b85acb95df5843cd812615ec4b61 \
--hash=sha256:f08aa300b67f1c012100d8eb62d47129e53d1150f4469fd78a29fa3cb68c66f2 \
--hash=sha256:f2f4710543abec186aee332d6852ef5ae7ce2e9e807a3da570f36de5a732d88e
# via
# gcp-docuploader
# google-api-core
# googleapis-common-protos
pyasn1==0.4.8 \
--hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \
--hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba
pyasn1==0.5.0 \
--hash=sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57 \
--hash=sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde
# via
# pyasn1-modules
# rsa
pyasn1-modules==0.2.8 \
--hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \
--hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74
pyasn1-modules==0.3.0 \
--hash=sha256:5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c \
--hash=sha256:d3ccd6ed470d9ffbc716be08bd90efbd44d0734bc9303818f7336070984a162d
# via google-auth
requests==2.28.1 \
--hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 \
--hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349
requests==2.28.2 \
--hash=sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa \
--hash=sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf
# via
# google-api-core
# google-cloud-storage
Expand All @@ -176,7 +175,7 @@ six==1.16.0 \
# via
# gcp-docuploader
# google-auth
urllib3==1.26.12 \
--hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \
--hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997
urllib3==1.26.15 \
--hash=sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305 \
--hash=sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42
# via requests
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip
Loading

0 comments on commit c69268f

Please sign in to comment.