Skip to content
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

Merged
merged 13 commits into from
Aug 5, 2019
Merged

try to get kokoro to add indexes for system tests #145

merged 13 commits into from
Aug 5, 2019

Conversation

cguardia
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 23, 2019
.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.
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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!

@cguardia cguardia requested a review from chrisrossi July 29, 2019 17:10
@cguardia
Copy link
Contributor Author

cguardia commented Aug 5, 2019

@chrisrossi maybe this went through the cracks? Forgive me if it was already on your radar and you are just busy.

Copy link
Contributor

@chrisrossi chrisrossi left a 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!

@cguardia cguardia merged commit c4166b3 into googleapis:master Aug 5, 2019
@@ -528,7 +526,6 @@ def make_entities():
assert not more


@pytest.mark.skip("Requires an index")
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants