ucx
ucx copied to clipboard
[BUG]: I would like to lint local code, locally, literally
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
If I try to run databricks labs ucx lint-local-code
, it will try to hit a Datarbricks instance via profile. If I don't setup my profile or my token is invalid, it would throw an error:
(.venv) yipman@jasons-mbp-2 flight_delay % databricks labs ucx lint-local-code Which file or directory do you want to lint? (default: /Users/yipman/Downloads/flight_delay/flight_delay): 00:09:06 INFO [d.l.u.framework.utils] Invoking command: ['pip', '--disable-pip-version-check', 'install', '-r', '/Users/yipman/Downloads/flight_delay/flight_delay/requirements.txt', '-t', '/private/var/folders/fz/zkvh37qx3kdcv_8w1sw8kckm0000gn/T/ucx-_qoz88sx'] 00:10:26 INFO [d.l.u.framework.utils] Invoking command: ['pip', '--disable-pip-version-check', 'install', '-r', '/Users/yipman/Downloads/flight_delay/flight_delay/requirements.txt', '-t', '/private/var/folders/fz/zkvh37qx3kdcv_8w1sw8kckm0000gn/T/ucx-_qoz88sx'] 00:10:41 INFO [d.l.u.framework.utils] Invoking command: ['pip', '--disable-pip-version-check', 'install', '-r', '/Users/yipman/Downloads/flight_delay/flight_delay/requirements.txt', '-t', '/private/var/folders/fz/zkvh37qx3kdcv_8w1sw8kckm0000gn/T/ucx-_qoz88sx'] 00:10:55 ERROR [d.l.ucx.lint-local-code] PermissionDenied: Invalid access token. Config: host=https://adb-xxxxxxxxx.azuredatabricks.net, token=***, auth_type=pat. Env: DATABRICKS_HOST, DATABRICKS_TOKEN
Expected Behavior
This command should not attempt to make any external connections and just lint the code locally as the command name suggested.
Steps To Reproduce
(.venv) yipman@jasons-mbp-2 flight_delay % databricks labs ucx lint-local-code Which file or directory do you want to lint? (default: /Users/yipman/Downloads/flight_delay/flight_delay): 00:09:06 INFO [d.l.u.framework.utils] Invoking command: ['pip', '--disable-pip-version-check', 'install', '-r', '/Users/yipman/Downloads/flight_delay/flight_delay/requirements.txt', '-t', '/private/var/folders/fz/zkvh37qx3kdcv_8w1sw8kckm0000gn/T/ucx-_qoz88sx'] 00:10:26 INFO [d.l.u.framework.utils] Invoking command: ['pip', '--disable-pip-version-check', 'install', '-r', '/Users/yipman/Downloads/flight_delay/flight_delay/requirements.txt', '-t', '/private/var/folders/fz/zkvh37qx3kdcv_8w1sw8kckm0000gn/T/ucx-_qoz88sx'] 00:10:41 INFO [d.l.u.framework.utils] Invoking command: ['pip', '--disable-pip-version-check', 'install', '-r', '/Users/yipman/Downloads/flight_delay/flight_delay/requirements.txt', '-t', '/private/var/folders/fz/zkvh37qx3kdcv_8w1sw8kckm0000gn/T/ucx-_qoz88sx'] 00:10:55 ERROR [d.l.ucx.lint-local-code] PermissionDenied: Invalid access token. Config: host=https://adb-xxxxxx.azuredatabricks.net, token=***, auth_type=pat. Env: DATABRICKS_HOST, DATABRICKS_TOKEN
Cloud
Azure
Operating System
macOS
Version
latest via Databricks CLI
Relevant log output
No response