Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
6a76569
chore: add monorepo migration script
meltsufin Dec 22, 2025
a334f91
chore: fix path
meltsufin Dec 22, 2025
01c4873
chore: refine migration script for atomic commits and isolation
meltsufin Dec 22, 2025
58d624c
chore: remove pom.xml update logic from migration script
meltsufin Dec 23, 2025
28ef2e6
chore: implement GitHub Actions workflow migration using paths-filter
meltsufin Dec 23, 2025
547682f
chore: skip redundant workflows and update generation_config.yaml
meltsufin Dec 23, 2025
5a392d2
chore: expand workflow skip list to include samples, release, and more
meltsufin Dec 23, 2025
2a82e1b
chore: make workflow transformation logic a permanent script and rena…
meltsufin Dec 23, 2025
9d1a84d
chore: refine versions.txt consolidation to only append data lines
meltsufin Dec 23, 2025
de5c2ac
chore: remove clirr job from workflow transformation
meltsufin Dec 23, 2025
117fa72
chore: add copyright header fix to migration script
meltsufin Dec 23, 2025
ba35c2d
impl: automate reporting removal, build verification, and dynamic par…
meltsufin Dec 24, 2025
fe58cf0
feat: add CLI binary checks to migrate.sh
chingor13 Jan 5, 2026
0716192
chore: allow setting SOURCE_REPO_URL via environment variable in migr…
chingor13 Jan 6, 2026
4466797
feat: add guard for checking if the repository is already migrated
chingor13 Jan 6, 2026
2b5c55f
feat: add environment variable for specifying codeowner team to migrate
chingor13 Jan 6, 2026
5d0edb6
feat: insert new module in root pom.xml
chingor13 Jan 7, 2026
76997bf
chore: exclude common files from source root in migration script
chingor13 Jan 7, 2026
257de3d
refactor: extract inline python to a .py file
chingor13 Jan 8, 2026
621bd15
chore: add license headers
chingor13 Jan 8, 2026
7fd59a7
fix: use 2026 when fixing copyright headers
chingor13 Jan 8, 2026
b92406c
refactor: extract fix copyright inline python into .py file
chingor13 Jan 8, 2026
f9e0ce5
feat: update urls in the migrated pom.xml
chingor13 Jan 8, 2026
81dae14
fix: preserve explicilty declared versions in pom.xml
chingor13 Jan 8, 2026
0ae9c9f
fix: also preserve explicit google-cloud-x dependency versions
chingor13 Jan 8, 2026
0fabe7a
feat: prompt for CODEOWNERS value
chingor13 Jan 8, 2026
09dba8b
feat: prompt for SOURCE_REPO_URL value
chingor13 Jan 8, 2026
35f40a5
feat: merge generator config yaml
chingor13 Jan 12, 2026
e4a396e
chore: read root CODEOWNER entry from source
chingor13 Jan 14, 2026
8287f15
migrate .OwlBot-hermetic.yaml
chingor13 Jan 14, 2026
431b565
migrate existing owlbot.py file and replace the template excludes
chingor13 Jan 15, 2026
5213a30
skip .kokoro folder
chingor13 Jan 15, 2026
8f7b7a8
remove more unnecessary files
chingor13 Jan 15, 2026
cd132d7
remove only kokoro configs and clean up generation config
chingor13 Jan 15, 2026
65ec0fd
disable java17 profile for split repo's java8 test
chingor13 Jan 15, 2026
c606a1c
add git config for longpaths on windows build
chingor13 Jan 16, 2026
ce70a56
fix working directory for longpaths
chingor13 Jan 16, 2026
41aea78
allow running root ci scripts in BUILD_SUBDIR
chingor13 Jan 16, 2026
5af6bee
modernize the bom pom.xml
chingor13 Jan 16, 2026
bfb1fc9
allow specifying target branch
chingor13 Jan 21, 2026
b5db9dd
fix s.move
chingor13 Jan 21, 2026
1e7d833
use BUILD_SUBDIR env variable
chingor13 Jan 21, 2026
b922938
skip kokoro files
chingor13 Jan 21, 2026
1222239
fix windows build file
chingor13 Jan 21, 2026
776336b
optionally squash commits
chingor13 Jan 22, 2026
b05691a
fix CODEOWNERS detection
chingor13 Jan 23, 2026
62423ad
fix owlbot template excludes
chingor13 Jan 23, 2026
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
15 changes: 14 additions & 1 deletion .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ if [ -f "${KOKORO_GFILE_DIR}/secret_manager/java-bigqueryconnection-samples-secr
source "${KOKORO_GFILE_DIR}/secret_manager/java-bigqueryconnection-samples-secrets"
fi

if [[ -n "${BUILD_SUBDIR}" ]]
then
echo "Running in subdir: ${BUILD_SUBDIR}"
pushd "${BUILD_SUBDIR}"
fi

RETURN_CODE=0

case ${JOB_TYPE} in
test)
echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}"
retry_with_backoff 3 10 \
mvn test \
-B -ntp \
Expand All @@ -48,7 +55,7 @@ case ${JOB_TYPE} in
-Dflatten.skip=true \
-Danimal.sniffer.skip=true \
-Dmaven.wagon.http.retryHandler.count=5 \
-T 1C
-T 1C ${SUREFIRE_JVM_OPT}
RETURN_CODE=$?
echo "Finished running unit tests"
;;
Expand Down Expand Up @@ -125,6 +132,12 @@ case ${JOB_TYPE} in

