forked from opendatahub-io/notebooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(test): provide ability to override versions used in asserts durin…
…g papermill tests Our testing framework had a fundamental issue in that it would, for certain images, naively run the test suite of parent images for a child image. In the case of `tensorflow` images, this caused problems because the (child) `tensorflow` image would **purposefully** _downgraded_ a package version given compatability issues. This fix provides the ability within a child image to specify the proper package version to assert against. The key concept here is the introduction of an (optional) `version_overrides.ini` that can be defined within a given `test/` subfolder for an image. Example format: ``` [minimal] nbdime = 3.6 [datascience] numpy = 1.26 ``` - as a best practice, key names here within a given section are intended to match the relevant python `package` name - but that is by no means a requirement While this file can be **defined** in any `test/` folder - it is presently only honored within the `minimal` and `datascience` images - as they are the "parent" images most likely susceptible to the test framework shortcomings today. For the `datascience` and `minimal` test suites - they now will attempt to load the `version_overrides.ini` file from the current working directory. This file will be copied into the running kubernetes container as part of a new `Makefile` def named `handle_test_version_overrides` **IF THE FILE EXISTS**. The relevant parent test suites will then attempt to load the version to assert against from the `configparser.ConfigParser` instance, falling back to the value we historically had hard-coded. In this manner, child images do **NOT** need to specify a `version_overrides.ini` unless required to do so. Absence of such file would then be identical to current testing behavior. - `handle_test_version_overrides` is present only called if the `validate-datascience` target is going to be invoked Some minor refactoring also was applied to the `Makefile` to reduce the use of "magic strings" - particularly since the introduction of `handle_test_version_overrides` would have required more brittle copy/pasting of hard-coded strings. As such, common values that were historically hard-coded but re-used in multiple places - have now been converted over to be variables. Related-to: https://issues.redhat.com/browse/RHOAIENG-16587
- Loading branch information
1 parent
8a24d01
commit ee21ef4
Showing
29 changed files
with
846 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,6 +128,7 @@ venv/ | |
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
.DS_store | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.