<#1006 [flytekit-java] Support non-runnable tasks>...
# flyte-github
a
#1006 [flytekit-java] Support non-runnable tasks Issue created by kanterov Why would this be helpful to the Flyte community Currently, all plugin tasks are supported by overriding
getType()
and
getCustom()
methods in
SdkRunnableTask
. All runnable tasks require users to implement
run()
method. Many plugins don't need tasks to be runnable, for instance, pseudo-code for Athena plugin.
Copy code
abstract class AthenaTask extends SdkRunnableTask<Void, Void> {
  String getType() {
    return "athena";
  }

  abstract String getQuery();
  
  SdkStruct getCustom() { ... }

  Void run(Void inputs) {
    return null;
  }
}
Copy code
class MyQueryTask extends AthenaTask {
  String getQuery() {
    return "SELECT 1";
  }
}
As you can see from this example, it's possible to hide
run()
method from users. However, SDK will see that the task is runnable, and will stage jars for it. That can be avoided if we introduce non-runnable tasks. We need to carefully iterate on the design of this feature, and see how to consistently fit it into existing testing support, and methods that work with runnable tasks. flyteorg/flyte
c