esac

if [[ -n "${BUILD_SUBDIR}" ]]
then
echo "restoring directory"
popd
fi

if [ "${REPORT_COVERAGE}" == "true" ]; then
bash ${KOKORO_GFILE_DIR}/codecov.sh
fi
Expand Down
12 changes: 12 additions & 0 deletions .kokoro/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ function determineMavenOpts() {

export MAVEN_OPTS=$(determineMavenOpts)

if [[ -n "${BUILD_SUBDIR}" ]]
then
echo "Running in subdir: ${BUILD_SUBDIR}"
pushd "${BUILD_SUBDIR}"
fi

# this should run maven enforcer
retry_with_backoff 3 10 \
mvn install -B -V -ntp \
Expand All @@ -57,3 +63,9 @@ retry_with_backoff 3 10 \
-Dclirr.skip=true

mvn -B dependency:analyze -DfailOnWarning=true

if [[ -n "${BUILD_SUBDIR}" ]]
then
echo "Leaving subdir: ${BUILD_SUBDIR}"
popd
fi
4 changes: 4 additions & 0 deletions generation/check_non_release_please_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ for pomFile in $(find . -mindepth 2 -name pom.xml | sort ); do
echo "Skipping version check for java-samples directory"
continue
fi
if [[ "${pomFile}" =~ .*/samples/.* ]]; then
echo "Skipping version check for samples directory"
continue
fi

if grep -n '<version>.*</version>' "$pomFile" | grep -v 'x-version-update'; then
echo "Found version declaration(s) without x-version-update in: $pomFile"
Expand Down
53 changes: 53 additions & 0 deletions monorepo-migration/fix_copyright_headers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env python3
# Copyright 2026 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
#
# http://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.

import os
import re
import sys

def fix_copyright(path):
if os.path.isfile(path):
if path.endswith(".java"):
_fix_file(path)
elif os.path.isdir(path):
for root, _, files in os.walk(path):
for file in files:
if file.endswith(".java"):
_fix_file(os.path.join(root, file))

def _fix_file(file_path):
with open(file_path, 'r') as f:
content = f.read()

# Replace "Copyright [Year] Google LLC" or "Copyright [Year] Google Inc."
# with "Copyright 2026 Google LLC"
new_content = re.sub(
r'Copyright \d{4} Google (Inc\.|LLC)',
'Copyright 2026 Google LLC',
content
)

if new_content != content:
with open(file_path, 'w') as f:
f.write(new_content)
print(f"Updated copyright in {file_path}")

if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: fix_copyright_headers.py <file_or_directory_path> ...")
sys.exit(1)

for arg in sys.argv[1:]:
fix_copyright(arg)
Loading
Loading