Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Advice with source location #1447

Conversation

ericvergnaud
Copy link
Contributor

Changes

Enhance Advice with source type and location

Linked issues

Resolves #1444

Functionality

  • added relevant user documentation
  • added new CLI command
  • modified existing command: databricks labs ucx ...
  • added a new workflow
  • modified existing workflow: ...
  • added a new table
  • modified existing table: ...

Tests

  • manually tested
  • added unit tests
  • added integration tests
  • verified on staging environment (screenshot attached)

@ericvergnaud ericvergnaud requested review from a team and HariGS-DB April 18, 2024 14:50
@ericvergnaud
Copy link
Contributor Author

I'll be adding tests as part of #1431 and #1439

code: str
message: str
source_type: str
source_path: str
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should keep WHAT (e.g. deprecation) problem we have from WHERE (e.g. notebook or a file) that problem is.

@dataclass
class NotebookAdvice:
  path: str
  advice: list[Advice]

@dataclass
class FileAdvice:
  path: str
  advice: list[Advice]

that being said, we may need another datastructure to map onto a database table, but it should have Job ID and Job Name as well and most likely live within the assessment package:

@dataclass
class WorkloadAdvice:
  workflow_id: int
  workflow_name: str
  object_type: string
  object_path: string # alternatively, object_id, to make links easier
  code: str
  message: str
  line: int

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment in #1448

@ericvergnaud ericvergnaud requested a review from nfx April 19, 2024 08:44
@nfx nfx added the pr/do-not-merge this pull request is not ready to merge label Apr 19, 2024
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.29%. Comparing base (b2a11cf) to head (bc2dcf8).
Report is 108 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1447      +/-   ##
==========================================
- Coverage   90.02%   88.29%   -1.74%     
==========================================
  Files          62       77      +15     
  Lines        7430     9380    +1950     
  Branches     1335     1658     +323     
==========================================
+ Hits         6689     8282    +1593     
- Misses        470      731     +261     
- Partials      271      367      +96     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@nfx nfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not modify Advice.

@ericvergnaud
Copy link
Contributor Author

superseded by #1529

@ericvergnaud ericvergnaud deleted the enhance-advice-with-source-location branch April 24, 2024 13:03
nfx pushed a commit that referenced this pull request Apr 24, 2024
…dencies (#1529)

## Changes
Create a DependencyProblem class, than can later be converted to Advice
Whenever a problem is encountered, 

### Linked issues
#1202
Resolves #1444
Resolves #1431
Resolves #1439

### Functionality 

- [ ] added relevant user documentation
- [ ] added new CLI command
- [ ] modified existing command: `databricks labs ucx ...`
- [ ] added a new workflow
- [ ] modified existing workflow: `...`
- [ ] added a new table
- [ ] modified existing table: `...`

### Tests

- [ ] manually tested
- [x] added unit tests
- [ ] added integration tests
- [ ] verified on staging environment (screenshot attached)


Supersedes PRs #1447 and #1448
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/do-not-merge this pull request is not ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Enhance Advice records with source location
2 participants