-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
try to get kokoro to add indexes for system tests #145
Conversation
.kokoro/build.sh
Outdated
@@ -51,6 +51,9 @@ export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json") | |||
|
|||
# cd "$PACKAGE" | |||
|
|||
# Some system tests require indexes. Use gclod to create to create them. |
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.
Could you try activating the service account before creating the indexes? The service account stored in GOOGLE_APPLICATION_CREDENTIALS
should have adequate permissions.
gcloud auth activate-service-account --key-file=$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.
Thanks for your help. Now the request is sent with the correct indexes, but we still get a permissions error:
DEBUG: Got http error 403.
DEBUG: Unexpected results: {'cache-control': 'no-cache', 'content-type': 'text/plain', 'x-cloud-trace-context': '5ffa74a886a0782ae7c6d3b1a11b7b5b;o=1', 'vary': 'Accept-Encoding', 'date': 'Wed, 24 Jul 2019 17:19:01 GMT', 'server': 'Google Frontend', 'transfer-encoding': 'chunked', 'status': '403', 'content-length': '90', '-content-encoding': 'gzip'}
DEBUG: (gcloud.datastore.indexes.create) Server responded with code [403]:
Forbidden Unexpected HTTP status 403.
b"You do not have permission to modify this app (app_id=u's~cloud-devrel-kokoro-resources')."
Traceback (most recent call last):
File "/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/util.py", line 392, in Send
response = self._server.Send(*args, **kwargs)
File "/google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/tools/appengine_rpc_httplib2.py", line 312, in Send
'Unexpected HTTP status %s' % status)
File "/google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/tools/appengine_rpc_httplib2.py", line 96, in RaiseHttpError
raise HTTPError(url, response_info.status, msg, response_info, stream)
urllib.error.HTTPError: HTTP Error 403: Forbidden Unexpected HTTP status 403
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.
I guess it doesn't take the service account's project by default 😅
Maybe gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS --project=$PROJECT_ID
will do it?
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.
@busunkim96 That did it. Thanks a lot!
@chrisrossi maybe this went through the cracks? Forgive me if it was already on your radar and you are just busy. |
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.
Oh, hey, I just saw Kokoro and assumed someone with experience configuring Kokoro would want to chime in. This looks great to me!
@@ -528,7 +526,6 @@ def make_entities(): | |||
assert not more | |||
|
|||
|
|||
@pytest.mark.skip("Requires an index") |
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.
For some reason this skip is still on master. Merge weirdness?
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.
Yikes! I'll get that fixed.
No description provided.