Skip to content

Commit 4322c62

Browse files
authored
chore: migrate to owl bot (#80)
This PR migrates from autosynth to owl bot. owl bot will save time for maintainers as it will automatically open PRs when there are updates in googleapis-gen without requiring maintainers to run synthtool to build the client from protos. Additionally, similar to autosynth, PRs will be automatically opened when there are template updates. fix: add async client chore: add autogenerated snippets chore: remove auth, policy, and options from the reserved names list feat: support self-signed JWT flow for service accounts chore: enable GAPIC metadata generation
1 parent f8a3f22 commit 4322c62

Some content is hidden

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

51 files changed

+1200
-723
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docker:
2+
digest: sha256:457583330eec64daa02aeb7a72a04d33e7be2428f646671ce4045dcbc0191b1e
3+
image: gcr.io/repo-automation-bots/owlbot-python:latest
4+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2021 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+
docker:
16+
image: gcr.io/repo-automation-bots/owlbot-python:latest
17+
18+
deep-remove-regex:
19+
- /owl-bot-staging
20+
21+
deep-copy-regex:
22+
- source: /google/devtools/cloudtrace/(v.*)/.*-py/(.*)
23+
dest: /owl-bot-staging/$1/$2
24+
25+
begin-after-commit-hash: 6acf4a0a797f1082027985c55c4b14b60f673dd7
26+

packages/google-cloud-trace/.github/header-checker-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{"allowedCopyrightHolders": ["Google LLC"],
22
"allowedLicenses": ["Apache-2.0", "MIT", "BSD-3"],
3-
"ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt"],
3+
"ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt", "**/__init__.py", "samples/**/constraints.txt", "samples/**/constraints-test.txt"],
44
"sourceFileExtensions": [
55
"ts",
66
"js",

packages/google-cloud-trace/.kokoro/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools
2626
export PYTHONUNBUFFERED=1
2727

2828
# Move into the package, build the distribution and upload.
29-
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
29+
TWINE_PASSWORD=$(cat "${KOKORO_GFILE_DIR}/secret_manager/google-cloud-pypi-token")
3030
cd github/python-trace
3131
python3 setup.py sdist bdist_wheel
32-
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*
32+
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*

packages/google-cloud-trace/.kokoro/release/common.cfg

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,8 @@ env_vars: {
2323
value: "github/python-trace/.kokoro/release.sh"
2424
}
2525

26-
# Fetch PyPI password
27-
before_action {
28-
fetch_keystore {
29-
keystore_resource {
30-
keystore_config_id: 73713
31-
keyname: "google_cloud_pypi_password"
32-
}
33-
}
34-
}
35-
3626
# Tokens needed to report release status back to GitHub
3727
env_vars: {
3828
key: "SECRET_MANAGER_KEYS"
39-
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
40-
}
29+
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,google-cloud-pypi-token"
30+
}

packages/google-cloud-trace/.pre-commit-config.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2021 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+
#
115
# See https://pre-commit.com for more information
216
# See https://pre-commit.com/hooks.html for more hooks
317
repos:
@@ -12,6 +26,6 @@ repos:
1226
hooks:
1327
- id: black
1428
- repo: https://gitlab.com/pycqa/flake8
15-
rev: 3.9.0
29+
rev: 3.9.1
1630
hooks:
1731
- id: flake8

packages/google-cloud-trace/CONTRIBUTING.rst

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -160,21 +160,7 @@ Running System Tests
160160
auth settings and change some configuration in your project to
161161
run all the tests.
162162

163-
- System tests will be run against an actual project and
164-
so you'll need to provide some environment variables to facilitate
165-
authentication to your project:
166-
167-
- ``GOOGLE_APPLICATION_CREDENTIALS``: The path to a JSON key file;
168-
Such a file can be downloaded directly from the developer's console by clicking
169-
"Generate new JSON key". See private key
170-
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__
171-
for more details.
172-
173-
- Once you have downloaded your json keys, set the environment variable
174-
``GOOGLE_APPLICATION_CREDENTIALS`` to the absolute path of the json file::
175-
176-
$ export GOOGLE_APPLICATION_CREDENTIALS="/Users/<your_username>/path/to/app_credentials.json"
177-
163+
- System tests will be run against an actual project. You should use local credentials from gcloud when possible. See `Best practices for application authentication <https://cloud.google.com/docs/authentication/best-practices-applications#local_development_and_testing_with_the>`__. Some tests require a service account. For those tests see `Authenticating as a service account <https://cloud.google.com/docs/authentication/production>`__.
178164

