Skip to content

Commit bb61007

Browse files
committed
Merge remote-tracking branch 'origin/main' into scc-org-mgt-etd-api-create-get-upd-list-del
merge remote to local branch.
2 parents 53c793b + 8a8369c commit bb61007

File tree

101 files changed

+1493
-377
lines changed

Some content is hidden

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

101 files changed

+1493
-377
lines changed

appengine/standard_python3/bundled-services/blobstore/django/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import re
1718
import subprocess
1819
import uuid
@@ -21,6 +22,8 @@
2122
import pytest
2223
import requests
2324

25+
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
26+
2427

2528
@backoff.on_exception(backoff.expo, Exception, max_tries=3)
2629
def gcloud_cli(command):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
3740
3841
Raises Exception with the stderr output of the last attempt on failure.
3942
"""
40-
full_command = f"gcloud {command} --quiet --format=json"
43+
full_command = f"gcloud {command} --quiet --format=json --project {project_id}"
4144
print("Running command:", full_command)
4245

4346
output = subprocess.run(

appengine/standard_python3/bundled-services/blobstore/flask/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import re
1718
import subprocess
1819
import uuid
@@ -21,6 +22,8 @@
2122
import pytest
2223
import requests
2324

25+
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
26+
2427

2528
@backoff.on_exception(backoff.expo, Exception, max_tries=3)
2629
def gcloud_cli(command):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
3740
3841
Raises Exception with the stderr output of the last attempt on failure.
3942
"""
40-
full_command = f"gcloud {command} --quiet --format=json"
43+
full_command = f"gcloud {command} --quiet --format=json --project {project_id}"
4144
print("Running command:", full_command)
4245

4346
output = subprocess.run(

appengine/standard_python3/bundled-services/blobstore/wsgi/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import re
1718
import subprocess
1819
import uuid
@@ -21,6 +22,8 @@
2122
import pytest
2223
import requests
2324

25+
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
26+
2427

2528
@backoff.on_exception(backoff.expo, Exception, max_tries=5)
2629
def gcloud_cli(command):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
3740
3841
Raises Exception with the stderr output of the last attempt on failure.
3942
"""
40-
full_command = f"gcloud {command} --quiet --format=json"
43+
full_command = f"gcloud {command} --quiet --format=json --project {project_id}"
4144
print("Running command:", full_command)
4245

4346
output = subprocess.run(

appengine/standard_python3/bundled-services/deferred/django/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import subprocess
1718
import time
1819
import uuid
@@ -21,6 +22,8 @@
2122
import pytest
2223
import requests
2324

25+
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
26+
2427

2528
@backoff.on_exception(backoff.expo, Exception, max_tries=3)
2629
def gcloud_cli(command):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
3740
3841
Raises Exception with the stderr output of the last attempt on failure.
3942
"""
40-
full_command = f"gcloud {command} --quiet --format=json"
43+
full_command = f"gcloud {command} --quiet --format=json --project {project_id}"
4144
print("Running command:", full_command)
4245

4346
output = subprocess.run(

appengine/standard_python3/bundled-services/deferred/flask/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import subprocess
1718
import time
1819
import uuid
@@ -21,6 +22,8 @@
2122
import pytest
2223
import requests
2324

25+
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
26+
2427

2528
@backoff.on_exception(backoff.expo, Exception, max_tries=3)
2629
def gcloud_cli(command):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
3740
3841
Raises Exception with the stderr output of the last attempt on failure.
3942
"""
40-
full_command = f"gcloud {command} --quiet --format=json"
43+
full_command = f"gcloud {command} --quiet --format=json --project {project_id}"
4144
print("Running command:", full_command)
4245

4346
output = subprocess.run(

appengine/standard_python3/bundled-services/deferred/wsgi/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import subprocess
1718
import time
1819
import uuid
@@ -21,6 +22,8 @@
2122
import pytest
2223
import requests
2324

25+
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
26+
2427

2528
@backoff.on_exception(backoff.expo, Exception, max_tries=3)
2629
def gcloud_cli(command):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
3740
3841
Raises Exception with the stderr output of the last attempt on failure.
3942
"""
40-
full_command = f"gcloud {command} --quiet --format=json"
43+
full_command = f"gcloud {command} --quiet --format=json --project {project_id}"
4144
print("Running command:", full_command)
4245

4346
output = subprocess.run(

appengine/standard_python3/bundled-services/mail/django/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import subprocess
1718
import time
1819
import uuid
@@ -21,6 +22,8 @@
2122
import pytest
2223
import requests
2324

25+
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
26+
2427

2528
@backoff.on_exception(backoff.expo, Exception, max_tries=3)
2629
def gcloud_cli(command):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
3740
3841
Raises Exception with the stderr output of the last attempt on failure.
3942
"""
40-
full_command = f"gcloud {command} --quiet --format=json"
43+
full_command = f"gcloud {command} --quiet --format=json --project {project_id}"
4144
print("Running command:", full_command)
4245

4346
output = subprocess.run(

appengine/standard_python3/bundled-services/mail/flask/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import subprocess
1718
import uuid
1819

1920
import backoff
2021
import pytest
2122
import requests
2223

24+
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
25+
2326

2427
@backoff.on_exception(backoff.expo, Exception, max_tries=3)
2528
def gcloud_cli(command):
@@ -36,7 +39,7 @@ def gcloud_cli(command):
3639
3740
Raises Exception with the stderr output of the last attempt on failure.
3841
"""
39-
full_command = f"gcloud {command} --quiet --format=json"
42+
full_command = f"gcloud {command} --quiet --format=json --project {project_id}"
4043
print("Running command:", full_command)
4144

4245
output = subprocess.run(

appengine/standard_python3/bundled-services/mail/wsgi/main_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import subprocess
1718
import time
1819
import uuid
@@ -21,6 +22,8 @@
2122
import pytest
2223
import requests
2324

25+
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
26+
2427

2528
@backoff.on_exception(backoff.expo, Exception, max_tries=3)
2629
def gcloud_cli(command):
@@ -37,7 +40,7 @@ def gcloud_cli(command):
3740
3841
Raises Exception with the stderr output of the last attempt on failure.
3942
"""
40-
full_command = f"gcloud {command} --quiet --format=json"
43+
full_command = f"gcloud {command} --quiet --format=json --project {project_id}"
4144
print("Running command:", full_command)
4245

4346
output = subprocess.run(

cloud-sql/mysql/sqlalchemy/connect_connector.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def connect_with_connector() -> sqlalchemy.engine.base.Engine:
4141

4242
ip_type = IPTypes.PRIVATE if os.environ.get("PRIVATE_IP") else IPTypes.PUBLIC
4343

44-
connector = Connector(ip_type)
44+
# initialize Cloud SQL Python Connector object
45+
connector = Connector(ip_type=ip_type, refresh_strategy="LAZY")
4546

4647
def getconn() -> pymysql.connections.Connection:
4748
conn: pymysql.connections.Connection = connector.connect(

0 commit comments

Comments
 (0)