-
Notifications
You must be signed in to change notification settings - Fork 68
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
Restore variable file tests #2220
Conversation
Windows failed due to slashes, can you try adding |
# title "file cannot be parsed" | ||
# trace errcode $CLI bundle validate -o json --target invalid_json | jq $cluster_expr | ||
title "file cannot be parsed" | ||
trace errcode $CLI bundle validate -o json --target invalid_json | jq $cluster_expr | sed 's/\\/\//g' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be fixed with:
trace errcode $CLI bundle validate -o json --target invalid_json 2>&1 | sed 's/\\/\//g'
The jq expression is not needed because the command fails. The error is written to stderr so we need a redirect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The jq expression is not needed because the command fails
Otherwise it will print all json output in addition to the error, example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use Repls instead of sed? See example: https://github.com/databricks/cli/blob/main/acceptance/selftest/test.toml#L17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use Repls instead of sed? See example: https://github.com/databricks/cli/blob/main/acceptance/selftest/test.toml#L17
Looks good, let me try
# Fix for windows | ||
[[Repls]] | ||
Old = '\$TMPDIR\\.databricks\\bundle\\wrong_file_structure\\variable-overrides.json' | ||
New = '$TMPDIR/.databricks/bundle/wrong_file_structure/variable-overrides.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The $
is interpreted as a reference to match. You can indicate a $
literal with $$
:
Changes
Uncomment flaky tests, they work properly with latest changes from main
Tests