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

ENH: specify required fields when retrieving available gcp projects #2008

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

fangchenli
Copy link
Member

Reference Issues or PRs

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • 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?

Copy link
Member

@iameskild iameskild left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had one small question but otherwise, LGTM.

output = subprocess.check_output(["gcloud", "projects", "list", "--format=json"])
data = json.loads(output.decode("utf-8"))
output = subprocess.check_output(
["gcloud", "projects", "list", "--format=json(name,projectId)"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to add quotes like this: --format="json(name, projectId)". I believe this is due to a difference between MacOS and Linux. Is this something you can confirm @fangchenli?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to add quotes like this: --format="json(name, projectId)". I believe this is due to a difference between MacOS and Linux. Is this something you can confirm @fangchenli?

Yes, quotes are required when running it in terminal on Linux. But when calling from python, "--format=json(name,projectId)" works on both MacOS and Linux.

@iameskild iameskild merged commit aab5f3f into nebari-dev:develop Sep 14, 2023
8 checks passed
@fangchenli fangchenli deleted the add-filter-gcp branch September 25, 2023 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants