Skip to content

Commit 06bb079

Browse files
Merge pull request #87 from getyourguide/better_error_messages
better error messages
2 parents 5739abb + 2cc06a7 commit 06bb079

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog db-rocket
22

3+
## Version 3.0.2
4+
- Add databricks cli configuration check
5+
36
## Version 3.0.1
47
- Add workaround for making --watch command work with --use-volumes
58

rocket/rocket.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,15 @@ def launch(
6868
:param dst_path: Destination path to store the files. Support both dbfs:/ and /Volumes. Ideally, we should use dst_path and deprecate dbfs_path.
6969
:return:
7070
"""
71+
72+
home = os.environ['HOME']
73+
if not os.path.exists(f"{home}/.databrickscfg"):
74+
raise Exception("Databricks cli not configured. Run `databricks configure --token`.")
75+
7176
if os.getenv("DATABRICKS_TOKEN") is None:
7277
raise Exception("DATABRICKS_TOKEN must be set for db-rocket to work")
7378

74-
base_dbfs_access_error_message = ("Please check if your databricks token is set and valid? "
79+
base_dbfs_access_error_message = ("Is your databricks token is set and valid? "
7580
"Try to generate a new token and update existing one with "
7681
"`databricks configure --token`.")
7782
if use_volumes:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setuptools.setup(
1111
name="databricks-rocket",
12-
version="3.0.1",
12+
version="3.0.2",
1313
author="GetYourGuide",
1414
author_email="engineering.data-products@getyourguide.com",
1515
description="Keep your local python scripts installed and in sync with a databricks notebook. Shortens the feedback loop to develop projects using a hybrid enviroment",

0 commit comments

Comments
 (0)