nebari icon indicating copy to clipboard operation
nebari copied to clipboard

modified the projects and zones function

Open swastik959 opened this issue 2 years ago • 3 comments

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?

swastik959 avatar Oct 22 '23 16:10 swastik959

@iameskild I wanted to ask should I modify the check credential method to point to credential json file for explicit parameter input

swastik959 avatar Oct 25 '23 04:10 swastik959

@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 avatar Oct 29 '23 05:10 iameskild

@iameskild hi I have made few commits can you please review them . also can you please tell me how can I test them locally

swastik959 avatar Nov 03 '23 10:11 swastik959

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.

marcelovilla avatar Aug 02 '24 17:08 marcelovilla

This PR is ready for review.

Companion docs PR: https://github.com/nebari-dev/nebari-docs/pull/500

How to test this PR

  1. Run:
export GOOGLE_CREDENTIALS="path/to/JSON/file/with/credentials"
export PROJECT_ID="Project ID"
  1. Use the nebari init --guided-init command to create a Google Cloud nebari-config.yaml file and make sure to provide a GitHub repo name and auto-provision it
  2. Run:
nebari validate -c nebari-config.yaml
  1. Run:
nebari render -c nebari-config.yaml
  1. Run:
nebari deploy -c nebari-config.yaml
  1. Change anything in the config file, push to the auto-provisioned GitHub repo and let the deploy GHA workflow run
  2. Run the gcp_cleanup function located in src/_nebari/provider/cloud/google_cloud.py using 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.

marcelovilla avatar Aug 09 '24 13:08 marcelovilla

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 avatar Aug 15 '24 15:08 viniciusdc

@viniciusdc just a friendly reminder to take a look at this PR when you get a chance. Thanks!

marcelovilla avatar Sep 04 '24 22:09 marcelovilla

@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.

Adam-D-Lewis avatar Sep 11 '24 20:09 Adam-D-Lewis

Uhm, this is interesting. #2641 should've addressed this particular issue.

viniciusdc avatar Sep 12 '24 13:09 viniciusdc

@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.

marcelovilla avatar Sep 13 '24 01:09 marcelovilla

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.

marcelovilla avatar Sep 17 '24 13:09 marcelovilla