Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

feat: add support for new client options #23

Merged
merged 209 commits into from Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from 207 commits
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
94266cf
changes without context
yoshi-automation Jul 31, 2020
f5517fe
Use correct resource type for DetachSubscriptionRequest
yoshi-automation Jul 31, 2020
24b3690
docs: update python docs template
yoshi-automation Jul 31, 2020
4e55b83
docs: Add comment for MessageStoragePolicy message
yoshi-automation Jul 31, 2020
697bf68
fix: update configuration artifacts for bigquery connection API code …
yoshi-automation Jul 31, 2020
5873d9b
Drop the experimental tag on the Subscription filter and retry policy…
yoshi-automation Jul 31, 2020
1805ea4
chore: enable gapicv2 for oslogin/v1beta1 API
yoshi-automation Jul 31, 2020
db1439a
chore: update gapic-generator to v2.0.2
yoshi-automation Jul 31, 2020
146c20f
fix: use grpc_service_config in nodejs_gapic_library
yoshi-automation Jul 31, 2020
44fb137
- Add CreateCapacityCommitment method to BigQuery Reservation v1beta1…
yoshi-automation Jul 31, 2020
08dad11
AdMob API v1 20200601 1. Get rid of cloud package [breaking change]; …
yoshi-automation Jul 31, 2020
53a18ab
chore: update gapic-generator and go microgen
yoshi-automation Jul 31, 2020
5a28b60
docs: change relative URLs to absolute URLs to fix broken links.
yoshi-automation Jul 31, 2020
8c4d942
firestore: add BatchWrite
yoshi-automation Jul 31, 2020
711de22
docs: fix several broken links in the docs.
yoshi-automation Jul 31, 2020
5300424
Remove Tasks service from Remote Workers API.
yoshi-automation Jul 31, 2020
3c5bbdf
docs: change relative URLs to absolute URLs to fix broken links.
yoshi-automation Jul 31, 2020
4ad9bbe
fix: Fix Recommendationengine bazel dependencies
yoshi-automation Jul 31, 2020
cf11b72
docs: change relative URLs to absolute URLs to fix broken links.
yoshi-automation Jul 31, 2020
1004d9f
Update open-sourced google/api/servicecontrol/v1 to 2020/06/01
yoshi-automation Jul 31, 2020
51d26af
docs: fix several broken links in the docs.
yoshi-automation Jul 31, 2020
d7a7aaa
docs: change relative URLs to absolute URLs to fix broken links.
yoshi-automation Jul 31, 2020
df27914
docs: fix a broken link in the docs.
yoshi-automation Jul 31, 2020
79ea0c9
docs: Remove a broken link from the documentation.
yoshi-automation Jul 31, 2020
8fe9096
Add "detached" bool to Subscription
yoshi-automation Jul 31, 2020
9be458e
docs: change relative URLs to absolute URLs to fix broken links.
yoshi-automation Jul 31, 2020
d750889
fix: dataproc/v1 raise timeouts in gapic v2
yoshi-automation Jul 31, 2020
3c42446
Use gapic-generator-typescript v1.0.0 for TypeScript libraries contin…
yoshi-automation Jul 31, 2020
8d781e0
docs: Fixed broken links in the reference documentation
yoshi-automation Jul 31, 2020
7281cef
chore: update gapic-generator to v2.1.0
yoshi-automation Jul 31, 2020
c28f3d2
Add support for secondary_aggregation and Monitoring Query Language.
yoshi-automation Jul 31, 2020
7aa553a
fix: dataproc/v1 raise workflow template service timeouts in gapic v2
yoshi-automation Jul 31, 2020
4ef3fed
fix: increase dataproc lro polling timeouts
yoshi-automation Jul 31, 2020
d82bb1b
Regular update of Google API service config with clarification of doc…
yoshi-automation Jul 31, 2020
1d0dba1
fix!: Provide C#, Ruby and PHP namespace/package options.
yoshi-automation Jul 31, 2020
0348283
feat: Add Resource to the v1 NotificationMessage, which contains reso…
yoshi-automation Jul 31, 2020
4ec5e73
feat: added support for ListAssets API Beta.
yoshi-automation Jul 31, 2020
59f8b70
feat: Add Resource to the vp1beta1 NotificationMessage, which contain…
yoshi-automation Jul 31, 2020
981043a
fix: update method_signature annotation for list RPC
yoshi-automation Jul 31, 2020
ed24d08
fix: migrate binaryauth/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
7ffc962
fix: migrate asset/v1p4beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
eee63b2
fix: migrate asset/v1p1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
3a1b5d7
fix: migrate documentai/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
e4bf04a
fix: migrate documentai/v1beta2 to grpc_service_config
yoshi-automation Jul 31, 2020
ed968b9
fix: migrate kms/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
600fecb
chore: remove unused documentai/v1beta1 atman
yoshi-automation Jul 31, 2020
af495f0
fix: migrate oslogin/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
bb96553
fix: migrate oslogin/v1beta to grpc_service_config
yoshi-automation Jul 31, 2020
e5876ca
chore: set Ruby namespace in proto options
yoshi-automation Jul 31, 2020
46a0539
fix: migrate phishingprotection/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
55d37a8
fix: migrate recaptchaenterprise/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
25e07c5
fix: migrate recaptchaenterprise/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
53824e0
chore: set Ruby namespace in proto options
yoshi-automation Jul 31, 2020
8cff1ec
chore: set Ruby namespace in proto options
yoshi-automation Jul 31, 2020
b9db68e
chore: set Ruby namespace in proto options
yoshi-automation Jul 31, 2020
92fd377
chore: set Ruby namespace in proto options
yoshi-automation Jul 31, 2020
dd48fa6
chore: set Ruby namespace in proto options
yoshi-automation Jul 31, 2020
241a32a
chore: set Ruby namespace in proto options
yoshi-automation Jul 31, 2020
8090a72
fix: migrate osconfig & agentendpoint to grpc_service_config
yoshi-automation Jul 31, 2020
e50b552
fix!:Provide C# namespace option for consistent capitalization.
yoshi-automation Jul 31, 2020
56bc1d2
Introduce notion of "dimensionless" units earlier in descriptive text.
yoshi-automation Jul 31, 2020
d255284
fix: use protoc-docs-plugin 0.8.0
yoshi-automation Jul 31, 2020
d292f3f
chore: update gapic-generator to v2.2.0
yoshi-automation Jul 31, 2020
c2dbb31
fix: remove "com." prefix in config service names
yoshi-automation Jul 31, 2020
2e31483
fix: migrate memcache/v1beta2 to grpc_service_config
yoshi-automation Jul 31, 2020
5c7d2bb
feat: retry CommitRequests that fail with UNAVAILABLE
yoshi-automation Jul 31, 2020
469cadb
fix: migrate redis/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
63a7171
fix: migrate secretmanager/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
1de54b0
fix: migrate secrets/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
ca93e3d
Fix a format issue and missing document content.
yoshi-automation Jul 31, 2020
dd432bb
fix: migrate redis/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
f411ab3
fix: migrate scheduler/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
9bc6a17
Specify allowed fields for UpdateNotificationConfig
yoshi-automation Jul 31, 2020
366accf
fix: migrate securitycenter/settings/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
313b797
feat: added support for condition in Feed docs: updated existing docs.
yoshi-automation Jul 31, 2020
0b33bde
Add protos and configs for the Google Analytics Data API v1 alpha.
yoshi-automation Jul 31, 2020
f5a28c8
fix: migrate speech/v1p1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
2cf46e9
fix: migrate speech/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
34dccdb
fix: migrate scheduler/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
80f7ea0
fix: migrate videointelligence/v1p3beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
a66b52e
fix: migrate vision/v1p4beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
8b5c6ca
fix: migrate vision/v1p1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
4e8b0cc
fix: migrate vision/v1p2beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
172368b
fix: migrate texttospeech/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
cbc6675
fix: migrate texttospeech/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
597d523
fix: migrate talent/v4beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
f3c8615
feat: introducing field Queue.type docs: fixing typos and minor updates
yoshi-automation Jul 31, 2020
834d79e
docs: Fixed casing in proto documentation to match other documentatio…
yoshi-automation Jul 31, 2020
f6941cd
feat: update version of gapic-generator-python used in Bazel rule
yoshi-automation Jul 31, 2020
2f00d69
fix: update annotations for java proto generation
yoshi-automation Jul 31, 2020
cca41e7
fix: add CreateSubmission to webrisk/v1 config
yoshi-automation Jul 31, 2020
af328b0
- Update grpc config for retry mechanism. - Update ImportAgent/Export…
yoshi-automation Jul 31, 2020
3319493
fix: migrate webrisk/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
8128612
fix: migrate webrisk/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
414b32a
fix: migrate websecurityscanner/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
8025df9
fix: migrate websecurityscanner/v1alpha to grpc_service_config
yoshi-automation Jul 31, 2020
cf7fc34
fix: migrate websecurityscanner/v1beta to grpc_service_config
yoshi-automation Jul 31, 2020
28b2d1f
fix: migrate remoteworkers/v1test2 to grpc_service_config
yoshi-automation Jul 31, 2020
5140cc1
fix: migrate iam/admin/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
140c254
fix: migrate devtools/build/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
81abb19
fix: migrate grafeas/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
393799b
docs: Fix several broken links in reference documentation
yoshi-automation Jul 31, 2020
b1424fa
chore: set Ruby namespace in proto options
yoshi-automation Jul 31, 2020
4061f5f
feat: migrate websecurityscanner v1beta BUILD.bazel python part to us…
yoshi-automation Jul 31, 2020
488a3d8
Update Bazel workspace hash for gax-java and the resource name plugin.
yoshi-automation Jul 31, 2020
c5145a9
fix: migrate iam/credentials/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
9295d37
fix: migrate translate/v3 to grpc_service_config
yoshi-automation Jul 31, 2020
6e40156
fix: migrate translate/v3beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
fa18666
fix: asset/v1 add missing RPCs to grpc_service_config
yoshi-automation Jul 31, 2020
633dc6b
fix: migrate automl/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
5dbea20
fix: migrate automl/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
d96137b
feat: migrate websecurityscanner v1alpha BUILD.bazel python part to u…
yoshi-automation Jul 31, 2020
6167463
fix: migrate asset/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
0f1c56e
fix: migrate containeranalysis/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
8da01fd
fix: migrate datalabeling/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
810c751
- Update grpc config for retry mechanism. - Update ImportAgent/Export…
yoshi-automation Jul 31, 2020
8314c0c
fix: use gapic-generator-python v0.25.2
yoshi-automation Jul 31, 2020
12afe20
feature: Add flow control settings for StreamingPullRequest to pubsub…
yoshi-automation Jul 31, 2020
396c23c
chore: update grpc to v1.30.0
yoshi-automation Jul 31, 2020
b767325
fix: migrate container/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
dc2741e
fix: migrate container/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
691aa11
chore: update gapic-generator to v2.3.0.
yoshi-automation Jul 31, 2020
84415ba
Updates to build Google Ads API build files.
yoshi-automation Jul 31, 2020
3ee5522
chore: identify php targets using legacy config
yoshi-automation Jul 31, 2020
a74a8c4
chore: use gapic-generator-typescript v1.0.3.
yoshi-automation Jul 31, 2020
54fd6ff
chore: dialogflow/v2 clean up gapic config
yoshi-automation Jul 31, 2020
2d61131
fix: migrate billing/budgets/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
ba394d0
chore: remove Artman config files
yoshi-automation Jul 31, 2020
aeb62c8
- Fix client library environment resource annotation.
yoshi-automation Jul 31, 2020
211e0f3
fix: migrate datacatalog/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
3737784
fix: migrate datacatalog/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
c1ad09a
Updated documentation of route modifiers. Introduction of the documen…
yoshi-automation Jul 31, 2020
3412bf1
fix: combine billing/v1 grpc_service_config files
yoshi-automation Jul 31, 2020
a987f0c
firestore: add BatchWrite to service config
yoshi-automation Jul 31, 2020
abb74bb
feat: Add two new fields, ignoreUnknownFields in AppendRowsRequest an…
yoshi-automation Jul 31, 2020
028f6c4
build: move gapic-generator-typescript parameters to BUILD.bazel files.
yoshi-automation Jul 31, 2020
6560700
fix: migrate monitoring/v3 to grpc_service_config
yoshi-automation Jul 31, 2020
6a8ffed
fix: migrate billing/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
4c84faa
fix!: correct return type of delete operations BREAKING CHANGE: respo…
yoshi-automation Jul 31, 2020
843628a
fix: migrate gaming/v1beta to grpc_service_config
yoshi-automation Jul 31, 2020
c7d9e37
fix: migrate language/v1beta2 to grpc_service_config
yoshi-automation Jul 31, 2020
499752a
fix: migrate language/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
512c1ef
fix: migrate servicedirectory/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
d744d44
firestore: add BatchWrite to gapic yaml
yoshi-automation Jul 31, 2020
1ce4aa4
build: remove artman configuration files
yoshi-automation Jul 31, 2020
ecc7de1
This is first release of the API protos and Bazel BUILD files for the…
yoshi-automation Jul 31, 2020
5b01bee
feat: adds methods for interacting with insights
yoshi-automation Jul 31, 2020
e3ab8a9
Updating the googleapis and googleapis_private to use the 2.4.0 gapic…
yoshi-automation Jul 31, 2020
59459bd
redis: v1 add UpgradeInstance request
yoshi-automation Jul 31, 2020
f0d77b9
fix: migrate dlp/v2 to grpc_service_config
yoshi-automation Jul 31, 2020
aad4a37
feat: added support for span kind
yoshi-automation Jul 31, 2020
e39c1bc
build: pass template name to TypeScript generator
yoshi-automation Jul 31, 2020
743e80a
build: add Bazel rules for Node.js library
yoshi-automation Jul 31, 2020
927f13c
feat: Update AuditLog proto to include all new changes in Audit Loggi…
yoshi-automation Jul 31, 2020
5cdf337
chore: use gapic-generator-python v0.26.0
yoshi-automation Jul 31, 2020
959776a
feat: Update AppEngine RequestLog proto to add trace_sampled field. A…
yoshi-automation Jul 31, 2020
dbda761
chore: use Python microgenerator for Analytics Admin API
yoshi-automation Jul 31, 2020
2c2e332
fix: migrate bq/storage/v1beta2 to grpc_service_config
yoshi-automation Jul 31, 2020
b2e1986
docs: more detailed docs on APIs such as Environment, Intents, Sessions.
yoshi-automation Jul 31, 2020
eac07d1
fix: migrate bq/storage/v1alpha2 to grpc_service_config
yoshi-automation Jul 31, 2020
377f7b5
fix!: fix LRO annotations for method `DiagnoseCluster`.
yoshi-automation Jul 31, 2020
bb27519
build: removing Artman configuration files
yoshi-automation Jul 31, 2020
352d511
feat: move PhishingProtection API to python microgenerator.
yoshi-automation Jul 31, 2020
d225ddd
fix: Remove incorrect resource annotation from non-string field
yoshi-automation Jul 31, 2020
34d1fac
feat: move monitoring/dashboard API to python microgenerator
yoshi-automation Jul 31, 2020
e6836b7
feat: adds python libraries for protobuf messages required by logging…
yoshi-automation Jul 31, 2020
80db9c7
migrate container v1/v1beta1 BUILD.bazel python part to micro-gen
yoshi-automation Jul 31, 2020
4dcf6e7
feat: Update App Engine Admin API protos for v1 and v1beta APIs. Also…
yoshi-automation Jul 31, 2020
ee162ba
fix: migrate clouderrorreporting/v1beta1 to grpc_service_config
yoshi-automation Jul 31, 2020
b5a66db
fix: migrate clouddebugger/v2 to grpc_service_config
yoshi-automation Jul 31, 2020
dc1940b
chore: update gapic-generator to v2.4.2
yoshi-automation Jul 31, 2020
99cb048
fix: migrate datastore/admin/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
c0cc8ab
fix: migrate python datastore/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
73af1e6
fix: migrate cloudbuild/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
d25691a
feat: adds python library for google.type.expr proto.
yoshi-automation Jul 31, 2020
872189e
feat: Adds AuditLog proto for reading IAM admin logs.
yoshi-automation Jul 31, 2020
0d9e6bd
Adds bazel build file for public version of AuditData proto for bigqu…
yoshi-automation Jul 31, 2020
35277f1
chore: use gapic-generator-python 0.28.1
yoshi-automation Jul 31, 2020
0335eef
fix: Fix Java and PHP bazel builds on Mac
yoshi-automation Jul 31, 2020
a2ce012
fix!: Remove fields for un-available feature.
yoshi-automation Jul 31, 2020
98fa4e7
Added a RouteMatrixElementCondition enum for RouteMatrixElement.
yoshi-automation Jul 31, 2020
350bd1a
feat: migrate bq/storage/v1beta1 to gapic v2
yoshi-automation Jul 31, 2020
1ba2229
fix(spanner): update UpdateBackup to be retryable
yoshi-automation Jul 31, 2020
8cda003
refactor!: Export Pub/Sub Lite apis to develop client libraries again…
yoshi-automation Jul 31, 2020
2650177
fix: publish missing client config annotations
yoshi-automation Jul 31, 2020
ff7495a
fix: inline markup spans must be separated from the surrounding text …
yoshi-automation Jul 31, 2020
4b27884
build: update gapic-generator-typescript to v1.0.6.
yoshi-automation Jul 31, 2020
77b9cda
build: update gax-java to v1.57.2
yoshi-automation Jul 31, 2020
b6bb43d
fix: migrate iot/v1 to grpc_service_config
yoshi-automation Jul 31, 2020
27ed65d
chore: upgrade to gapic-generator-python v0.29.0
yoshi-automation Jul 31, 2020
7a99d88
fix!: migrate dialogflow/v2beta1 to gapic v2
yoshi-automation Jul 31, 2020
353fbd2
chore: upgrade to gapic-generator-python 0.29.1
yoshi-automation Jul 31, 2020
2486b2e
chore: allow generating Java GAPIC libraries for Google Cloud Functio…
yoshi-automation Jul 31, 2020
8304a52
Update Google Ads API's gRPC client configurations for the SearchStre…
yoshi-automation Jul 31, 2020
0b8ceb2
chore: add gapic generation for pubsublite googleapis
yoshi-automation Jul 31, 2020
5a27d95
fix: add resource config to scc/v1beta1/Asset
yoshi-automation Jul 31, 2020
e97fc0b
fix!: migrate securitycenter/v1beta1 to gapic v2
yoshi-automation Jul 31, 2020
5e72259
docs: more detailed docs on APIs such as Environment, Intents, Sessions.
yoshi-automation Jul 31, 2020
04325b7
chore: use python microgenerator for notebooks and pubsublite
yoshi-automation Jul 31, 2020
b09876d
Correct PHP namespace for BigQuery connection
yoshi-automation Jul 31, 2020
93e5c2b
Remove experimental warning for ordering keys properties.
yoshi-automation Jul 31, 2020
b58b63b
feat: move talent API to python microgenerator
yoshi-automation Jul 31, 2020
9a712d2
feat: Additional fields for the `ClusterConfig` and `InstanceGroupCon…
yoshi-automation Jul 31, 2020
5f74802
migrate cloud asset BUILD.bazel to python microgen
yoshi-automation Jul 31, 2020
df58472
fix: corrects spelling of build dependency adds backticks in docstrin…
yoshi-automation Jul 31, 2020
d11888f
update python micro-gen version
yoshi-automation Jul 31, 2020
aa35f94
chore: manual regen
busunkim96 Aug 13, 2020
427dfea
chore(deps): add grpc
busunkim96 Aug 13, 2020
84b3c1d
fix: delete duped unit tests, fix docs
busunkim96 Aug 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .flake8
Expand Up @@ -21,6 +21,8 @@ exclude =
# Exclude generated code.
**/proto/**
**/gapic/**
**/services/**
**/types/**
*_pb2.py

# Standard linting exemptions.
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -10,6 +10,7 @@
dist
build
eggs
.eggs
parts
bin
var
Expand Down Expand Up @@ -45,14 +46,16 @@ pip-log.txt
# Built documentation
docs/_build
bigquery/docs/generated
docs.metadata

# Virtual environment
env/
coverage.xml
sponge_log.xml

# System test environment variables.
system_tests/local_test_setup

# Make sure a generated file isn't accidentally committed.
pylintrc
pylintrc.test
pylintrc.test
8 changes: 7 additions & 1 deletion .kokoro/build.sh
Expand Up @@ -36,4 +36,10 @@ python3.6 -m pip uninstall --yes --quiet nox-automation
python3.6 -m pip install --upgrade --quiet nox
python3.6 -m nox --version

python3.6 -m nox
# If NOX_SESSION is set, it only runs the specified session,
# otherwise run all the sessions.
if [[ -n "${NOX_SESSION:-}" ]]; then
python3.6 -m nox -s "${NOX_SESSION:-}"
else
python3.6 -m nox
fi
98 changes: 98 additions & 0 deletions .kokoro/docker/docs/Dockerfile
@@ -0,0 +1,98 @@
# Copyright 2020 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.

from ubuntu:20.04

ENV DEBIAN_FRONTEND noninteractive

# Ensure local Python is preferred over distribution Python.
ENV PATH /usr/local/bin:$PATH

# Install dependencies.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
build-essential \
ca-certificates \
curl \
dirmngr \
git \
gpg-agent \
graphviz \
libbz2-dev \
libdb5.3-dev \
libexpat1-dev \
libffi-dev \
liblzma-dev \
libreadline-dev \
libsnappy-dev \
libssl-dev \
libsqlite3-dev \
portaudio19-dev \
redis-server \
software-properties-common \
ssh \
sudo \
tcl \
tcl-dev \
tk \
tk-dev \
uuid-dev \
wget \
zlib1g-dev \
&& add-apt-repository universe \
&& apt-get update \
&& apt-get -y install jq \
&& apt-get clean autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /var/cache/apt/archives/*.deb


COPY fetch_gpg_keys.sh /tmp
# Install the desired versions of Python.
RUN set -ex \
&& export GNUPGHOME="$(mktemp -d)" \
&& echo "disable-ipv6" >> "${GNUPGHOME}/dirmngr.conf" \
&& /tmp/fetch_gpg_keys.sh \
&& for PYTHON_VERSION in 3.7.8 3.8.5; do \
wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
&& wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
&& gpg --batch --verify python-${PYTHON_VERSION}.tar.xz.asc python-${PYTHON_VERSION}.tar.xz \
&& rm -r python-${PYTHON_VERSION}.tar.xz.asc \
&& mkdir -p /usr/src/python-${PYTHON_VERSION} \
&& tar -xJC /usr/src/python-${PYTHON_VERSION} --strip-components=1 -f python-${PYTHON_VERSION}.tar.xz \
&& rm python-${PYTHON_VERSION}.tar.xz \
&& cd /usr/src/python-${PYTHON_VERSION} \
&& ./configure \
--enable-shared \
# This works only on Python 2.7 and throws a warning on every other
# version, but seems otherwise harmless.
--enable-unicode=ucs4 \
--with-system-ffi \
--without-ensurepip \
&& make -j$(nproc) \
&& make install \
&& ldconfig \
; done \
&& rm -rf "${GNUPGHOME}" \
&& rm -rf /usr/src/python* \
&& rm -rf ~/.cache/

RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
&& python3.7 /tmp/get-pip.py \
&& python3.8 /tmp/get-pip.py \
&& rm /tmp/get-pip.py

CMD ["python3.7"]
45 changes: 45 additions & 0 deletions .kokoro/docker/docs/fetch_gpg_keys.sh
@@ -0,0 +1,45 @@
#!/bin/bash
# Copyright 2020 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.

# A script to fetch gpg keys with retry.
# Avoid jinja parsing the file.
#

function retry {
if [[ "${#}" -le 1 ]]; then
echo "Usage: ${0} retry_count commands.."
exit 1
fi
local retries=${1}
local command="${@:2}"
until [[ "${retries}" -le 0 ]]; do
$command && return 0
if [[ $? -ne 0 ]]; then
echo "command failed, retrying"
((retries--))
fi
done
return 1
}

# 3.6.9, 3.7.5 (Ned Deily)
retry 3 gpg --keyserver ha.pool.sks-keyservers.net --recv-keys \
0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D

# 3.8.0 (Łukasz Langa)
retry 3 gpg --keyserver ha.pool.sks-keyservers.net --recv-keys \
E3FF2839C048B25C084DEBE9B26995E310250568

#
21 changes: 19 additions & 2 deletions .kokoro/docs/common.cfg
Expand Up @@ -11,12 +11,12 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-bigquery-reservation/.kokoro/trampoline.sh"
build_file: "python-bigquery-reservation/.kokoro/trampoline_v2.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
value: "gcr.io/cloud-devrel-kokoro-resources/python-lib-docs"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand All @@ -28,6 +28,23 @@ env_vars: {
value: "docs-staging"
}

env_vars: {
key: "V2_STAGING_BUCKET"
value: "docs-staging-v2-staging"
}

# It will upload the docker image after successful builds.
env_vars: {
key: "TRAMPOLINE_IMAGE_UPLOAD"
value: "true"
}

# It will always build the docker image.
env_vars: {
key: "TRAMPOLINE_DOCKERFILE"
value: ".kokoro/docker/docs/Dockerfile"
}

# Fetch the token needed for reporting release status to GitHub
before_action {
fetch_keystore {
Expand Down
17 changes: 17 additions & 0 deletions .kokoro/docs/docs-presubmit.cfg
@@ -0,0 +1,17 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "STAGING_BUCKET"
value: "gcloud-python-test"
}

env_vars: {
key: "V2_STAGING_BUCKET"
value: "gcloud-python-test"
}

# We only upload the image in the main `docs` build.
env_vars: {
key: "TRAMPOLINE_IMAGE_UPLOAD"
value: "false"
}
39 changes: 24 additions & 15 deletions .kokoro/publish-docs.sh
Expand Up @@ -18,26 +18,16 @@ set -eo pipefail
# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

cd github/python-bigquery-reservation

# Remove old nox
python3.6 -m pip uninstall --yes --quiet nox-automation
export PATH="${HOME}/.local/bin:${PATH}"

# Install nox
python3.6 -m pip install --upgrade --quiet nox
python3.6 -m nox --version
python3 -m pip install --user --upgrade --quiet nox
python3 -m nox --version

# build docs
nox -s docs

python3 -m pip install gcp-docuploader

# install a json parser
sudo apt-get update
sudo apt-get -y install software-properties-common
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get -y install jq
python3 -m pip install --user gcp-docuploader

# create metadata
python3 -m docuploader create-metadata \
Expand All @@ -52,4 +42,23 @@ python3 -m docuploader create-metadata \
cat docs.metadata

# upload docs
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"


# docfx yaml files
nox -s docfx

# create metadata.
python3 -m docuploader create-metadata \
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
--version=$(python3 setup.py --version) \
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
--distribution-name=$(python3 setup.py --name) \
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)

cat docs.metadata

# upload docs
python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"
34 changes: 34 additions & 0 deletions .kokoro/samples/lint/common.cfg
@@ -0,0 +1,34 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Specify which tests to run
env_vars: {
key: "RUN_TESTS_SESSION"
value: "lint"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-bigquery-reservation/.kokoro/test-samples.sh"
}

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
}

# Download secrets for samples
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-bigquery-reservation/.kokoro/trampoline.sh"
6 changes: 6 additions & 0 deletions .kokoro/samples/lint/continuous.cfg
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/lint/periodic.cfg
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/lint/presubmit.cfg
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}