databrickslabs / cicd-templates

Manage your Databricks deployments and CI with code.
Other
202 stars 100 forks source link

Error when using dbutils.secrets in Integration tests #42

Closed kiranvasudev closed 3 years ago

kiranvasudev commented 3 years ago

Hello, I would like to write integration tests that need to use one/many Databricks secrets. Unfortunately, for the tests that use dbutils.secrets.get(), the following error message is thrown:

image

This happens when I execute the test when using dbx directly from the command line, as well as when I deploy it as a job on Databricks and launch it from there.

Is there a way that secrets can be accessed when running the tests?

renardeinside commented 3 years ago

Hi @kiranvasudev ! I'll check for options and let you know. I have two ideas, let me check which of them is better :)

renardeinside commented 3 years ago

Hi @kiranvasudev . I can not reproduce this issue in my testing environment (I've tried in 4 different workspaces), for me the dbutils.secrets.get are working pretty fine. Do you still have this issue?

renardeinside commented 3 years ago

Please reopen the issue if the problem preserves.