feat(system): deprecate RunContext method that must not be used anymore

- `isInitialized()` is not used by plugin so should not be part of the interface
- `getApplicationContext` should not be used anymore, all tasks that uses it would be refactored to avoid its usage

Part-of: https://github.com/kestra-io/kestra-ee/issues/4228
This commit is contained in:
Loïc Mathieu
2025-11-28 12:15:01 +01:00
parent 91330496f2
commit 20c5328199
2 changed files with 9 additions and 0 deletions

View File

@@ -123,7 +123,12 @@ public class DefaultRunContext extends RunContext {
this.traceParent = traceParent;
}
/**
* @deprecated Plugin should not use the ApplicationContext anymore, and neither should they cast to this implementation.
* Plugin should instead rely on supported API only.
*/
@JsonIgnore
@Deprecated(since = "1.2.0", forRemoval = true)
public ApplicationContext getApplicationContext() {
return applicationContext;
}

View File

@@ -192,5 +192,9 @@ public abstract class RunContext implements PropertyContext {
public record FlowInfo(String tenantId, String namespace, String id, Integer revision) {
}
/**
* @deprecated there is no legitimate use case of this method outside the run context internal self-usage, so it should not be part of the interface
*/
@Deprecated(since = "1.2.0", forRemoval = true)
public abstract boolean isInitialized();
}