Skip to content

Commit d2a5460

Browse files
authored
Merge branch 'main' into toys-gen-pkill
2 parents f0c94f0 + 354c6de commit d2a5460

File tree

367 files changed

+6790
-3178
lines changed

Some content is hidden

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

367 files changed

+6790
-3178
lines changed

.kokoro/populate-secrets.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ function msg { println "$*" >&2 ;}
2424
function println { printf '%s\n' "$(now) $*" ;}
2525

2626
# Populates requested secrets set in SECRET_MANAGER_KEYS
27+
if [[ -z "${SECRET_MANAGER_PROJECT_ID-}" ]]; then
28+
msg "SECRET_MANAGER_PROJECT_ID is not set in environment variables, using default"
29+
SECRET_MANAGER_PROJECT_ID="cloud-devrel-kokoro-resources"
30+
fi
2731

2832
# In Kokoro CI builds, we use the service account attached to the
2933
# Kokoro VM. This means we need to setup auth on other CI systems.
@@ -65,7 +69,7 @@ do
6569
msg "Retrieving secret ${key}"
6670
"${GCLOUD_COMMANDS[@]}" \
6771
secrets versions access latest \
68-
--project cloud-devrel-kokoro-resources \
72+
--project "${SECRET_MANAGER_PROJECT_ID}" \
6973
--secret $key > \
7074
"$SECRET_LOCATION/$key"
7175
if [[ $? == 0 ]]; then

.kokoro/release.cfg

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,46 @@ action {
77
}
88
}
99

10-
# Download resources for system tests (service account key, etc.)
11-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-ruby"
12-
13-
# Download trampoline resources.
14-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
15-
1610
# Use the trampoline script to run in docker.
1711
build_file: "gapic-generator-ruby/.kokoro/trampoline_v2.sh"
1812

1913
# Configure the docker image for kokoro-trampoline.
2014
env_vars: {
2115
key: "TRAMPOLINE_IMAGE"
22-
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/release"
16+
value: "us-central1-docker.pkg.dev/cloud-sdk-release-custom-pool/release-images/ruby-multi"
2317
}
2418

2519
env_vars: {
2620
key: "TRAMPOLINE_BUILD_FILE"
2721
value: ".kokoro/release.sh"
2822
}
2923

24+
env_vars: {
25+
key: "SECRET_MANAGER_PROJECT_ID"
26+
value: "cloud-sdk-release-custom-pool"
27+
}
28+
3029
env_vars: {
3130
key: "SECRET_MANAGER_KEYS"
3231
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,docuploader_service_account"
3332
}
3433

34+
# Pick up Rubygems key from internal keystore
35+
before_action {
36+
fetch_keystore {
37+
keystore_resource {
38+
keystore_config_id: 73713
39+
keyname: "rubygems-publish-key"
40+
backend: "blade:keystore-fastconfigpush"
41+
}
42+
}
43+
}
44+
3545
# Store the packages uploaded to rubygems.org, which
3646
# we can later use to generate SBOMs and attestations.
3747
action {
38-
define_artifacts {
39-
regex: "github/gapic-generator-ruby/*/pkg/*.gem"
40-
strip_prefix: "github"
41-
}
48+
define_artifacts {
49+
regex: "github/gapic-generator-ruby/*/pkg/*.gem"
50+
strip_prefix: "github"
51+
}
4252
}

.kokoro/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export PATH=$GEM_HOME/bin:$PATH
1010
gem install --no-document toys
1111
toys release install-python-tools -v
1212
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
13-
toys release perform -v --enable-docs < /dev/null
13+
toys release perform -v --force-republish --enable-docs --enable-rad < /dev/null

