a bunch of wip code

This commit is contained in:
Shreyas Goenka 2025-02-28 11:26:17 +01:00
parent 31360440e4
commit 55a9368ef2
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
14 changed files with 68 additions and 18 deletions

View File

@ -32,6 +32,7 @@ import (
"github.com/stretchr/testify/require"
)
// TODO: Unset auth type as well.
var (
KeepTmp bool
NoRepl bool

View File

@ -1,14 +1,11 @@
>>> errcode [CLI] bundle deploy
Building whl1...
Building whl2...
Error: Duplicate local library names: my_default_python-0.0.1-py3-none-any.whl
at resources.jobs.test.tasks[0].libraries[0].whl
resources.jobs.test.tasks[1].libraries[0].whl
in databricks.yml:36:15
databricks.yml:45:15
Error: build failed whl1, error: exit status 1, output: Traceback (most recent call last):
File "[TMPDIR]/whl1/setup.py", line 1, in <module>
from setuptools import setup, find_packages
ModuleNotFoundError: No module named 'setuptools'
Local library names must be unique but found libraries with the same name: whl1/dist/my_default_python-0.0.1-py3-none-any.whl, whl2/dist/my_default_python-0.0.1-py3-none-any.whl
Exit code: 1

View File

@ -1,10 +1,11 @@
>>> errcode [CLI] bundle deploy
Building whl1...
Building whl2...
Uploading [package name]
Uploading [package name]
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/unique_name_libraries/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Error: build failed whl1, error: exit status 1, output: Traceback (most recent call last):
File "[TMPDIR]/whl1/setup.py", line 1, in <module>
from setuptools import setup, find_packages
ModuleNotFoundError: No module named 'setuptools'
Exit code: 1

View File

@ -68,7 +68,7 @@
10:07:59 Debug: Apply pid=12345 mutator=metadata.AnnotatePipelines
10:07:59 Debug: Apply pid=12345 mutator=terraform.Initialize
10:07:59 Debug: Using Terraform from DATABRICKS_TF_EXEC_PATH at [TERRAFORM] pid=12345 mutator=terraform.Initialize
10:07:59 Debug: Using Terraform CLI config from DATABRICKS_TF_CLI_CONFIG_FILE at [DATABRICKS_TF_CLI_CONFIG_FILE] pid=12345 mutator=terraform.Initialize
10:07:59 Debug: DATABRICKS_TF_PROVIDER_VERSION as 1.62.0 does not match the current version 1.65.1, ignoring DATABRICKS_TF_CLI_CONFIG_FILE pid=12345 mutator=terraform.Initialize
10:07:59 Debug: Environment variables for Terraform: ...redacted... pid=12345 mutator=terraform.Initialize
10:07:59 Debug: Apply pid=12345 mutator=scripts.postinit
10:07:59 Debug: No script defined for postinit, skipping pid=12345 mutator=scripts.postinit

View File

@ -0,0 +1,3 @@
[myprofile]
host = https://test@non-existing-subdomain.databricks.com
token = dapi1234

View File

@ -0,0 +1,11 @@
>>> [CLI] auth describe -p myprofile
Unable to authenticate: Get "https://non-existing-subdomain.databricks.com/api/2.0/preview/scim/v2/Me": (redacted)
-----
Current configuration:
✓ host: https://non-existing-subdomain.databricks.com (from .databrickscfg config file)
✓ token: ******** (from .databrickscfg config file)
✓ profile: myprofile (from --profile flag)
✓ config_file: .databrickscfg (from DATABRICKS_CONFIG_FILE environment variable)
✓ databricks_cli_path: [CLI]
✓ auth_type: pat

View File

@ -0,0 +1,5 @@
export DATABRICKS_HOST=""
export DATABRICKS_TOKEN=""
export DATABRICKS_CONFIG_FILE=".databrickscfg"
trace $CLI auth describe -p myprofile

View File

@ -0,0 +1,3 @@
[myprofile]
host = https://test@non-existing-subdomain.databricks.com
token = dapi1234

View File

@ -0,0 +1,5 @@
bundle:
name: foobar
targets:
foo:

View File

@ -0,0 +1,6 @@
>>> [CLI] auth describe -p myprofile -t foo
Unable to authenticate: Get "https://non-existing-subdomain.databricks.com/api/2.0/preview/scim/v2/Me": (redacted)
-----
Current configuration:
✓ profile: myprofile (from --profile flag)

View File

@ -0,0 +1,19 @@
export DATABRICKS_HOST=""
export DATABRICKS_TOKEN=""
export DATABRICKS_CONFIG_FILE=".databrickscfg"
trace $CLI auth describe -p myprofile -t foo
# TODO CONTINUE:
# Is this diff bad? Why not describe where the host is being from any longer?
# ->>> [CLI] auth describe -p myprofile
# +>>> [CLI] auth describe -p myprofile -t foo
# Unable to authenticate: Get "https://non-existing-subdomain.databricks.com/api/2.0/preview/scim/v2/Me": (redacted)
# @@ -5,8 +5,3 @@
# Current configuration:
# - ✓ host: https://non-existing-subdomain.databricks.com (from .databrickscfg config file)
# - ✓ token: ******** (from .databrickscfg config file)
# ✓ profile: myprofile (from --profile flag)
# - ✓ config_file: .databrickscfg (from DATABRICKS_CONFIG_FILE environment variable)
# - ✓ databricks_cli_path: [CLI]
# - ✓ auth_type: pat

View File

@ -0,0 +1 @@
Badness = "The profile is coming from the --flag, not the bundle. This is a bug because auth describe attributes it to the bundle."

View File

@ -1,5 +1,3 @@
Badness = "The profile is coming from the environment variable, not the bundle. This is a bug because auth describe attributes it to the bundle."
[[Repls]]
Old='Get "https://non-existing-subdomain.databricks.com/api/2.0/preview/scim/v2/Me": .*'
New='Get "https://non-existing-subdomain.databricks.com/api/2.0/preview/scim/v2/Me": (redacted)'