Skip to content

Commit

Permalink
update python from 3.7 to 3.12
Browse files Browse the repository at this point in the history
Signed-off-by: juliusvonkohout <[email protected]>
  • Loading branch information
juliusvonkohout authored and Julius von Kohout (Corporate Development) committed Aug 21, 2024
1 parent 0d3e79a commit e626684
Show file tree
Hide file tree
Showing 148 changed files with 312 additions and 323 deletions.
24 changes: 9 additions & 15 deletions backend/api/v1beta1/python_http_client/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,18 @@ stages:
- pip install -r test-requirements.txt
- pytest --cov=kfp_server_api

nosetest-2.7:
extends: .nosetest
image: python:2.7-alpine
nosetest-3.3:
nosetest-3.8:
extends: .nosetest
image: python:3.3-alpine
nosetest-3.4:
image: python:3.8-alpine
nosetest-3.9:
extends: .nosetest
image: python:3.4-alpine
nosetest-3.5:
image: python:3.9-alpine
nosetest-3.10:
extends: .nosetest
image: python:3.5-alpine
nosetest-3.6:
image: python:3.10-alpine
nosetest-3.11:
extends: .nosetest
image: python:3.6-alpine
image: python:3.11-alpine
nosetest-3.7:
extends: .nosetest
image: python:3.7-alpine
nosetest-3.8:
extends: .nosetest
image: python:3.8-alpine
image: python:3.12-alpine
25 changes: 10 additions & 15 deletions backend/api/v2beta1/python_http_client/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,19 @@ stages:
- pip install -r test-requirements.txt
- pytest --cov=kfp_server_api

nosetest-2.7:
extends: .nosetest
image: python:2.7-alpine
nosetest-3.3:
nosetest-3.8:
extends: .nosetest
image: python:3.3-alpine
nosetest-3.4:
image: python:3.8-alpine
nosetest-3.9:
extends: .nosetest
image: python:3.4-alpine
nosetest-3.5:
image: python:3.9-alpine
nosetest-3.10:
extends: .nosetest
image: python:3.5-alpine
nosetest-3.6:
image: python:3.10-alpine
nosetest-3.11:
extends: .nosetest
image: python:3.6-alpine
image: python:3.11-alpine
nosetest-3.7:
extends: .nosetest
image: python:3.7-alpine
nosetest-3.8:
extends: .nosetest
image: python:3.8-alpine
image: python:3.12-alpine

