File tree Expand file tree Collapse file tree 9 files changed +81
-2
lines changed
appengine/standard_python3/bundled-services Expand file tree Collapse file tree 9 files changed +81
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ def version():
65
65
result = gcloud_cli (f"app deploy --no-promote --version={ uuid .uuid4 ().hex } " )
66
66
version_id = result ["versions" ][0 ]["id" ]
67
67
project_id = result ["versions" ][0 ]["project" ]
68
+ version_hostname = f"{ version_id } -dot-{ project_id } .appspot.com"
69
+
70
+ # Wait for app to initialize
71
+ @backoff .on_exception (backoff .expo , requests .exceptions .HTTPError , max_tries = 3 )
72
+ def wait_for_app (url ):
73
+ r = requests .get (url )
74
+ r .raise_for_status ()
75
+
76
+ wait_for_app (f"https://{ version_hostname } /" )
68
77
69
78
yield project_id , version_id
70
79
Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ def version():
65
65
result = gcloud_cli (f"app deploy --no-promote --version={ uuid .uuid4 ().hex } " )
66
66
version_id = result ["versions" ][0 ]["id" ]
67
67
project_id = result ["versions" ][0 ]["project" ]
68
+ version_hostname = f"{ version_id } -dot-{ project_id } .appspot.com"
69
+
70
+ # Wait for app to initialize
71
+ @backoff .on_exception (backoff .expo , requests .exceptions .HTTPError , max_tries = 3 )
72
+ def wait_for_app (url ):
73
+ r = requests .get (url )
74
+ r .raise_for_status ()
75
+
76
+ wait_for_app (f"https://{ version_hostname } /" )
68
77
69
78
yield project_id , version_id
70
79
Original file line number Diff line number Diff line change 15
15
import json
16
16
import re
17
17
import subprocess
18
- import time
19
18
import uuid
20
19
21
20
import backoff
@@ -66,8 +65,16 @@ def version():
66
65
result = gcloud_cli (f"app deploy --no-promote --version={ uuid .uuid4 ().hex } " )
67
66
version_id = result ["versions" ][0 ]["id" ]
68
67
project_id = result ["versions" ][0 ]["project" ]
68
+ version_hostname = f"{ version_id } -dot-{ project_id } .appspot.com"
69
+
70
+ # Wait for app to initialize
71
+ @backoff .on_exception (backoff .expo , requests .exceptions .HTTPError , max_tries = 3 )
72
+ def wait_for_app (url ):
73
+ r = requests .get (url )
74
+ r .raise_for_status ()
75
+
76
+ wait_for_app (f"https://{ version_hostname } /" )
69
77
70
- time .sleep (10 ) # There may be a short delay before responsive
71
78
yield project_id , version_id
72
79
73
80
gcloud_cli (f"app versions delete { version_id } " )
Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ def version():
65
65
result = gcloud_cli (f"app deploy --no-promote --version={ uuid .uuid4 ().hex } " )
66
66
version_id = result ["versions" ][0 ]["id" ]
67
67
project_id = result ["versions" ][0 ]["project" ]
68
+ version_hostname = f"{ version_id } -dot-{ project_id } .appspot.com"
69
+
70
+ # Wait for app to initialize
71
+ @backoff .on_exception (backoff .expo , requests .exceptions .HTTPError , max_tries = 3 )
72
+ def wait_for_app (url ):
73
+ r = requests .get (url )
74
+ r .raise_for_status ()
75
+
76
+ wait_for_app (f"https://{ version_hostname } /counter/get" )
68
77
69
78
yield project_id , version_id
70
79
Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ def version():
65
65
result = gcloud_cli (f"app deploy --no-promote --version={ uuid .uuid4 ().hex } " )
66
66
version_id = result ["versions" ][0 ]["id" ]
67
67
project_id = result ["versions" ][0 ]["project" ]
68
+ version_hostname = f"{ version_id } -dot-{ project_id } .appspot.com"
69
+
70
+ # Wait for app to initialize
71
+ @backoff .on_exception (backoff .expo , requests .exceptions .HTTPError , max_tries = 3 )
72
+ def wait_for_app (url ):
73
+ r = requests .get (url )
74
+ r .raise_for_status ()
75
+
76
+ wait_for_app (f"https://{ version_hostname } /counter/get" )
68
77
69
78
yield project_id , version_id
70
79
Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ def version():
65
65
result = gcloud_cli (f"app deploy --no-promote --version={ uuid .uuid4 ().hex } " )
66
66
version_id = result ["versions" ][0 ]["id" ]
67
67
project_id = result ["versions" ][0 ]["project" ]
68
+ version_hostname = f"{ version_id } -dot-{ project_id } .appspot.com"
69
+
70
+ # Wait for app to initialize
71
+ @backoff .on_exception (backoff .expo , requests .exceptions .HTTPError , max_tries = 3 )
72
+ def wait_for_app (url ):
73
+ r = requests .get (url )
74
+ r .raise_for_status ()
75
+
76
+ wait_for_app (f"https://{ version_hostname } /counter/get" )
68
77
69
78
yield project_id , version_id
70
79
Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ def version():
65
65
result = gcloud_cli (f"app deploy --no-promote --version={ uuid .uuid4 ().hex } " )
66
66
version_id = result ["versions" ][0 ]["id" ]
67
67
project_id = result ["versions" ][0 ]["project" ]
68
+ version_hostname = f"{ version_id } -dot-{ project_id } .appspot.com"
69
+
70
+ # Wait for app to initialize
71
+ @backoff .on_exception (backoff .expo , requests .exceptions .HTTPError , max_tries = 3 )
72
+ def wait_for_app (url ):
73
+ r = requests .get (url )
74
+ r .raise_for_status ()
75
+
76
+ wait_for_app (f"https://{ version_hostname } /" )
68
77
69
78
yield project_id , version_id
70
79
Original file line number Diff line number Diff line change @@ -64,6 +64,15 @@ def version():
64
64
result = gcloud_cli (f"app deploy --no-promote --version={ uuid .uuid4 ().hex } " )
65
65
version_id = result ["versions" ][0 ]["id" ]
66
66
project_id = result ["versions" ][0 ]["project" ]
67
+ version_hostname = f"{ version_id } -dot-{ project_id } .appspot.com"
68
+
69
+ # Wait for app to initialize
70
+ @backoff .on_exception (backoff .expo , requests .exceptions .HTTPError , max_tries = 3 )
71
+ def wait_for_app (url ):
72
+ r = requests .get (url )
73
+ r .raise_for_status ()
74
+
75
+ wait_for_app (f"https://{ version_hostname } /" )
67
76
68
77
yield project_id , version_id
69
78
Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ def version():
65
65
result = gcloud_cli (f"app deploy --no-promote --version={ uuid .uuid4 ().hex } " )
66
66
version_id = result ["versions" ][0 ]["id" ]
67
67
project_id = result ["versions" ][0 ]["project" ]
68
+ version_hostname = f"{ version_id } -dot-{ project_id } .appspot.com"
69
+
70
+ # Wait for app to initialize
71
+ @backoff .on_exception (backoff .expo , requests .exceptions .HTTPError , max_tries = 3 )
72
+ def wait_for_app (url ):
73
+ r = requests .get (url )
74
+ r .raise_for_status ()
75
+
76
+ wait_for_app (f"https://{ version_hostname } /" )
68
77
69
78
yield project_id , version_id
70
79
You can’t perform that action at this time.
0 commit comments