-
Notifications
You must be signed in to change notification settings - Fork 46
Migrate populate-dev-data to a Python script #248
Migrate populate-dev-data to a Python script #248
Conversation
cfef772
to
82ff08a
Compare
This should eventually be updated to re-use the code from #242 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blockers!
POST requests), and a few statically-server TestRun entries (see /static/). | ||
|
||
Example usage: | ||
./populate_dev_data.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ ./util/populate_dev_data.py
usage: populate_dev_data.py [-h] [--log LOG] [--sdk-root SDK_ROOT]
[--creds CREDS_PATH] --server SERVER_URI
[--secure SECURE]
populate_dev_data.py: error: argument --server is required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the comment here is getting at - do you think that more helpful message(s) are needed? The --help output should cover confusion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I was just illustrating that the "Example usage:" snippet doesn't work as written, but like I said it's not a blocker
util/populate_dev_data.py
Outdated
dest='creds_path', | ||
default='', | ||
help='Path to the Application Default Credentials, if it\'s not' | ||
'already in your enviroment (as GOOGLE_APPLICATION_CREDENTIALS)') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about adding this link? https://developers.google.com/identity/protocols/application-default-credentials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
util/populate_dev_data.py
Outdated
type=str, | ||
dest='sdk_root', | ||
default='', | ||
help='Root path to the App Engine SDK installation, if it\'s not' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about adding this link? https://cloud.google.com/appengine/downloads
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
util/populate_dev_data.py
Outdated
dest='sdk_root', | ||
default='', | ||
help='Root path to the App Engine SDK installation, if it\'s not' | ||
'already in your PYTHONPATH. You can download the SDK from ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I just spotted another bit here: need a space after "not", or before "already", otherwise is prints out as "notalready"
I needed some time to work through a few things on my end, to try and understand the failures I was getting with this change. I'll try to recap...
Edit: Making headway here (All of this needs to be documented somewhere more "officially")
|
Did you restart your app_devserver.py with --api_port=9999? 'Connection refused' doesn't sound very auth-related. |
OK so after some to-and-fro in IM chat, we diagnosed this as docker not forwarding :9999 (fixed in 1c5171b). Though there are some hoops to jump through around creds, I think that re-using the instructions for the needed parts is better than maintaining step-by-step docs in this repo? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #241
It's a little song-and-dance to use the AppEngine SDK from a standalone script, and thus we introduce the first python2.7 script in the util dir.