Content-Length: 851127 | pFad | https://github.com/googleapis/python-asset/commit/cd2619262bbea00c01d054b783b218009171284e

AC feat: add support for per type and partition export (#86) · googleapis/python-asset@cd26192 · GitHub
Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit cd26192

Browse files
feat: add support for per type and partition export (#86)
1 parent 68a1c9f commit cd26192

File tree

50 files changed

+3543
-2192
lines changed

Some content is hidden

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

50 files changed

+3543
-2192
lines changed

.github/snippet-bot.yml

Whitespace-only changes.

.kokoro/populate-secrets.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
# Copyright 2020 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.
15+
16+
set -eo pipefail
17+
18+
function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;}
19+
function msg { println "$*" >&2 ;}
20+
function println { printf '%s\n' "$(now) $*" ;}
21+
22+
23+
# Populates requested secrets set in SECRET_MANAGER_KEYS from service account:
24+
# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com
25+
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
26+
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}"
27+
mkdir -p ${SECRET_LOCATION}
28+
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
29+
do
30+
msg "Retrieving secret ${key}"
31+
docker run --entrypoint=gcloud \
32+
--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \
33+
gcr.io/google.com/cloudsdktool/cloud-sdk \
34+
secrets versions access latest \
35+
--project cloud-devrel-kokoro-resources \
36+
--secret ${key} > \
37+
"${SECRET_LOCATION}/${key}"
38+
if [[ $? == 0 ]]; then
39+
msg "Secret written to ${SECRET_LOCATION}/${key}"
40+
else
41+
msg "Error retrieving secret ${key}"
42+
fi
43+
done

.kokoro/release/common.cfg

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

26-
# Fetch the token needed for reporting release status to GitHub
27-
before_action {
28-
fetch_keystore {
29-
keystore_resource {
30-
keystore_config_id: 73713
31-
keyname: "yoshi-automation-github-key"
32-
}
33-
}
34-
}
35-
36-
# Fetch PyPI password
37-
before_action {
38-
fetch_keystore {
39-
keystore_resource {
40-
keystore_config_id: 73713
41-
keyname: "google_cloud_pypi_password"
42-
}
43-
}
44-
}
45-
46-
# Fetch magictoken to use with Magic Github Proxy
47-
before_action {
48-
fetch_keystore {
49-
keystore_resource {
50-
keystore_config_id: 73713
51-
keyname: "releasetool-magictoken"
52-
}
53-
}
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+
}
5434
}
5535

56-
# Fetch api key to use with Magic Github Proxy
57-
before_action {
58-
fetch_keystore {
59-
keystore_resource {
60-
keystore_config_id: 73713
61-
keyname: "magic-github-proxy-api-key"
62-
}
63-
}
64-
}
36+
# Tokens needed to report release status back to GitHub
37+
env_vars: {
38+
key: "SECRET_MANAGER_KEYS"
39+
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
40+
}

.kokoro/trampoline.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@
1515

1616
set -eo pipefail
1717

18-
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$?
18+
# Always run the cleanup script, regardless of the success of bouncing into
19+
# the container.
20+
function cleanup() {
21+
chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
22+
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
23+
echo "cleanup";
24+
}
25+
trap cleanup EXIT
1926

20-
chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh
21-
${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true
22-
23-
exit ${ret_code}
27+
$(dirname $0)/populate-secrets.sh # Secret Manager secrets.
28+
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# -- General configuration ------------------------------------------------
3030

3131
# If your documentation needs a minimal Sphinx version, state it here.
32-
needs_sphinx = "1.6.3"
32+
needs_sphinx = "1.5.5"
3333

3434
# Add any Sphinx extension module names here, as strings. They can be
3535
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

google/cloud/asset/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@
3030
from google.cloud.asset_v1.types.asset_service import Feed
3131
from google.cloud.asset_v1.types.asset_service import FeedOutputConfig
3232
from google.cloud.asset_v1.types.asset_service import GcsDestination
33+
from google.cloud.asset_v1.types.asset_service import GcsOutputResult
3334
from google.cloud.asset_v1.types.asset_service import GetFeedRequest
3435
from google.cloud.asset_v1.types.asset_service import ListFeedsRequest
3536
from google.cloud.asset_v1.types.asset_service import ListFeedsResponse
3637
from google.cloud.asset_v1.types.asset_service import OutputConfig
38+
from google.cloud.asset_v1.types.asset_service import OutputResult
39+
from google.cloud.asset_v1.types.asset_service import PartitionSpec
3740
from google.cloud.asset_v1.types.asset_service import PubsubDestination
3841
from google.cloud.asset_v1.types.asset_service import SearchAllIamPoliciesRequest
3942
from google.cloud.asset_v1.types.asset_service import SearchAllIamPoliciesResponse
@@ -62,11 +65,14 @@
6265
"Feed",
6366
"FeedOutputConfig",
6467
"GcsDestination",
68+
"GcsOutputResult",
6569
"GetFeedRequest",
6670
"IamPolicySearchResult",
6771
"ListFeedsRequest",
6872
"ListFeedsResponse",
6973
"OutputConfig",
74+
"OutputResult",
75+
"PartitionSpec",
7076
"PubsubDestination",
7177
"Resource",
7278
"ResourceSearchResult",

google/cloud/asset_v1/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@
2727
from .types.asset_service import Feed
2828
from .types.asset_service import FeedOutputConfig
2929
from .types.asset_service import GcsDestination
30+
from .types.asset_service import GcsOutputResult
3031
from .types.asset_service import GetFeedRequest
3132
from .types.asset_service import ListFeedsRequest
3233
from .types.asset_service import ListFeedsResponse
3334
from .types.asset_service import OutputConfig
35+
from .types.asset_service import OutputResult
36+
from .types.asset_service import PartitionSpec
3437
from .types.asset_service import PubsubDestination
3538
from .types.asset_service import SearchAllIamPoliciesRequest
3639
from .types.asset_service import SearchAllIamPoliciesResponse
@@ -58,11 +61,14 @@
5861
"Feed",
5962
"FeedOutputConfig",
6063
"GcsDestination",
64+
"GcsOutputResult",
6165
"GetFeedRequest",
6266
"IamPolicySearchResult",
6367
"ListFeedsRequest",
6468
"ListFeedsResponse",
6569
"OutputConfig",
70+
"OutputResult",
71+
"PartitionSpec",
6672
"PubsubDestination",
6773
"Resource",
6874
"ResourceSearchResult",

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/python-asset/commit/cd2619262bbea00c01d054b783b218009171284e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy