Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit d69f217

Browse files
committed
Merge branch 'master' of github.com:thiagotnunes/java-spanner into adds-query-optimizer-statistics-support
2 parents 5c055a4 + 8a23ad0 commit d69f217

500 files changed

Lines changed: 65122 additions & 22885 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
# For syntax help see:
55
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
66

7+
# The @googleapis/api-spanner-java is the default owner for changes in this repo
8+
* @googleapis/yoshi-java @googleapis/api-spanner-java
9+
**/*.java @googleapis/api-spanner-java
10+
711
# The java-samples-reviewers team is the default owner for samples changes
8-
samples/**/*.java @googleapis/java-samples-reviewers
12+
samples/**/*.java @googleapis/java-samples-reviewers @googleapis/api-spanner-java

.github/blunderbuss.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Configuration for the Blunderbuss GitHub app. For more info see
2+
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
3+
assign_issues:
4+
- thiagotnunes
5+
assign_prs_by:
6+
- labels:
7+
- samples
8+
to:
9+
- googleapis/java-samples-reviewers

.github/generated-files-bot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
externalManifests:
2+
- type: json
3+
file: 'synth.metadata'
4+
jsonpath: '$.generatedFiles[*]'
5+
- type: json
6+
file: '.github/readme/synth.metadata/synth.metadata'
7+
jsonpath: '$.generatedFiles[*]'
8+
ignoreAuthors:
9+
- 'renovate-bot'
10+
- 'yoshi-automation'
11+
- 'release-please[bot]'
12+
- 'gcf-owl-bot[bot]'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"sources": [
3+
{
4+
"git": {
5+
"name": ".",
6+
"remote": "https://github.com/googleapis/java-spanner.git",
7+
"sha": "934e07ae5652b4d8860273116ea28798033c1ac9"
8+
}
9+
},
10+
{
11+
"git": {
12+
"name": "synthtool",
13+
"remote": "https://github.com/googleapis/synthtool.git",
14+
"sha": "a2de127f90799cd5bace653b1dcc5dd2ca8b19c9"
15+
}
16+
}
17+
]
18+
}

