-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
feat(datastore): Add Datastore Admin API samples #4121
feat(datastore): Add Datastore Admin API samples #4121
Conversation
@BenWhitehead, @crwilcox, I've used the code generated by Alex Vaskman (see the generation configurations PR), to run tests. They are okay:
I've written the code in Datastore fashion for now. Ready for any changes requests. |
I think it's okay to not have tests for the export/import calls, since those are |
I think we should add a test. For bucket access and config, please tell us the requirements. We can set it up. |
Hey @tmatsuo, This is the quick list of what I believe would be needed to run import/export integration tests:
|
We're already using a storage bucket specified in Re: permission I added those permissions to the service accounts. I think |
Can you also update the required env vars and permissions to run the tests in the README file? Actually you'll need to update README.rst.in and run the readmegen nox session to re-generate the README.rst file. I think you can use |
@BenWhitehead, @tmatsuo, looks like we were provided with all the necessary permissions in our project, thanks. I've run the tests locally - they're okay (I assume on kokoro they'll be failing until the next Datastore release): I've unioned And, if I understood correctly, this
Pushed. There is no |
Thanks, @crwilcox! All the files are there now. I suppose only renovate PR is left, and kokoro checks will become green. |
@IlyaFaer FYI, I think the test will automatically executed if you join googlecloudplatform org. |
@IlyaFaer looks like there are some test bootstrapping issues
|
@BenWhitehead, @crwilcox, I've updated the branch with renovate PR changes. Now another error appeared: ____________ ERROR collecting datastore/cloud-client/admin_test.py _____________
Traceback (most recent call last):
File "/workspace/datastore/cloud-client/admin_test.py", line 19, in <module>
import admin
File "/workspace/datastore/cloud-client/admin.py", line 15, in <module>
from google.cloud.datastore_admin_v1.gapic import datastore_admin_client
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/google/cloud/datastore_admin_v1/__init__.py", line 23, in <module>
from google.cloud.datastore_admin_v1.gapic import datastore_admin_client
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/google/cloud/datastore_admin_v1/gapic/datastore_admin_client.py", line 48, in <module>
"google-cloud-datastore-admin",
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 481, in get_distribution
dist = get_provider(dist)
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 357, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/workspace/datastore/cloud-client/.nox/py-3-6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'google-cloud-datastore-admin' distribution was not found and is required by the application I suspect the problem caused with the generated lines: There is no such a Python package |
@tmatsuo, @crwilcox, @BenWhitehead, all the checks are green 🎉 |
Fixes #4120