Skip to content

Ensure that python dependencies are installed during upgrade - #1390

Merged
nfx merged 2 commits into
databricks:mainfrom
jimidle:feature/1276
Apr 24, 2024
Merged

Ensure that python dependencies are installed during upgrade#1390
nfx merged 2 commits into
databricks:mainfrom
jimidle:feature/1276

Conversation

@jimidle

@jimidlejimidle commented Apr 22, 2024

Copy link
Copy Markdown
Contributor

Changes

The installer.Upgrade() processing did not install Python dependencies. This resulted in errors such as:

ModuleNotFoundError: No module named 'databricks.labs.blueprint'

Any new dependencies are now installed during the upgrade process.

Resolves: databrickslabs/ucx#1276

Tests

The TestUpgraderWorksForReleases test now checks to see if the upgrade process resulted in the dependencies being installed.

 - Adds a stub to intercept the python -m pip install . command
- Checks that the dependency install was in fact run in the upgrade process
Signed-off-by: Jim.Idle <jimi@idle.ws>
@jimidle
jimidle marked this pull request as ready for review April 24, 2024 17:16
@nfx
nfx self-requested a review April 24, 2024 17:23
nfx
nfx approved these changes Apr 24, 2024

@nfxnfx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

Comment threadcmd/labs/project/installer.go
@codecov-commenter

codecov-commenter commented Apr 24, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 52.88%. Comparing base (e22dd8a) to head (0bd42af).
Report is 83 commits behind head on main.

FilesPatch %Lines
cmd/labs/project/installer.go25.00%2 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #1390 +/- ##
==========================================
+ Coverage 52.25% 52.88% +0.63% 
==========================================
Files 317 338 +21 Lines 18004 19532 +1528 ==========================================
+ Hits 9408 10330 +922 - Misses 7903 8436 +533 - Partials 693 766 +73 

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

@nfx
nfx added this pull request to the merge queueApr 24, 2024
Merged via the queue into databricks:main with commit 4c71f8cApr 24, 2024
pietern added a commit that referenced this pull request Apr 25, 2024
This is a bugfix release.
CLI:
* Pass `DATABRICKS_CONFIG_FILE` for `auth profiles` ([#1394](#1394)).
Bundles:
* Show a better error message for using wheel tasks with older DBR versions ([#1373](#1373)).
* Allow variable references in non-string fields in the JSON schema ([#1398](#1398)).
* Fix variable overrides in targets for non-string variables ([#1397](#1397)).
* Fix bundle schema for variables ([#1396](#1396)).
* Fix bundle documentation URL ([#1399](#1399)).
Internal:
* Removed autogenerated docs for the CLI commands ([#1392](#1392)).
* Remove `JSON.parse` call from homebrew-tap action ([#1393](#1393)).
* Ensure that Python dependencies are installed during upgrade ([#1390](#1390)).
@pieternpietern mentioned this pull request Apr 25, 2024
github-merge-queueBot pushed a commit that referenced this pull request Apr 25, 2024
This is a bugfix release.
CLI:
* Pass `DATABRICKS_CONFIG_FILE` for `auth profiles`
([#1394](#1394)).
Bundles:
* Show a better error message for using wheel tasks with older DBR
versions ([#1373](#1373)).
* Allow variable references in non-string fields in the JSON schema
([#1398](#1398)).
* Fix variable overrides in targets for non-string variables
([#1397](#1397)).
* Fix bundle schema for variables
([#1396](#1396)).
* Fix bundle documentation URL
([#1399](#1399)).
Internal:
* Removed autogenerated docs for the CLI commands
([#1392](#1392)).
* Remove `JSON.parse` call from homebrew-tap action
([#1393](#1393)).
* Ensure that Python dependencies are installed during upgrade
([#1390](#1390)).
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
The installer.Upgrade() processing did not install Python dependencies.
This resulted in errors such as:
```
ModuleNotFoundError: No module named 'databricks.labs.blueprint'
```
Any new dependencies are now installed during the upgrade process.
Resolves: databrickslabs/ucx#1276
## Tests
The TestUpgraderWorksForReleases test now checks to see if the upgrade
process resulted in the dependencies being installed.
---------
Signed-off-by: Jim.Idle <jimi@idle.ws>
denik pushed a commit that referenced this pull request May 20, 2026
This is a bugfix release.
CLI:
* Pass `DATABRICKS_CONFIG_FILE` for `auth profiles`
([#1394](#1394)).
Bundles:
* Show a better error message for using wheel tasks with older DBR
versions ([#1373](#1373)).
* Allow variable references in non-string fields in the JSON schema
([#1398](#1398)).
* Fix variable overrides in targets for non-string variables
([#1397](#1397)).
* Fix bundle schema for variables
([#1396](#1396)).
* Fix bundle documentation URL
([#1399](#1399)).
Internal:
* Removed autogenerated docs for the CLI commands
([#1392](#1392)).
* Remove `JSON.parse` call from homebrew-tap action
([#1393](#1393)).
* Ensure that Python dependencies are installed during upgrade
([#1390](#1390)).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Upgrade not working from 0.8.0: ModuleNotFoundError: No module named 'databricks.labs.blueprint'

3 participants

@jimidle@codecov-commenter@nfx