spring-cloud-dataflow
spring-cloud-dataflow copied to clipboard
Task schedule is not using the version defined in the properties file
Description:
A schedule task is not using the version defined in the properties file. Whereas a launch using the same properties file is well using the app version.
Tested using the scdf shell.
Release versions:
{
"versions": {
"implementation": {
"name": "spring-cloud-dataflow-server",
"version": "2.11.2"
},
"core": {
"name": "Spring Cloud Data Flow Core",
"version": "2.11.2"
},
"dashboard": {
"name": "Spring Cloud Dataflow UI",
"version": "3.4.2"
},
"shell": {
"name": "Spring Cloud Data Flow Shell",
"version": "2.11.2",
"url": "https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-dataflow-shell/2.11.2/spring-cloud-dataflow-shell-2.11.2.jar"
}
},
"features": {
"streams": true,
"tasks": true,
"schedules": true,
"monitoringDashboardType": "NONE"
},
"runtimeEnvironment": {
"appDeployer": {
"deployerImplementationVersion": "2.11.2",
"deployerName": "Spring Cloud Skipper Server",
"deployerSpiVersion": "2.11.2",
"javaVersion": "11.0.19",
"platformApiVersion": "",
"platformClientVersion": "",
"platformHostVersion": "",
"platformSpecificInfo": {
"delta": "kubernetes",
"default": "kubernetes",
"beta": "kubernetes"
},
"platformType": "Skipper Managed",
"springBootVersion": "2.7.18",
"springVersion": "5.3.31"
},
"taskLaunchers": [
{
"deployerImplementationVersion": "unknown",
"deployerName": "KubernetesTaskLauncher",
"deployerSpiVersion": "unknown",
"javaVersion": "11.0.19",
"platformApiVersion": "v1",
"platformClientVersion": "unknown",
"platformHostVersion": "unknown",
"platformSpecificInfo": {
"namespace": "opportal-pro-search",
"master-url": "https://10.0.0.1:443/"
},
"platformType": "Kubernetes",
"springBootVersion": "2.7.18",
"springVersion": "5.3.31"
},
{
"deployerImplementationVersion": "unknown",
"deployerName": "KubernetesTaskLauncher",
"deployerSpiVersion": "unknown",
"javaVersion": "11.0.19",
"platformApiVersion": "v1",
"platformClientVersion": "unknown",
"platformHostVersion": "unknown",
"platformSpecificInfo": {
"namespace": "opportal-test-search",
"master-url": "https://10.0.0.1:443/"
},
"platformType": "Kubernetes",
"springBootVersion": "2.7.18",
"springVersion": "5.3.31"
},
{
"deployerImplementationVersion": "unknown",
"deployerName": "KubernetesTaskLauncher",
"deployerSpiVersion": "unknown",
"javaVersion": "11.0.19",
"platformApiVersion": "v1",
"platformClientVersion": "unknown",
"platformHostVersion": "unknown",
"platformSpecificInfo": {
"namespace": "opportal-test-search",
"master-url": "https://10.0.0.1:443/"
},
"platformType": "Kubernetes",
"springBootVersion": "2.7.18",
"springVersion": "5.3.31"
}
]
},
"monitoringDashboardInfo": {
"url": "",
"source": "default-scdf-source",
"refreshInterval": 15
},
"security": {
"isAuthentication": false,
"isAuthenticated": false,
"username": null,
"roles": []
},
"git": {
"commit": "86b53e0"
}
}
Steps to reproduce:
Schedule a task with a specific version
version.<label-name>=<version>
Describe the cronjob, the container image is not using the version.
Which versions of which app are registered?
curl -s http://localhost:9393/apps/task/timestamp?exhaustive=true | jq .
{
"name": "timestamp",
"type": "task",
"uri": "docker:springcloudtask/timestamp-task:2.0.2",
"version": "2.0.2",
"defaultVersion": true,
"bootVersion": "2",
"versions": null,
"label": null,
"options": [],
"shortDescription": null,
"inboundPortNames": [],
"outboundPortNames": [],
"optionGroups": {}
}
AND then for non-default versions
curl -s http://localhost:9393/apps/task/timestamp/3.0.0?exhaustive=true | jq .
{
"name": "timestamp",
"type": "task",
"uri": "docker:springcloudtask/timestamp-task:3.0.0",
"version": "3.0.0",
"defaultVersion": false,
"bootVersion": "3",
"versions": null,
"label": null,
"options": [],
"shortDescription": null,
"inboundPortNames": [],
"outboundPortNames": [],
"optionGroups": {}
}
@corneil @herdin
In the case of task launch, if I specify version.<app-name>=<versionWhatIWant> as the deployer property,
use the specified version regardless of the default version.
But the schedule is not. Is it a bug or is it intended?
Any update for this case ? I deploy in k8s and meet same problem ? It's seems spam if create one app with one version for run scheduler Or I always run with same docker image tags :(.
@corneil When creating a schedule task using shell, the version is not set. It's said to have been fixed on https://github.com/spring-cloud/spring-cloud-dataflow-ui/issues/1974 , but it's not working. I'm using Helm Chart 26.8.1, App version 2.11.2.
shell
task schedule create --name sample-schedule --definitionName sample-task --expression "*/1 * * * *" --properties "version.sample=v2.0.0"
curl app version
curl -s "http://localhost:8080/apps/task/sample?exhaustive=true" | jq .
{
"name": "sample",
"type": "task",
"uri": "docker://.../sample:latest",
"version": "latest",
"defaultVersion": true,
"bootVersion": "3",
"versions": null,
"label": null,
"options": [],
"shortDescription": null,
"inboundPortNames": [],
"outboundPortNames": [],
"optionGroups": {}
curl -s "http://localhost:8080/apps/task/sample/v2.0.0?exhaustive=true" | jq .
{
"name": "sample",
"type": "task",
"uri": "docker://.../sample:v2.0.0",
"version": "v2.0.0",
"defaultVersion": false,
"bootVersion": "3",
"versions": null,
"label": null,
"options": [],
"shortDescription": null,
"inboundPortNames": [],
"outboundPortNames": [],
"optionGroups": {}
}
kubectl describe cronjob
no response.. so sad.. :(
Apologies for not following up on this. I'll start taking a peak at it.
@cppwfs Thank you. I checked that it was applied in version 2.11.4.👍👍