spring-cloud-dataflow icon indicating copy to clipboard operation
spring-cloud-dataflow copied to clipboard

Application properties not working in task launch

Open nvengatesan opened this issue 1 year ago • 3 comments
trafficstars

Description:

Application properties are not working in task launch.

application properties:

app.dashboard-daily-initializer.dashboard.daily.test=1

arguments: --test=1

image

in Task Executions, I could see the application properties as below

image

I read the same in spring batch project as below

@Getter @Setter @ConfigurationProperties(prefix = "dashboard.daily") @NoArgsConstructor public class DashboardInitializerProperties {

private String test;

}

when job executions launches from task executions, I don't see the properties

image

image

SCDF version : 2.11.0

nvengatesan avatar Jan 04 '24 15:01 nvengatesan

I am using SPRING_APPLICATION_JSON: { "maven": { "local-repository": null, "remote-repositories": { "repo1": { "url": "https://repo.spring.io/libs-snapshot"} } } }

SCDF version : 2.11.0 Java : 11 Sprint boot 2.7.13

The same code works in SCDF 2.6, after migrating it to 2.11.0, it does not work.. Any lights on this pls.

nvengatesan avatar Jan 04 '24 15:01 nvengatesan

When I launch task from SCDF UI/scheduler with application properties, I dont see the arguments in the logs

SimpleTaskRepository[0;39m: Creating: TaskExecution{executionId=0, parentExecutionId=null, exitCode=null, taskName='dashboard.daily.initializer-1', startTime=Thu Jan 04 16:03:05 UTC 2024, endTime=null, exitMessage='null', externalExecutionId='null', errorMessage='null', arguments=[]} Running default command line with: []

nvengatesan avatar Jan 04 '24 16:01 nvengatesan

I was unable to reproduce your issue using the local deployer. The only thing that I can see from the samples you provided are as follows:

  1. the command line argument should look something like app.proptask.0=--dashboard.daily.test=mytest
  2. Did you create a bean for your or add @Configuration annotation to your DashboardInitializerProperties in your application?

What platform are you deploying to? Can you provide a sample app that reproduces the issue?

cppwfs avatar Jan 04 '24 18:01 cppwfs

Closing due to inactivity. If closed in error please let us know.

cppwfs avatar Jul 22 '24 14:07 cppwfs