8 changes: 4 additions & 4 deletions backend/src/apiserver/resource/resource_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3512,15 +3512,15 @@ spec:
- name: ENABLE_CACHING
valueFrom:
fieldRef: {fieldPath: 'metadata.labels[''pipelines.kubeflow.org/enable_caching'']'}
- {name: KFP_V2_IMAGE, value: 'python:3.7'}
- {name: KFP_V2_IMAGE, value: 'python:3.12'}
- {name: KFP_V2_RUNTIME_INFO, value: '{"inputParameters": {"num_steps": {"type":
"INT"}}, "inputArtifacts": {"dataset": {"metadataPath": "/tmp/inputs/dataset/data",
"schemaTitle": "system.Dataset", "instanceSchema": ""}}, "outputParameters":
{}, "outputArtifacts": {"model": {"schemaTitle": "system.Model", "instanceSchema":
"", "metadataPath": "/tmp/outputs/model/data"}}}'}
envFrom:
- configMapRef: {name: metadata-grpc-configmap, optional: true}
image: python:3.7
image: python:3.12
volumeMounts:
- {mountPath: /kfp-launcher, name: kfp-launcher}
inputs:
Expand Down Expand Up @@ -4044,7 +4044,7 @@ deploymentSpec:
_parsed_args = vars(_parser.parse_args())
_outputs = hello_world(**_parsed_args)
image: python:3.7
image: python:3.12
pipelineInfo:
name: hello-world
root:
Expand Down Expand Up @@ -4077,7 +4077,7 @@ deploymentSpec:
executors:
exec-hello-world:
container:
image: python:3.7
image: python:3.12
pipelineInfo:
name: pipelines/p1/versions/v1
root:
Expand Down
12 changes: 6 additions & 6 deletions backend/src/apiserver/server/pipeline_upload_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ deploymentSpec:
_parsed_args = vars(_parser.parse_args())
_outputs = hello_world(**_parsed_args)
image: python:3.7
image: python:3.12
pipelineInfo:
name: hello-world
root:
Expand Down Expand Up @@ -724,7 +724,7 @@ deploymentSpec:
_parsed_args = vars(_parser.parse_args())
_outputs = hello_world(**_parsed_args)
image: python:3.7
image: python:3.12
pipelineInfo:
name: hello-world
root:
Expand Down Expand Up @@ -765,7 +765,7 @@ deploymentSpec:
executors:
exec-hello-world:
container:
image: python:3.7
image: python:3.12
pipelineInfo:
name: hello-world-
root:
Expand All @@ -790,7 +790,7 @@ deploymentSpec:
executors:
exec-hello-world:
container:
image: python:3.7
image: python:3.12
pipelineInfo:
name: hEllo-world
root:
Expand All @@ -815,7 +815,7 @@ deploymentSpec:
executors:
exec-hello-world:
container:
image: python:3.7
image: python:3.12
pipelineInfo:
name: more than 128 characters more than 128 characters more than 128 characters more than 128 characters more than 128 characters
root:
Expand All @@ -840,7 +840,7 @@ deploymentSpec:
executors:
exec-hello-world:
container:
image: python:3.7
image: python:3.12
pipelineInfo:
name: hello-worl.d
root:
Expand Down
6 changes: 3 additions & 3 deletions backend/src/apiserver/server/test/pipeline_with_volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ deploymentSpec:
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef comp():\n pass\n\n"
image: python:3.7
image: python:3.12
exec-comp-2:
container:
args:
Expand All @@ -92,7 +92,7 @@ deploymentSpec:
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef comp():\n pass\n\n"
image: python:3.7
image: python:3.12
exec-comp-3:
container:
args:
Expand All @@ -118,7 +118,7 @@ deploymentSpec:
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef comp():\n pass\n\n"
image: python:3.7
image: python:3.12
exec-createpvc:
container:
image: argostub/createpvc
Expand Down
2 changes: 1 addition & 1 deletion backend/src/apiserver/server/test/v2-hello-world.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"program_path=$(mktemp)\nprintf \"%s\" \"$0\" > \"$program_path\"\npython3 -u \"$program_path\" \"$@\"\n",
"def hello_world(text):\n print(text)\n return text\n\nimport argparse\n_parser = argparse.ArgumentParser(prog='Hello world', description='')\n_parser.add_argument(\"--text\", dest=\"text\", type=str, required=True, default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\n_outputs = hello_world(**_parsed_args)\n"
],
"image": "python:3.7"
"image": "python:3.12"
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions backend/src/apiserver/server/test/xgboost_sample_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ deploymentSpec:
\ try:\n os.makedirs(os.path.dirname(output_file))\n except\
\ OSError:\n pass\n with open(output_file, 'w') as f:\n \
\ f.write(_output_serializers[idx](_outputs[idx]))\n"
image: python:3.7
image: python:3.12
exec-xgboost-predict:
container:
args:
Expand Down Expand Up @@ -344,7 +344,7 @@ deploymentSpec:
_parser.add_argument(\"--predictions\", dest=\"predictions_path\", type=_make_parent_dirs_and_return_path,\
\ required=True, default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_predict(**_parsed_args)\n"
image: python:3.7
image: python:3.12
exec-xgboost-predict-2:
container:
args:
Expand Down Expand Up @@ -398,7 +398,7 @@ deploymentSpec:
predictions_path\", type=_make_parent_dirs_and_return_path, required=True,\
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_predict(**_parsed_args)\n"
image: python:3.7
image: python:3.12
exec-xgboost-predict-3:
container:
args:
Expand Down Expand Up @@ -452,7 +452,7 @@ deploymentSpec:
predictions_path\", type=_make_parent_dirs_and_return_path, required=True,\
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_predict(**_parsed_args)\n"
image: python:3.7
image: python:3.12
exec-xgboost-predict-4:
container:
args:
Expand Down Expand Up @@ -503,7 +503,7 @@ deploymentSpec:
_parser.add_argument(\"--predictions\", dest=\"predictions_path\", type=_make_parent_dirs_and_return_path,\
\ required=True, default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_predict(**_parsed_args)\n"
image: python:3.7
image: python:3.12
exec-xgboost-train:
container:
args:
Expand Down Expand Up @@ -620,7 +620,7 @@ deploymentSpec:
, dest=\"model_config_path\", type=_make_parent_dirs_and_return_path, required=True,\
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_train(**_parsed_args)\n"
image: python:3.7
image: python:3.12
exec-xgboost-train-2:
container:
args:
Expand Down Expand Up @@ -737,7 +737,7 @@ deploymentSpec:
, dest=\"model_config_path\", type=_make_parent_dirs_and_return_path, required=True,\
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_train(**_parsed_args)\n"
image: python:3.7
image: python:3.12
pipelineInfo:
name: xgboost-sample-pipeline
root:
Expand Down
2 changes: 1 addition & 1 deletion backend/src/apiserver/storage/pipeline_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,7 @@ executors:
_parsed_args = vars(_parser.parse_args())
_outputs = hello_world(**_parsed_args)
image: python:3.7
image: python:3.12
pipelineInfo:
name: hello-world
root:
Expand Down
2 changes: 1 addition & 1 deletion backend/src/apiserver/template/testdata/hello_world.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ deploymentSpec:
_parsed_args = vars(_parser.parse_args())
_outputs = hello_world(**_parsed_args)
image: python:3.7
image: python:3.12
pipelineInfo:
name: namespace/n1/pipeline/hello-world
root:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ deploymentSpec:
_parsed_args = vars(_parser.parse_args())
_outputs = hello_world(**_parsed_args)
image: python:3.7
image: python:3.12
pipelineInfo:
name: hello-world
root:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ deploymentSpec:
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef comp():\n pass\n\n"
image: python:3.7
image: python:3.12
exec-comp-2:
container:
args:
Expand All @@ -94,7 +94,7 @@ deploymentSpec:
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef comp():\n pass\n\n"
image: python:3.7
image: python:3.12
exec-comp-3:
container:
args:
Expand All @@ -120,7 +120,7 @@ deploymentSpec:
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef comp():\n pass\n\n"
image: python:3.7
image: python:3.12
exec-createpvc:
container:
image: argostub/createpvc
Expand Down
14 changes: 7 additions & 7 deletions backend/src/cache/server/mutation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var (
Command: []string{"python"},
Env: []corev1.EnvVar{{
Name: ArgoWorkflowTemplateEnvKey,
Value: `{"name": "Does not matter","container":{"command":["echo", "Hello"],"image":"python:3.7"}}`,
Value: `{"name": "Does not matter","container":{"command":["echo", "Hello"],"image":"python:3.12"}}`,
}},
},
},
Expand Down Expand Up @@ -171,7 +171,7 @@ func TestMutatePodIfCachedWithCacheEntryExist(t *testing.T) {
executionCache := &model.ExecutionCache{
ExecutionCacheKey: "f5fe913be7a4516ebfe1b5de29bcb35edd12ecc776b2f33f10ca19709ea3b2f0",
ExecutionOutput: "testOutput",
ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.7"}}`,
ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.12"}}`,
MaxCacheStaleness: -1,
}
fakeClientManager.CacheStore().CreateExecutionCache(executionCache)
Expand All @@ -190,7 +190,7 @@ func TestDefaultImage(t *testing.T) {
executionCache := &model.ExecutionCache{
ExecutionCacheKey: "f5fe913be7a4516ebfe1b5de29bcb35edd12ecc776b2f33f10ca19709ea3b2f0",
ExecutionOutput: "testOutput",
ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.7"}}`,
ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.12"}}`,
MaxCacheStaleness: -1,
}
fakeClientManager.CacheStore().CreateExecutionCache(executionCache)
Expand All @@ -209,7 +209,7 @@ func TestSetImage(t *testing.T) {
executionCache := &model.ExecutionCache{
ExecutionCacheKey: "f5fe913be7a4516ebfe1b5de29bcb35edd12ecc776b2f33f10ca19709ea3b2f0",
ExecutionOutput: "testOutput",
ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.7"}}`,
ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.12"}}`,
MaxCacheStaleness: -1,
}
fakeClientManager.CacheStore().CreateExecutionCache(executionCache)
Expand All @@ -226,7 +226,7 @@ func TestCacheNodeRestriction(t *testing.T) {
executionCache := &model.ExecutionCache{
ExecutionCacheKey: "f5fe913be7a4516ebfe1b5de29bcb35edd12ecc776b2f33f10ca19709ea3b2f0",
ExecutionOutput: "testOutput",
ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.7"},"nodeSelector":{"disktype":"ssd"}}`,
ExecutionTemplate: `{"container":{"command":["echo", "Hello"],"image":"python:3.12"},"nodeSelector":{"disktype":"ssd"}}`,
MaxCacheStaleness: -1,
}
fakeClientManager.CacheStore().CreateExecutionCache(executionCache)
Expand All @@ -241,7 +241,7 @@ func TestMutatePodIfCachedWithTeamplateCleanup(t *testing.T) {
executionCache := &model.ExecutionCache{
ExecutionCacheKey: "5a20e3f2e74863b363291953082d9812a58e25f7117bface1c76d40ef0ee88fc",
ExecutionOutput: "testOutput",
ExecutionTemplate: `Cache key was calculated from this: {"container":{"command":["echo", "Hello"],"image":"python:3.7"},"outputs":"anything"}`,
ExecutionTemplate: `Cache key was calculated from this: {"container":{"command":["echo", "Hello"],"image":"python:3.12"},"outputs":"anything"}`,
MaxCacheStaleness: -1,
}
fakeClientManager.CacheStore().CreateExecutionCache(executionCache)
Expand All @@ -253,7 +253,7 @@ func TestMutatePodIfCachedWithTeamplateCleanup(t *testing.T) {
"name": "Does not matter",
"metadata": "anything",
"container": {
"image": "python:3.7",
"image": "python:3.12",
"command": ["echo", "Hello"]
},
"outputs": "anything",
Expand Down
Loading

0 comments on commit e626684

Please sign in to comment.