@@ -99,18 +99,20 @@ function _get_accelerator_flavor()
99
99
# Returns the absolute path of notebook resources in the notebooks/ repo based on the notebook name
100
100
#
101
101
# Arguments:
102
- # $1 : Name of the notebook identifier
103
- # $2 : [optional] Subdirectory to append to computed absolute path
102
+ # $1 : Release to test (2024a, 2024n, ...)
103
+ # $2 : Name of the notebook identifier
104
+ # $3 : [optional] Subdirectory to append to computed absolute path
104
105
# - path should NOT start with a leading /
105
106
#
106
107
# Returns:
107
108
# Absolute path to the jupyter notebook directory for the given notebook test target
108
109
function _get_jupyter_notebook_directory()
109
110
{
110
- local notebook_id=" ${1:- } "
111
- local subpath=" ${2:- } "
111
+ local release=" ${1:- } "
112
+ local notebook_id=" ${2:- } "
113
+ local subpath=" ${3:- } "
112
114
113
- local jupyter_base=" ${root_repo_directory} /jupyter"
115
+ local jupyter_base=" ${root_repo_directory} /${release} / jupyter"
114
116
local directory=" ${jupyter_base} /${notebook_id} /${os_flavor} -${python_flavor}${subpath: +" /$subpath " } "
115
117
116
118
printf ' %s' " ${directory} "
@@ -264,11 +266,12 @@ function _create_test_versions_source_of_truth()
264
266
# $1 : Name of the notebook identifier
265
267
function _run_test()
266
268
{
267
- local notebook_id=" ${1:- } "
269
+ local release=" ${1:- } "
270
+ local notebook_id=" ${2:- } "
268
271
269
272
local test_notebook_file=' test_notebook.ipynb'
270
273
local repo_test_directory=
271
- repo_test_directory=" $( _get_jupyter_notebook_directory " ${notebook_id} " " test" ) "
274
+ repo_test_directory=" $( _get_jupyter_notebook_directory " ${release} " " ${ notebook_id}" " test" ) "
272
275
local output_file_prefix=
273
276
output_file_prefix=$( tr ' /' ' -' <<< " ${notebook_id}_${os_flavor}" )
274
277
@@ -323,8 +326,10 @@ function _image_derived_from_datascience()
323
326
# Convenience function that will invoke the minimal and datascience papermill tests against the running notebook workload
324
327
function _test_datascience_notebook()
325
328
{
326
- _run_test " ${jupyter_minimal_notebook_id} "
327
- _run_test " ${jupyter_datascience_notebook_id} "
329
+ local release=" ${1:- } "
330
+
331
+ _run_test " ${release} " " ${jupyter_minimal_notebook_id} "
332
+ _run_test " ${release} " " ${jupyter_datascience_notebook_id} "
328
333
}
329
334
330
335
# Description:
@@ -335,6 +340,7 @@ function _test_datascience_notebook()
335
340
# - All relevant tests based on the notebook_id are invoked
336
341
function _handle_test()
337
342
{
343
+ local release=" ${1:- } "
338
344
local notebook_id=
339
345
340
346
# Due to existing logic - cuda accelerator value needs to be treated as empty string
@@ -369,15 +375,16 @@ function _handle_test()
369
375
" ${kbin} " exec " ${notebook_workload_name} " -- /bin/sh -c " python3 -m pip install papermill"
370
376
371
377
if _image_derived_from_datascience " ${notebook_id} " ; then
372
- _test_datascience_notebook
378
+ _test_datascience_notebook " ${release} "
373
379
fi
374
380
375
381
if [ -n " ${notebook_id} " ] && ! [ " ${notebook_id} " = " ${jupyter_datascience_notebook_id} " ]; then
376
- _run_test " ${notebook_id} "
382
+ _run_test " ${release} " " ${ notebook_id}"
377
383
fi
378
384
}
379
385
380
- test_target=" ${1:- } "
386
+ release=" ${1:- } "
387
+ test_target=" ${2:- } "
381
388
382
389
# Hard-coded list of supported "notebook_id" values - based on notebooks/ repo Makefile
383
390
jupyter_minimal_notebook_id=' minimal'
@@ -410,5 +417,5 @@ _wait_for_workload "${notebook_name}"
410
417
411
418
notebook_workload_name=$( " ${kbin} " get pods -l app=" ${notebook_name} " -o jsonpath=' {.items[0].metadata.name}' )
412
419
413
- _handle_test
420
+ _handle_test " ${release} "
414
421
0 commit comments