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

create and edit cluster policy / accept real dict for definition instead of pure string #554

Closed
copdips opened this issue Aug 31, 2022 · 4 comments
Labels
feature New enhancement or feature request

Comments

@copdips
Copy link
Contributor

copdips commented Aug 31, 2022

The API needs a pure string with espace on quotes for the value of the definition key:
https://docs.databricks.com/dev-tools/api/latest/policies.html#example

image

it would be nice in databricks cluster-policies [create|edit], in the given json file, if the value of the definition key is a dict, then databricks-cli converts it to a pure string directly with escape. because adding quotes escape is not easy, and especially when saving the code in git, a definition in pure string is very unreadable,

hereunder, an example of pure dict policy, but we need to pre-convert the definition part to string.

{
  "policy_id": "foo",
  "name": "bar",
  "definition": {
    "cluster_type": {
      "type": "fixed",
      "value": "job"
    }
}
@pietern pietern added the feature New enhancement or feature request label Sep 1, 2022
@pietern
Copy link
Contributor

pietern commented Sep 1, 2022

@copdips That sounds reasonable. Would you want to submit a PR for this?

@copdips
Copy link
Contributor Author

copdips commented Sep 1, 2022

ok by this weekend

@pietern
Copy link
Contributor

pietern commented Sep 2, 2022

@copdips That's great, thank you. And there's no rush, so whatever is convenient.

Happy to work with you on getting this feature in.

copdips added a commit to copdips/databricks-cli that referenced this issue Sep 2, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Sep 2, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Sep 2, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Sep 27, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Sep 27, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Sep 27, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Sep 27, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Oct 6, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Oct 6, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Oct 6, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Oct 6, 2022
copdips added a commit to copdips/databricks-cli that referenced this issue Oct 6, 2022
@copdips
Copy link
Contributor Author

copdips commented Oct 14, 2022

resolved by #557

@copdips copdips closed this as completed Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New enhancement or feature request
Projects
None yet
Development

No branches or pull requests

2 participants