Skip to content

Commit

Permalink
Remove checkTaskValue
Browse files Browse the repository at this point in the history
  • Loading branch information
vsamoilov committed Oct 27, 2023
1 parent 6e3f046 commit 7f3b789
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions databricks/sdk/dbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ class _JobsUtil:

class _TaskValuesUtil:
"""Remote equivalent of task values util"""
values = {}

def get(self, taskKey: str, key: str, default: any = None, debugValue: any = None) -> None:
"""
Expand All @@ -180,13 +179,6 @@ def set(self, key: str, value: any) -> None:
"""
Sets a task value on the current task run
"""
self.values[key] = value

def checkTaskValue(self, key: str, value: any) -> bool:
"""
Check that the task value with given key is equal to the given value
"""
return self.values.get(key) == value

def __init__(self) -> None:
self.taskValues = self._TaskValuesUtil()
Expand Down
6 changes: 0 additions & 6 deletions tests/test_dbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,9 @@ def test_secrets_get_and_redacting_logs(dbutils, mocker):
assert value == 'hello'


def test_jobs_task_values_check_task_value(dbutils):
assert (dbutils.jobs.taskValues.checkTaskValue('key', 'value') == False)


def test_jobs_task_values_set(dbutils):
dbutils.jobs.taskValues.set('key', 'value')

assert dbutils.jobs.taskValues.checkTaskValue('key', 'value')


def test_jobs_task_values_get(dbutils):
assert dbutils.jobs.taskValues.get('taskKey', 'key', debugValue='debug') == 'debug'
Expand Down

0 comments on commit 7f3b789

Please sign in to comment.