Skip to content

Commit

Permalink
fix(core): fix NPE for K/V tasks and WorkingDirectory (#4592)
Browse files Browse the repository at this point in the history
Fix: #4592
  • Loading branch information
fhussonnois committed Aug 7, 2024
1 parent 89f1441 commit 8d1876b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions core/src/main/java/io/kestra/core/runners/DefaultRunContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,16 @@ void setWorkingDir(final WorkingDir workingDir) {
@Override
public DefaultRunContext clone() {
DefaultRunContext runContext = new DefaultRunContext();
runContext.variableRenderer = this.variableRenderer;
runContext.applicationContext = this.applicationContext;
runContext.storageInterface = this.storageInterface;
runContext.storage = this.storage;
runContext.variables = new HashMap<>(this.variables);
runContext.metrics = new ArrayList<>();
runContext.meterRegistry = this.meterRegistry;
runContext.workingDir = this.workingDir;
runContext.logger = this.logger;
runContext.metrics = new ArrayList<>();
runContext.storage = this.storage;
runContext.pluginConfiguration = this.pluginConfiguration;
runContext.version = version;
runContext.isInitialized.set(this.isInitialized.get());
if (this.isInitialized.get()) {
//Inject all services
runContext.init(applicationContext);
}
return runContext;
}

Expand Down

0 comments on commit 8d1876b

Please sign in to comment.