179165
*************
180166
Test Coverage
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
div#python2-eol {
22
border-color: red;
33
border-width: medium;
4-
}
4+
}
55

66
/* Ensure minimum width for 'Parameters' / 'Returns' column */
77
dl.field-list > dt {
88
min-width: 100px
99
}
10+
11+
/* Insert space between methods for readability */
12+
dl.method {
13+
padding-top: 10px;
14+
padding-bottom: 10px
15+
}
16+
17+
/* Insert empty space between classes */
18+
dl.class {
19+
padding-bottom: 50px
20+
}

packages/google-cloud-trace/docs/conf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
# -*- coding: utf-8 -*-
2+
# Copyright 2021 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
215
#
316
# google-cloud-trace documentation build configuration file
417
#

packages/google-cloud-trace/docs/trace_v1/trace_service.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ TraceService
55
:members:
66
:inherited-members:
77

8-
98
.. automodule:: google.cloud.trace_v1.services.trace_service.pagers
109
:members:
1110
:inherited-members:

packages/google-cloud-trace/google/cloud/trace/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,10 +14,11 @@
1514
# limitations under the License.
1615
#
1716

17+
from google.cloud.trace_v2.services.trace_service.client import TraceServiceClient
1818
from google.cloud.trace_v2.services.trace_service.async_client import (
1919
TraceServiceAsyncClient,
2020
)
21-
from google.cloud.trace_v2.services.trace_service.client import TraceServiceClient
21+
2222
from google.cloud.trace_v2.types.trace import AttributeValue
2323
from google.cloud.trace_v2.types.trace import Module
2424
from google.cloud.trace_v2.types.trace import Span
@@ -27,12 +27,12 @@
2727
from google.cloud.trace_v2.types.tracing import BatchWriteSpansRequest
2828

2929
__all__ = (
30+
"TraceServiceClient",
31+
"TraceServiceAsyncClient",
3032
"AttributeValue",
31-
"BatchWriteSpansRequest",
3233
"Module",
3334
"Span",
3435
"StackTrace",
35-
"TraceServiceAsyncClient",
36-
"TraceServiceClient",
3736
"TruncatableString",
37+
"BatchWriteSpansRequest",
3838
)

packages/google-cloud-trace/google/cloud/trace_v1/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,22 +15,24 @@
1615
#
1716

1817
from .services.trace_service import TraceServiceClient
18+
from .services.trace_service import TraceServiceAsyncClient
19+
1920
from .types.trace import GetTraceRequest
2021
from .types.trace import ListTracesRequest
2122
from .types.trace import ListTracesResponse
2223
from .types.trace import PatchTracesRequest
2324
from .types.trace import Trace
24-
from .types.trace import TraceSpan
2525
from .types.trace import Traces
26-
26+
from .types.trace import TraceSpan
2727

2828
__all__ = (
29+
"TraceServiceAsyncClient",
2930
"GetTraceRequest",
3031
"ListTracesRequest",
3132
"ListTracesResponse",
3233
"PatchTracesRequest",
3334
"Trace",
35+
"TraceServiceClient",
3436
"TraceSpan",
3537
"Traces",
36-
"TraceServiceClient",
3738
)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3+
"language": "python",
4+
"libraryPackage": "google.cloud.trace_v1",
5+
"protoPackage": "google.devtools.cloudtrace.v1",
6+
"schema": "1.0",
7+
"services": {
8+
"TraceService": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "TraceServiceClient",
12+
"rpcs": {
13+
"GetTrace": {
14+
"methods": [
15+
"get_trace"
16+
]
17+
},
18+
"ListTraces": {
19+
"methods": [
20+
"list_traces"
21+
]
22+
},
23+
"PatchTraces": {
24+
"methods": [
25+
"patch_traces"
26+
]
27+
}
28+
}
29+
},
30+
"grpc-async": {
31+
"libraryClient": "TraceServiceAsyncClient",
32+
"rpcs": {
33+
"GetTrace": {
34+
"methods": [
35+
"get_trace"
36+
]
37+
},
38+
"ListTraces": {
39+
"methods": [
40+
"list_traces"
41+
]
42+
},
43+
"PatchTraces": {
44+
"methods": [
45+
"patch_traces"
46+
]
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
53+
}

packages/google-cloud-trace/google/cloud/trace_v1/services/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");

packages/google-cloud-trace/google/cloud/trace_v1/services/trace_service/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +13,6 @@
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
1615
#
17-
1816
from .client import TraceServiceClient
1917
from .async_client import TraceServiceAsyncClient
2018

0 commit comments

Comments
 (0)