Skip to content

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

Merged
iameskild merged 2 commits into
nebari-dev:developfrom
fangchenli:add-filter-gcp
Sep 14, 2023
Merged

iameskild merged 2 commits into
nebari-dev:developfrom
fangchenli:add-filter-gcp

Conversation

@fangchenli

Copy link
Copy Markdown
Contributor

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?

@iameskild iameskild left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Contributor 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
@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