modified the projects and zones function
fixes #2019
What does this implement/fix?
Put a x in the boxes that apply
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds a feature)
- [ ] Breaking change (fix or feature that would cause existing features not to work as expected)
- [ ] Documentation Update
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no API changes)
- [ ] Build related changes
- [ ] Other (please describe):
Testing
- [ ] Did you test the pull request locally?
- [ ] Did you add new tests?
Any other comments?
@iameskild I wanted to ask should I modify the check credential method to point to credential json file for explicit parameter input
@swastik959 that's a good question. I think we can start by supporting OAuth2 authentication for service accounts, this might be helpful: https://googleapis.github.io/google-api-python-client/docs/oauth.html#credentials
@iameskild hi I have made few commits can you please review them . also can you please tell me how can I test them locally
I'm picking up this PR to get it across the finish line. It has not seen any activity in almost a year but @swastik959 if you're still interested in working on it, feel free to leave a message here and I can point you in the right direction.
This PR is ready for review.
Companion docs PR: https://github.com/nebari-dev/nebari-docs/pull/500
How to test this PR
- Run:
export GOOGLE_CREDENTIALS="path/to/JSON/file/with/credentials"
export PROJECT_ID="Project ID"
- Use the
nebari init --guided-initcommand to create a Google Cloudnebari-config.yamlfile and make sure to provide a GitHub repo name and auto-provision it - Run:
nebari validate -c nebari-config.yaml
- Run:
nebari render -c nebari-config.yaml
- Run:
nebari deploy -c nebari-config.yaml
- Change anything in the config file, push to the auto-provisioned GitHub repo and let the deploy GHA workflow run
- Run the
gcp_cleanupfunction located insrc/_nebari/provider/cloud/google_cloud.pyusing your config.
I tested all of this, making sure things were working correctly. Furthermore, I triggered our GCP deployment workflow using a branch with the same contents of this PR.
Notes
- You'll notice that many functions were removed. Those were functions that were defined but not used anywhere in our codebase.
- You'll notice that one testing file was removed. It was a file containing only tests for one of the functions that were removed.
- We don't have any tests for any of our provider functions, which not only includes Google Cloud but also AWS, Azure and DO. If we want to address this, I suggest we do it in a separate PR. I can open an issue about it.
Just as a reminder, once this is merged, we will need to remember to update the conda-forge package recipe to reflect the dependencies changes. Its passing our conda test, so we should be okay when doing the release.
@viniciusdc just a friendly reminder to take a look at this PR when you get a chance. Thanks!
@marcelovilla Looks like the local integration test failed too. Is there an issue already open for that flaky test. I couldn't find one by searching the error message.
Uhm, this is interesting. #2641 should've addressed this particular issue.
@Adam-D-Lewis tests seem indeed to be flaky again. I've reopened https://github.com/nebari-dev/nebari/issues/2641 to track that as it should have anything to do with this PR. I re-ran the tests and they're all passing now.
Thanks for the review @Adam-D-Lewis ! Can you take a look at this companion docs PR when you get a chance? It's a fairly small PR.