Skip to content

Commit 39ab1cb

Browse files
committed
Merge branch 'kms-flaky-fix' of github.com:GoogleCloudPlatform/python-docs-samples into kms-flaky-fix
2 parents 7ab5197 + 139b893 commit 39ab1cb

File tree

23 files changed

+529
-425
lines changed

23 files changed

+529
-425
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/container_registry/ @DanSanche @GoogleCloudPlatform/python-samples-owners
2424
/datacatalog/ @shollyman @GoogleCloudPlatform/python-samples-owners
2525
/dataflow/ @davidcavazos @GoogleCloudPlatform/python-samples-owners
26-
/datalabeling/ @czahedi @GoogleCloudPlatform/python-samples-owners
26+
/datalabeling/ @sgreenberg @GoogleCloudPlatform/python-samples-owners
2727
/dataproc/ @bradmiro @GoogleCloudPlatform/python-samples-owners
2828
/datastore/ @andrewsg @GoogleCloudPlatform/python-samples-owners
2929
/dialogflow/ @nnegrey @telpirion @sirtorry @GoogleCloudPlatform/python-samples-owners

AUTHORING_GUIDE.md

Lines changed: 274 additions & 365 deletions
Large diffs are not rendered by default.

appengine/flexible/pubsub/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
# Global list to storage messages received by this instance.
3636
MESSAGES = []
3737

38+
# Initialize the publisher client once to avoid memory leak
39+
# and reduce publish latency.
40+
publisher = pubsub_v1.PublisherClient()
3841

3942
# [START gae_flex_pubsub_index]
4043
@app.route('/', methods=['GET', 'POST'])
@@ -44,9 +47,7 @@ def index():
4447

4548
data = request.form.get('payload', 'Example payload').encode('utf-8')
4649

47-
# Consider initialzing the publisher client outside this function
48-
# for low latency publish.
49-
publisher = pubsub_v1.PublisherClient()
50+
# publisher = pubsub_v1.PublisherClient()
5051
topic_path = publisher.topic_path(
5152
current_app.config['PROJECT'],
5253
current_app.config['PUBSUB_TOPIC'])
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
grpcio==1.27.2
2-
grpcio-tools==1.27.2
2+
grpcio-tools==1.28.1
33
google-auth==1.11.2
44
six==1.14.0
55
googleapis-common-protos==1.51.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
grpcio==1.27.2
2-
grpcio-tools==1.27.2
2+
grpcio-tools==1.28.1
33
google-auth==1.11.2
44
six==1.14.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
grpcio==1.27.2
2-
grpcio-tools==1.27.2
2+
grpcio-tools==1.28.1

functions/billing/main.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
# [START functions_billing_limit_appengine]
2727
# [START functions_billing_stop]
2828
from googleapiclient import discovery
29-
from oauth2client.client import GoogleCredentials
3029
# [END functions_billing_stop]
3130
# [END functions_billing_limit]
3231
# [END functions_billing_limit_appengine]
@@ -80,7 +79,6 @@ def stop_billing(data, context):
8079
'cloudbilling',
8180
'v1',
8281
cache_discovery=False,
83-
credentials=GoogleCredentials.get_application_default()
8482
)
8583

8684
projects = billing.projects()
@@ -130,7 +128,6 @@ def limit_use(data, context):
130128
'compute',
131129
'v1',
132130
cache_discovery=False,
133-
credentials=GoogleCredentials.get_application_default()
134131
)
135132
instances = compute.instances()
136133

@@ -190,8 +187,7 @@ def limit_use_appengine(data, context):
190187
appengine = discovery.build(
191188
'appengine',
192189
'v1',
193-
cache_discovery=False,
194-
credentials=GoogleCredentials.get_application_default()
190+
cache_discovery=False
195191
)
196192
apps = appengine.apps()
197193

functions/billing/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
slackclient==2.5.0
22
# [START functions_billing_limit_appengine_deps]
3-
oauth2client==4.1.3
43
google-api-python-client==1.7.11
54
# [START functions_billing_limit_appengine_deps]

functions/slack/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
google-api-python-client==1.7.11
22
flask==1.1.1
3-
oauth2client==4.1.3
43
slackeventsapi==2.1.0

healthcare/api-client/fhir/fhir_resources_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
service_account_json = os.environ["GOOGLE_APPLICATION_CREDENTIALS"]
3030

3131
bundle = os.path.join(os.path.dirname(__file__), "resources/execute_bundle.json")
32-
dataset_id = "test_dataset_{}".format(str(uuid.uuid4()))
33-
fhir_store_id = "test_fhir_store-{}".format(str(uuid.uuid4()))
32+
dataset_id = "test_dataset_{}".format(uuid.uuid4())
33+
fhir_store_id = "test_fhir_store-{}".format(uuid.uuid4())
3434
resource_type = "Patient"
3535

3636

0 commit comments

Comments
 (0)