ucx icon indicating copy to clipboard operation
ucx copied to clipboard

[BUG]: lint-local-code doesn't catch /mnt/ calls inside a function

Open william-conti opened this issue 11 months ago • 3 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current Behavior

Current code looks like the following:

%run ./_other_otebook
path = searchPath('/mnt/mnt_datalake_something/', rep) # searchPath is in other_notebook

However lint-local-code does not identify that /mnt/mnt_datalake_something is deprecated.

Expected Behavior

No response

Steps To Reproduce

No response

Cloud

AWS

Operating System

macOS

Version

latest via Databricks CLI

Relevant log output


william-conti avatar Feb 14 '25 13:02 william-conti

@william-conti : Could you share the implementation of the searchPath?

We lint the code for known ways to access the DBFS, see this.

First hunch:

  • Either UCX does not include searchPath correctly
  • Or searchPath accesses the DBFS through a method that we do not lint

JCZuurmond avatar Feb 17 '25 13:02 JCZuurmond

@william-conti can you help us create a unit test that fails for this scenario?

gueniai avatar Feb 18 '25 19:02 gueniai

@gueniai here's a failed test -> https://github.com/databrickslabs/ucx/pull/3716

william-conti avatar Feb 19 '25 09:02 william-conti