-
Notifications
You must be signed in to change notification settings - Fork 171
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
Add the minimum CLI version supported by the template #116
Conversation
It works but it's a very hacky way. Do we have better options? |
@shreyas-goenka if we don't have this hacky solution for CLI version < v0.208.1, what error do we run into? |
Customers using a CLI with version < 0.209 will run into issues once we use enums and start using the selection UI for those prompts. Older versions of the CLI did not deal with multiline prompts correctly for selection type questions and would end up overlaying on top of already printed text. Here's an example of what the experience would look like. I agree that this method is hacky and does not look professional. However, I could not come up with any other alternatives and this is probably the best effort we can do here and the right thing for our customers. We made an oversight by not including versioning right out of the box for templates. I'll defer to your judgement however on whether we should include the hacky deprecation notice. |
Love the music choice for that video 😂 but yeah I see the issue, it doesn't fail gracefully with older versions. Is there any way we can send an interrupt ourselves? |
Cookiecutter has the support of private variable that does not take input from users and has the option to show/not show the private variable values in console output. How about adding similar support in bundles? Either by using a convention in the name, or adding an explicit field. |
@mingyu89 That's a good suggestion and gets rid of the need for a hack. The main hesitation I have with this approach is we should not introduce a new feature to bundle templates (in this case private variables) for it's side effects related to having a smooth migration path here. |
Yeah if it's not a feature we wanted to add, nevermind about it. |
This CLI adds minimum version of the CLI required to use the template. Newer features (eg: #112) used by the stack are not compantible with older CLI versions.
The CLI respects the
min_databricks_cli_version
metadata field and returns an error to the user.Here's the output for a couple different CLI versions:
CLI version >= {min_databricks_cli_version} (in this case v0.209):
Works as expected
CLI version < {min_databricks_cli_version} AND >= v0.208.2 (when support for min_databricks_cli_version was introduced)
CLI version == v0.208.2
Unfortunately we don't have any method to display an error to the users of this version of the CLI.
CLI version <= v0.208.1
Hacky solution to give warnings to users of older CLI versions. This is the best effort we can do. Once the CLI goes GA this hack can be reverted.