Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max in use session fix #3569

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8ad2163
feat: Add Metrics host for built in metrics
surbhigarg92 Nov 29, 2024
f434c1d
changed the host env variable
surbhigarg92 Dec 5, 2024
7b06791
Merge branch 'main' into metrics_endpoint
surbhigarg92 Dec 5, 2024
aca9d30
conflict fix
surbhigarg92 Dec 5, 2024
ac1ddbc
clirr check
surbhigarg92 Dec 5, 2024
d61b4f3
fix: max_in_use_session metric time
surbhigarg92 Dec 26, 2024
95d51db
feat: introduce java.time variables and methods (#3495)
diegomarquezp Dec 5, 2024
d542ae1
chore(spanner): support multiplexed session for rw transactions in ex…
harshachinta Dec 6, 2024
02e8b2f
chore: remove unused code and fix some warnings (#3533)
olavloite Dec 8, 2024
e1476e0
feat(spanner): support multiplexed session for Partitioned operations…
pratickchokhani Dec 9, 2024
7cd4182
test: enable more tests on the Emulator (#3535)
olavloite Dec 9, 2024
a625051
ci(spanner): Fix nightly job issues (#3522)
sakthivelmanii Dec 10, 2024
59ffb04
chore: add internal option for statement executor type (#3534)
olavloite Dec 10, 2024
8cce15c
feat: support 'set local' for retry_aborts_internally (#3532)
olavloite Dec 10, 2024
874d0fd
feat: add opt-in for using multiplexed sessions for blind writes (#3540)
pratickchokhani Dec 11, 2024
6bdb26d
ci(spanner): clean up unused kokoro configurations (#3542)
sakthivelmanii Dec 11, 2024
9f64043
test(spanner): Enabled multiplexed session for partitioned operations…
pratickchokhani Dec 13, 2024
0b588de
chore(main): release 6.82.1-SNAPSHOT (#3526)
release-please[bot] Dec 13, 2024
cbd050f
deps: update sdk platform java dependencies (#3549)
renovate-bot Dec 13, 2024
3662b56
chore: reset default to platform thread (#3551)
olavloite Dec 13, 2024
28ff171
chore: Update generation configuration at Fri Dec 13 16:21:35 UTC 202…
cloud-java-bot Dec 13, 2024
62a7151
chore(main): release 6.83.0 (#3547)
release-please[bot] Dec 13, 2024
42e8276
chore: make state field volatile in AsyncResultSetImpl (#3550)
olavloite Dec 13, 2024
08e120c
chore: make valid connection properties public (#3546)
olavloite Dec 13, 2024
9b480a7
deps: update opentelemetry.version to v1.45.0 (#3531)
renovate-bot Dec 14, 2024
8a022f9
chore(main): release 6.83.1-SNAPSHOT (#3554)
release-please[bot] Dec 14, 2024
3e9c82c
feat(spanner): add jdbc support for external hosts (#3536)
sagnghos Dec 16, 2024
178ad02
ci(spanner): improve performance of samples tests (#3558)
sakthivelmanii Dec 16, 2024
a3a69e7
test: unflake RetryOnInvalidatedSessionTest (#3561)
olavloite Dec 16, 2024
d4510cd
ci(spanner): Create a new Sample Slow tests (#3560)
sakthivelmanii Dec 17, 2024
ef2a098
chore: Update generation configuration at Sat Dec 14 02:27:24 UTC 202…
cloud-java-bot Dec 18, 2024
92c7276
test: enable write tests for PostgreSQL (#3529)
olavloite Dec 18, 2024
03c383d
chore: include session min/max in error message (#3566)
olavloite Dec 18, 2024
9a3d2ed
fix: retry specific internal errors (#3565)
olavloite Dec 18, 2024
0d1b8f7
chore: disable native metrics when there are no credentials (#3567)
olavloite Dec 18, 2024
8862a68
feat: add support for ARRAY<STRUCT> to CloudCilentExecutor (#3544)
larkee Dec 18, 2024
9506b0b
chore: Update generation configuration at Wed Dec 18 05:50:09 UTC 202…
cloud-java-bot Dec 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 55 additions & 8 deletions .github/scripts/update_generation_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,23 @@ function update_config() {
sed -i -e "s/^${key_word}.*$/${key_word}: ${new_value}/" "${file}"
}

# Update an action to a new version in GitHub action.
function update_action() {
local key_word=$1
local new_value=$2
local file=$3
echo "Update ${key_word} to ${new_value} in ${file}"
# use a different delimiter because the key_word contains "/".
sed -i -e "s|${key_word}@v.*$|${key_word}@v${new_value}|" "${file}"
}

# The parameters of this script is:
# 1. base_branch, the base branch of the result pull request.
# 2. repo, organization/repo-name, e.g., googleapis/google-cloud-java
# 3. [optional] generation_config, the path to the generation configuration,
# the default value is generation_config.yaml in the repository root.
# 4. [optional] workflow, the library generation workflow file,
# the default value is .github/workflows/hermetic_library_generation.yaml.
while [[ $# -gt 0 ]]; do
key="$1"
case "${key}" in
Expand All @@ -48,6 +60,10 @@ case "${key}" in
generation_config="$2"
shift
;;
--workflow)
workflow="$2"
shift
;;
*)
echo "Invalid option: [$1]"
exit 1
Expand All @@ -71,21 +87,34 @@ if [ -z "${generation_config}" ]; then
echo "Use default generation config: ${generation_config}"
fi

if [ -z "${workflow}" ]; then
workflow=".github/workflows/hermetic_library_generation.yaml"
echo "Use default library generation workflow file: ${workflow}"
fi

current_branch="generate-libraries-${base_branch}"
title="chore: Update generation configuration at $(date)"

# try to find a open pull request associated with the branch
git checkout "${base_branch}"
# Try to find a open pull request associated with the branch
pr_num=$(gh pr list -s open -H "${current_branch}" -q . --json number | jq ".[] | .number")
# create a branch if there's no open pull request associated with the
# Create a branch if there's no open pull request associated with the
# branch; otherwise checkout the pull request.
if [ -z "${pr_num}" ]; then
git checkout -b "${current_branch}"
# Push the current branch to remote so that we can
# compare the commits later.
git push -u origin "${current_branch}"
else
gh pr checkout "${pr_num}"
fi

# Only allow fast-forward merging; exit with non-zero result if there's merging
# conflict.
git merge -m "chore: merge ${base_branch} into ${current_branch}" "${base_branch}"

mkdir tmp-googleapis
# use partial clone because only commit history is needed.
# Use partial clone because only commit history is needed.
git clone --filter=blob:none https://github.com/googleapis/googleapis.git tmp-googleapis
pushd tmp-googleapis
git pull
Expand All @@ -94,25 +123,43 @@ popd
rm -rf tmp-googleapis
update_config "googleapis_commitish" "${latest_commit}" "${generation_config}"

# update gapic-generator-java version to the latest
# Update gapic-generator-java version to the latest
latest_version=$(get_latest_released_version "com.google.api" "gapic-generator-java")
update_config "gapic_generator_version" "${latest_version}" "${generation_config}"

# update libraries-bom version to the latest
# Update composite action version to latest gapic-generator-java version
update_action "googleapis/sdk-platform-java/.github/scripts" \
"${latest_version}" \
"${workflow}"

# Update libraries-bom version to the latest
latest_version=$(get_latest_released_version "com.google.cloud" "libraries-bom")
update_config "libraries_bom_version" "${latest_version}" "${generation_config}"

git add "${generation_config}"
git add "${generation_config}" "${workflow}"
changed_files=$(git diff --cached --name-only)
if [[ "${changed_files}" == "" ]]; then
echo "The latest generation config is not changed."
echo "Skip committing to the pull request."
else
git commit -m "${title}"
fi

# There are potentially at most two commits: merge commit and change commit.
# We want to exit the script if no commit happens (otherwise this will be an
# infinite loop).
# `git cherry` is a way to find whether the local branch has commits that are
# not in the remote branch.
# If we find any such commit, push them to remote branch.
unpushed_commit=$(git cherry -v "origin/${current_branch}" | wc -l)
if [[ "${unpushed_commit}" -eq 0 ]]; then
echo "No unpushed commits, exit"
exit 0
fi
git commit -m "${title}"

if [ -z "${pr_num}" ]; then
git remote add remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${repo}.git"
git fetch -q --unshallow remote_repo
git fetch -q remote_repo
git push -f remote_repo "${current_branch}"
gh pr create --title "${title}" --head "${current_branch}" --body "${title}" --base "${base_branch}"
else
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
env:
JOB_TYPE: test
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS: true
units-java8:
# Building using Java 17 and run the tests with Java 8 runtime
name: "units (8)"
Expand Down Expand Up @@ -92,6 +93,7 @@ jobs:
env:
JOB_TYPE: test
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS: true
windows:
runs-on: windows-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hermetic_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- uses: googleapis/sdk-platform-java/.github/scripts@v2.50.0
- uses: googleapis/sdk-platform-java/.github/scripts@v2.51.0
if: env.SHOULD_RUN == 'true'
with:
base_ref: ${{ github.base_ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unmanaged_dependency_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
# repository
.kokoro/build.sh
- name: Unmanaged dependency check
uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.40.0
uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.41.0
with:
bom-path: google-cloud-spanner-bom/pom.xml
8 changes: 7 additions & 1 deletion .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,17 @@ slowtests)
verify
RETURN_CODE=$?
;;
samples)
samples|samples-slow-tests)
SAMPLES_DIR=samples
PROFILES=''
# only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise.
if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]]
then
SAMPLES_DIR=samples/snapshot
elif [[ ${JOB_TYPE} = 'samples-slow-tests' ]]
then
SAMPLES_DIR=samples/snippets
PROFILES='-Pslow-tests,!integration-tests'
fi

if [[ -f ${SAMPLES_DIR}/pom.xml ]]
Expand All @@ -227,6 +232,7 @@ samples)
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
${PROFILES} \
-fae \
verify
RETURN_CODE=$?
Expand Down
12 changes: 0 additions & 12 deletions .kokoro/continuous/java8.cfg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env_vars: {

env_vars: {
key: "JOB_TYPE"
value: "samples"
value: "samples-slow-tests"
}

# TODO: remove this after we've migrated all tests and scripts
Expand All @@ -32,3 +32,8 @@ env_vars: {
value: "java-it-service-account"
}

env_vars: {
key: "ENABLE_BUILD_COP"
value: "true"
}

7 changes: 0 additions & 7 deletions .kokoro/nightly/java7.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions .kokoro/nightly/java8-win.cfg

This file was deleted.

13 changes: 0 additions & 13 deletions .kokoro/presubmit/clirr.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native-17.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.40.0"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.41.0"
}

env_vars: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.40.0"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.41.0"
}

env_vars: {
Expand Down
22 changes: 0 additions & 22 deletions .kokoro/presubmit/integration-cloud-devel.cfg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ env_vars: {
key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS"
value: "true"
}

env_vars: {
key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS"
value: "true"
}
7 changes: 0 additions & 7 deletions .kokoro/presubmit/java11.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions .kokoro/presubmit/java7.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions .kokoro/presubmit/java8-osx.cfg

This file was deleted.

34 changes: 0 additions & 34 deletions .kokoro/presubmit/java8-samples.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions .kokoro/presubmit/java8-win.cfg

This file was deleted.

12 changes: 0 additions & 12 deletions .kokoro/presubmit/java8.cfg

This file was deleted.

12 changes: 0 additions & 12 deletions .kokoro/presubmit/linkage-monitor.cfg

This file was deleted.

13 changes: 0 additions & 13 deletions .kokoro/presubmit/lint.cfg

This file was deleted.

Loading
Loading