.github/readme/synth.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2020 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated the README for this library."""
16+
17+
from synthtool.languages import java
18+
19+
java.custom_templates(["java_library/README.md"])

.github/release-please.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
11
releaseType: java-yoshi
2-
bumpMinorPreMajor: true
2+
bumpMinorPreMajor: true
3+
branches:
4+
- branch: 3.1.x
5+
releaseType: java-yoshi
6+
bumpMinorPreMajor: true
7+
- branch: 3.3.x
8+
releaseType: java-yoshi
9+
bumpMinorPreMajor: true
10+
- branch: 4.0.x
11+
releaseType: java-yoshi
12+
bumpMinorPreMajor: true
13+
- branch: 5.2.x
14+
releaseType: java-yoshi
15+
bumpMinorPreMajor: true
16+
- releaseType: java-lts
17+
bumpMinorPreMajor: true
18+
branch: 3.3.3-sp

.github/snippet-bot.yml

Whitespace-only changes.

.github/sync-repo-settings.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
rebaseMergeAllowed: false
2+
squashMergeAllowed: true
3+
mergeCommitAllowed: false
4+
branchProtectionRules:
5+
- pattern: master
6+
isAdminEnforced: true
7+
requiredApprovingReviewCount: 1
8+
requiresCodeOwnerReviews: true
9+
requiresStrictStatusChecks: false
10+
requiredStatusCheckContexts:
11+
- dependencies (8)
12+
- dependencies (11)
13+
- linkage-monitor
14+
- lint
15+
- clirr
16+
- units (8)
17+
- units (11)
18+
- 'Kokoro - Test: Integration'
19+
- cla/google
20+
- pattern: 3.1.x
21+
isAdminEnforced: true
22+
requiredApprovingReviewCount: 1
23+
requiresCodeOwnerReviews: true
24+
requiresStrictStatusChecks: false
25+
requiredStatusCheckContexts:
26+
- dependencies (8)
27+
- dependencies (11)
28+
- lint
29+
- units (7)
30+
- units (8)
31+
- units (11)
32+
- 'Kokoro - Test: Integration'
33+
- cla/google
34+
- pattern: 3.3.x
35+
isAdminEnforced: true
36+
requiredApprovingReviewCount: 1
37+
requiresCodeOwnerReviews: true
38+
requiresStrictStatusChecks: false
39+
requiredStatusCheckContexts:
40+
- dependencies (8)
41+
- dependencies (11)
42+
- lint
43+
- units (7)
44+
- units (8)
45+
- units (11)
46+
- 'Kokoro - Test: Integration'
47+
- cla/google
48+
- pattern: 4.0.x
49+
isAdminEnforced: true
50+
requiredApprovingReviewCount: 1
51+
requiresCodeOwnerReviews: true
52+
requiresStrictStatusChecks: false
53+
requiredStatusCheckContexts:
54+
- dependencies (8)
55+
- dependencies (11)
56+
- lint
57+
- units (7)
58+
- units (8)
59+
- units (11)
60+
- 'Kokoro - Test: Integration'
61+
- cla/google
62+
- pattern: 5.2.x
63+
isAdminEnforced: true
64+
requiredApprovingReviewCount: 1
65+
requiresCodeOwnerReviews: true
66+
requiresStrictStatusChecks: false
67+
requiredStatusCheckContexts:
68+
- dependencies (8)
69+
- dependencies (11)
70+
- lint
71+
- units (7)
72+
- units (8)
73+
- units (11)
74+
- 'Kokoro - Test: Integration'
75+
- cla/google
76+
- pattern: 3.3.3-sp
77+
isAdminEnforced: true
78+
requiredApprovingReviewCount: 1
79+
requiresCodeOwnerReviews: true
80+
requiresStrictStatusChecks: false
81+
requiredStatusCheckContexts:
82+
- dependencies (8)
83+
- dependencies (11)
84+
- lint
85+
- units (8)
86+
- units (11)
87+
- 'Kokoro - Test: Integration'
88+
- cla/google
89+
permissionRules:
90+
- team: yoshi-admins
91+
permission: admin
92+
- team: yoshi-java-admins
93+
permission: admin
94+
- team: yoshi-java
95+
permission: push
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
pull_request:
3+
name: auto-merge-readme
4+
jobs:
5+
approve:
6+
runs-on: ubuntu-latest
7+
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
8+
steps:
9+
- uses: actions/github-script@v3
10+
with:
11+
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
12+
script: |
13+
// only approve PRs from yoshi-automation
14+
if (context.payload.pull_request.user.login !== "yoshi-automation") {
15+
return;
16+
}
17+
18+
// only approve PRs like "chore: release <release version>"
19+
if (!context.payload.pull_request.title === "chore: regenerate README") {
20+
return;
21+
}
22+
23+
// only approve PRs with README.md and synth.metadata changes
24+
const files = new Set(
25+
(
26+
await github.paginate(
27+
github.pulls.listFiles.endpoint({
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
pull_number: context.payload.pull_request.number,
31+
})
32+
)
33+
).map(file => file.filename)
34+
);
35+
if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) {
36+
return;
37+
}
38+
39+
// approve README regeneration PR
40+
await github.pulls.createReview({
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
body: 'Rubber stamped PR!',
44+
pull_number: context.payload.pull_request.number,
45+
event: 'APPROVE'
46+
});
47+
48+
// attach automerge label
49+
await github.issues.addLabels({
50+
owner: context.repo.owner,
51+
repo: context.repo.repo,
52+
issue_number: context.payload.pull_request.number,
53+
labels: ['automerge']
54+
});
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
on:
2+
pull_request:
3+
name: auto-release
4+
jobs:
5+
approve:
6+
runs-on: ubuntu-latest
7+
if: contains(github.head_ref, 'release-please')
8+
steps:
9+
- uses: actions/github-script@v3
10+
with:
11+
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
12+
debug: true
13+
script: |
14+
// only approve PRs from release-please[bot]
15+
if (context.payload.pull_request.user.login !== "release-please[bot]") {
16+
return;
17+
}
18+
19+
// only approve PRs like "chore: release <release version>"
20+
if ( !context.payload.pull_request.title.startsWith("chore: release") ) {
21+
return;
22+
}
23+
24+
// only approve PRs with pom.xml and versions.txt changes
25+
const filesPromise = github.pulls.listFiles.endpoint({
26+
owner: context.repo.owner,
27+
repo: context.repo.repo,
28+
pull_number: context.payload.pull_request.number,
29+
});
30+
const changed_files = await github.paginate(filesPromise)
31+
32+
if ( changed_files.length < 1 ) {
33+
console.log( "Not proceeding since PR is empty!" )
34+
return;
35+
}
36+
37+
if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) {
38+
console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" )
39+
return;
40+
}
41+
42+
// trigger auto-release when
43+
// 1) it is a SNAPSHOT release (auto-generated post regular release)
44+
// 2) there are dependency updates only
45+
// 3) there are no open dependency update PRs in this repo (to avoid multiple releases)
46+
if (
47+
context.payload.pull_request.body.includes("Fix") ||
48+
context.payload.pull_request.body.includes("Build") ||
49+
context.payload.pull_request.body.includes("Documentation") ||
50+
context.payload.pull_request.body.includes("BREAKING CHANGES") ||
51+
context.payload.pull_request.body.includes("Features")
52+
) {
53+
console.log( "Not auto-releasing since it is not a dependency-update-only release." );
54+
return;
55+
}
56+
57+
const promise = github.pulls.list.endpoint({
58+
owner: context.repo.owner,
59+
repo: context.repo.repo,
60+
state: 'open'
61+
});
62+
const open_pulls = await github.paginate(promise)
63+
64+
if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) {
65+
for ( const pull of open_pulls ) {
66+
if ( pull.title.startsWith("deps: update dependency") ) {
67+
console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." );
68+
return;
69+
}
70+
}
71+
}
72+
73+
// approve release PR
74+
await github.pulls.createReview({
75+
owner: context.repo.owner,
76+
repo: context.repo.repo,
77+
body: 'Rubber stamped release!',
78+
pull_number: context.payload.pull_request.number,
79+
event: 'APPROVE'
80+
});
81+
82+
// attach kokoro:force-run and automerge labels
83+
await github.issues.addLabels({
84+
owner: context.repo.owner,
85+
repo: context.repo.repo,
86+
issue_number: context.payload.pull_request.number,
87+
labels: ['kokoro:force-run', 'automerge']
88+
});

0 commit comments

Comments
 (0)