.kokoro/trampoline_v2.sh

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,26 @@ if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then
138138
RUNNING_IN_CI="true"
139139
TRAMPOLINE_CI="kokoro"
140140
if [[ "${TRAMPOLINE_USE_LEGACY_SERVICE_ACCOUNT:-}" == "true" ]]; then
141-
if [[ ! -f "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json" ]]; then
142-
log_red "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json does not exist. Did you forget to mount cloud-devrel-kokoro-resources/trampoline? Aborting."
143-
exit 1
144-
fi
145-
# This service account will be activated later.
146-
TRAMPOLINE_SERVICE_ACCOUNT="${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json"
141+
if [[ ! -f "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json" ]]; then
142+
log_red "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json does not exist. Did you forget to mount cloud-devrel-kokoro-resources/trampoline? Aborting."
143+
exit 1
144+
fi
145+
# This service account will be activated later.
146+
TRAMPOLINE_SERVICE_ACCOUNT="${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json"
147147
else
148-
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
149-
gcloud auth list
150-
fi
151-
log_yellow "Configuring Container Registry access"
152-
gcloud auth configure-docker --quiet
148+
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
149+
gcloud auth list
150+
fi
151+
log_yellow "Configuring Container Registry access"
152+
TRAMPOLINE_HOST=$(echo "${TRAMPOLINE_IMAGE}" | cut -d/ -f1)
153+
if [[ ! "${TRAMPOLINE_HOST}" =~ "gcr.io" ]]; then
154+
# If you need to specificy a host other than gcr.io, you have to run on an update version of gcloud.
155+
echo "TRAMPOLINE_HOST: ${TRAMPOLINE_HOST}"
156+
gcloud components update
157+
gcloud auth configure-docker "${TRAMPOLINE_HOST}"
158+
else
159+
gcloud auth configure-docker --quiet
160+
fi
153161
fi
154162
pass_down_envvars+=(
155163
# KOKORO dynamic variables.

.release-please-manifest.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"gapic": "0.1.0",
3-
"gapic-common": "0.22.0"
2+
"gapic-common": "0.24.0"
43
}

.toys/.toys.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# directory name to the block.
2323
#
2424
def in_directories_with_bundles generator_only: false, include_toys: false
25-
non_generator_directories = ["gapic", "gapic-common"]
25+
non_generator_directories = ["gapic-common"]
2626
Dir.chdir context_directory do
2727
gemfiles = Dir.glob "*/Gemfile"
2828
gemfiles += Dir.glob ".toys/**/Gemfile" if include_toys && !generator_only

.trampolinerc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ required_envvars+=(
1818

1919
# Add env vars which are passed down into the container here.
2020
pass_down_envvars+=(
21-
"AUTORELEASE_PR" "RELEASE_DRY_RUN" "RELEASE_PACKAGE" "KOKORO_GIT_COMMIT" "RUBY_VERSIONS" "EXTRA_CI_ARGS"
21+
"AUTORELEASE_PR"
22+
"EXTRA_CI_ARGS"
23+
"KOKORO_GIT_COMMIT"
24+
"RELEASE_DRY_RUN"
25+
"RELEASE_PACKAGE"
26+
"RUBY_VERSIONS"
2227
)
2328

2429
# Prevent unintentional override on the default image.

gapic-common/.rubocop.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ AllCops:
66
- "test/**/*"
77

88
Metrics/ClassLength:
9-
Exclude:
10-
- "lib/gapic/generic_lro/operation.rb"
11-
- "lib/gapic/rest/grpc_transcoder.rb"
9+
Max: 200
1210

1311
Metrics/CyclomaticComplexity:
14-
Exclude:
15-
- "lib/gapic/headers.rb"
16-
- "lib/gapic/rest/client_stub.rb"
12+
Max: 15
13+
14+
Metrics/MethodLength:
15+
Max: 30
1716

1817
Metrics/PerceivedComplexity:
19-
Exclude:
20-
- "lib/gapic/headers.rb"
21-
- "lib/gapic/rest/client_stub.rb"
18+
Max: 15
19+
20+
Naming/AccessorMethodName:
21+
Enabled: false
2222

2323
Naming/FileName:
2424
Exclude:

gapic-common/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Release History
22

3+
### 0.24.0 (2024-12-05)
4+
5+
#### Features
6+
7+
* Log requests and responses ([#1112](https://github.com/googleapis/gapic-generator-ruby/issues/1112))
8+
#### Bug Fixes
9+
10+
* Hardened deadline determination against Time.now hacking ([#942](https://github.com/googleapis/gapic-generator-ruby/issues/942))
11+
12+
### 0.23.0 (2024-10-15)
13+
14+
#### Features
15+
16+
* Disable universe domain check if credentials include an explicit request to do so ([#1119](https://github.com/googleapis/gapic-generator-ruby/issues/1119))
17+
318
### 0.22.0 (2024-07-17)
419

520
#### Features

gapic-common/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source "https://rubygems.org"
33
gemspec
44

55
gem "concurrent-ruby", "~> 1.3"
6+
gem "googleapis-common-protos-types", "~> 1.15"
67
gem "google-cloud-core", "~> 1.7"
78
gem "google-style", "~> 1.30.0"
89
gem "grpc-tools", "~> 1.65"

0 commit comments

Comments
 (0)