dbx icon indicating copy to clipboard operation
dbx copied to clipboard

Remove extension check in jinja-variables-file option

Open mrmasterplan opened this issue 2 years ago • 0 comments
trafficstars

Expected Behavior

YAML is a superset of JSON (as long as you quote all your strings). The jinja-variables-file wants to parse the file using the YAML parser. Therefore it should be valid to give it a json file. I want to be able to do --jinja-variables-file=myconfig.json.

Current Behavior

I can actually pass a file --jinja-variables-file=myconfig.json.yml where the contents are a pure json object. The extension is enforced in a check in file dbx\callbacks.py: from line 15: if value.suffix not in [".yaml", ".yml"]: raise.... This check is not necessary.

Steps to Reproduce (for bugs)

Just run the tool as dbx deploy --jinja-variables-file=myconfig.json to see the error.

Context

Your Environment

  • dbx version used: 0.8.11
  • Databricks Runtime version: 9.1

mrmasterplan avatar May 24 '23 10:05 mrmasterplan