Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task schedule is not using the version defined in the properties file #5705

Open
nithril opened this issue Feb 23, 2024 · 6 comments
Open

Task schedule is not using the version defined in the properties file #5705

nithril opened this issue Feb 23, 2024 · 6 comments
Assignees
Labels
type/bug Is a bug report
Milestone

Comments

@nithril
Copy link

nithril commented Feb 23, 2024

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.

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Feb 23, 2024
@corneil
Copy link
Contributor

corneil commented Feb 26, 2024

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": {}
}

@cppwfs cppwfs added status/need-feedback Calling participant to provide feedback and removed status/need-triage Team needs to triage and take a first look labels Mar 19, 2024
@herdin
Copy link

herdin commented Apr 18, 2024

@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?

@fun-hpv
Copy link

fun-hpv commented Apr 23, 2024

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 :(.

@alsdud154
Copy link

alsdud154 commented May 8, 2024

@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
image

@herdin
Copy link

herdin commented May 23, 2024

no response.. so sad.. :(

@cppwfs cppwfs self-assigned this May 23, 2024
@cppwfs
Copy link
Contributor

cppwfs commented May 23, 2024

Apologies for not following up on this. I'll start taking a peak at it.

@cppwfs cppwfs added status/need-investigation Oh need to look under a hood type/bug Is a bug report and removed status/need-feedback Calling participant to provide feedback status/need-investigation Oh need to look under a hood labels May 28, 2024
@cppwfs cppwfs added this to the 2.11.4 milestone May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Is a bug report
Projects
None yet
Development

No branches or pull requests

6 participants