Aws-cdk: [stepfunctions-tasks] Complaining "JsiiException: Maximum call stack size exceeded" when building EcsRunTask

Created on 29 Jul 2020  路  8Comments  路  Source: aws/aws-cdk

Complaining "JsiiException: Maximum call stack size exceeded" when building EcsRunTask

Reproduction Steps


public class DynamoEcsStack extends Stack {
    public static final String CONTAINER_NAME = "DRPDynamoReplicateTableContainer";

    DynamoEcsStack(App app) {
        super(app, "DRPortal-Dynamo-Ecs");

        final Repository repository = Repository.Builder
                .create(this, "Repository")
                .repositoryName("drportal/dynamo/replicate-table")
                .removalPolicy(RemovalPolicy.DESTROY)
                .build();

        final Role executionRole = Role.Builder
                .create(this, "ExecutionRole")
                .assumedBy(new ServicePrincipal("ecs-tasks.amazonaws.com"))
                .managedPolicies(Collections.singletonList(
                        ManagedPolicy.fromAwsManagedPolicyName("service-role/AmazonECSTaskExecutionRolePolicy")))
                .build();

        final Role taskRole = Role.Builder
                .create(this, "TaskRole")
                .assumedBy(new ServicePrincipal("ecs-tasks.amazonaws.com"))
                .managedPolicies(Arrays.asList(
                        ManagedPolicy.fromAwsManagedPolicyName("AmazonKinesisFullAccess"),
                        ManagedPolicy.fromAwsManagedPolicyName("AmazonDynamoDBFullAccess"),
                        ManagedPolicy.fromAwsManagedPolicyName("AWSStepFunctionsFullAccess"),
                        ManagedPolicy.fromAwsManagedPolicyName("CloudWatchFullAccess")))
                .build();

        final Cluster cluster = Cluster.Builder
                .create(this, "ReplicateTableCluster")
                .clusterName("DRPDynamoReplicateTableCluster")
                .build();

        final TaskDefinition taskDefinition = TaskDefinition.Builder
                .create(this, "ReplicateTableTaskDefinition")
                .cpu("2048")
                .memoryMiB("4096")
                .compatibility(Compatibility.FARGATE)
                .executionRole(executionRole)
                .taskRole(taskRole)
                .build();

        final ContainerImage image = ContainerImage.fromEcrRepository(repository, "latest");

        final ContainerDefinition container = taskDefinition
                .addContainer(CONTAINER_NAME, ContainerDefinitionOptions.builder()
                        .image(image)
                        .logging(LogDriver.awsLogs(AwsLogDriverProps.builder()
                                .streamPrefix("dynamo")
                                .logGroup(LogGroup.Builder
                                        .create(this, "DynamoLogGroup")
                                        .logGroupName("/aws/ecs/dynamo/replicateTable")
                                        .retention(RetentionDays.ONE_WEEK)
                                        .removalPolicy(RemovalPolicy.DESTROY)
                                        .build())
                                .build()))
                        .build());

        EcsRunTask.Builder
                .create(this, "ReplicateTable")
                .cluster(cluster)
                .assignPublicIp(true)
                .taskDefinition(taskDefinition)
                .integrationPattern(IntegrationPattern.WAIT_FOR_TASK_TOKEN)
                .containerOverrides(Collections.singletonList(ContainerOverride.builder()
                        .containerDefinition(container)
                        .environment(environment()).build()))
                .launchTarget(EcsFargateLaunchTarget.Builder.create()
                        .platformVersion(FargatePlatformVersion.VERSION1_4).build())
                .build();
    }

    private List<TaskEnvironmentVariable> environment() {
        return Arrays.asList(
                env("source_table", "$[0].source.table"),
                env("source_region", "$[0].source.region"),
                env("target_table", "$[0].target.table"),
                env("target_region", "$[0].target.region"),
                env("credential_access", "$[0].credential.access"),
                env("credential_secret", "$[0].credential.secret"),
                env("task_token", JsonPath.getTaskToken()));
    }

    private TaskEnvironmentVariable env(String name, String value) {
        // TODO wait for TaskEnvironmentVariable.valuePath()
        // HELLO: I NEED THE VALUEPATH HERE DESPERATELY
        return TaskEnvironmentVariable.builder().name(name).value(value).build();
    }
}

Error Log

38f9d3e39f34:hello-cdk clementy$ cdk ls
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project hello-cdk: An exception occured while executing the Java class. Maximum call stack size exceeded
[ERROR] RangeError: Maximum call stack size exceeded
[ERROR]     at Function.entries (<anonymous>)
[ERROR]     at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:78:39)
[ERROR]     at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
[ERROR]     at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
[ERROR]     at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
[ERROR]     at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
[ERROR]     at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
[ERROR]     at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
[ERROR]     at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
[ERROR]     at Kernel._wrapSandboxCode (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:8398:19)
[ERROR]     at Kernel._create (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7922:26)
[ERROR]     at Kernel.create (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7666:21)
[ERROR]     at KernelHost.processRequest (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7446:28)
[ERROR]     at KernelHost.run (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7384:14)
[ERROR]     at Immediate._onImmediate (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7387:37)
[ERROR]     at processImmediate (internal/timers.js:439:21)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project hello-cdk: An exception occured while executing the Java class. Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at Function.entries (<anonymous>)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:78:39)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at Kernel._wrapSandboxCode (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:8398:19)
    at Kernel._create (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7922:26)
    at Kernel.create (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7666:21)
    at KernelHost.processRequest (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7446:28)
    at KernelHost.run (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7384:14)
    at Immediate._onImmediate (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7387:37)
    at processImmediate (internal/timers.js:439:21)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at Function.entries (<anonymous>)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:78:39)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at Kernel._wrapSandboxCode (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:8398:19)
    at Kernel._create (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7922:26)
    at Kernel.create (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7666:21)
    at KernelHost.processRequest (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7446:28)
    at KernelHost.run (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7384:14)
    at Immediate._onImmediate (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7387:37)
    at processImmediate (internal/timers.js:439:21)
    at org.codehaus.mojo.exec.ExecJavaMojo.execute (ExecJavaMojo.java:339)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: software.amazon.jsii.JsiiException: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at Function.entries (<anonymous>)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:78:39)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at recurseObject (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-kernel-UdfDxD/node_modules/@aws-cdk/aws-stepfunctions/lib/json-path.js:95:24)
    at Kernel._wrapSandboxCode (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:8398:19)
    at Kernel._create (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7922:26)
    at Kernel.create (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7666:21)
    at KernelHost.processRequest (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7446:28)
    at KernelHost.run (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7384:14)
    at Immediate._onImmediate (/private/var/folders/gx/3s8zy0qn0qv6t4r1l_cg64cxzmg53z/T/jsii-java-runtime12286689523936163533/jsii-runtime.js:7387:37)
    at processImmediate (internal/timers.js:439:21)
    at software.amazon.jsii.JsiiRuntime.processErrorResponse (JsiiRuntime.java:119)
    at software.amazon.jsii.JsiiRuntime.requestResponse (JsiiRuntime.java:91)
    at software.amazon.jsii.JsiiClient.createObject (JsiiClient.java:88)
    at software.amazon.jsii.JsiiEngine.createNewObject (JsiiEngine.java:526)
    at software.amazon.awscdk.services.stepfunctions.tasks.EcsRunTask.<init> (EcsRunTask.java:27)
    at software.amazon.awscdk.services.stepfunctions.tasks.EcsRunTask$Builder.build (EcsRunTask.java:298)
    at com.myorg.DynamoEcsStack.<init> (DynamoEcsStack.java:102)
    at com.myorg.HelloCdkApp.main (HelloCdkApp.java:10)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
    at java.lang.Thread.run (Thread.java:834)
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Subprocess exited with error 1

Environment

  • CLI Version : 2.0
  • Framework Version: 1.54
  • Node.js Version: v12.13.1
  • OS : Darwin Kernel Version 18.7.0
  • Language (Version): Java 8

Other


This is :bug: Bug Report

@aws-cdaws-stepfunctions-tasks bug efformedium in-progress p1

Most helpful comment

If you try to build the C# package, try using this patch instead on the original repo - this applies to the source, rather than the JS output like the other one. Hopefully this will also fix the C# package out of the box. It was originally written for v1.63.0, but it could work on 1.70 as well, if there haven't been many changes in between.

All 8 comments

I ran into a similar problem when defining an ECS task. It seems that when a WAIT_FOR_TASK_TOKEN integration pattern is used, run-task.ts goes to check if a task token reference is present in container overrides, but runs into an infinite recursion through the container definition reference there.

I was able to get this working by implementing a quick monkey-patch on top of json-path's recurseObject to stop on circular references, but I'm hesitant to make it a PR, as I'm not sure if this is the best way to go. Perhaps there's is a better way, e.g. to specify that we only care for environment / command overrides?

Has there been any updates on this?
I'm facing the same problem with the C# version of CDK. I'm unable to use the IntegrationPattern.WAIT_FOR_TASK_TOKEN and have to resort to some awkward solutions with IntegrationPattern.RUN_JOB which are pretty far from optimal

I do have a monkey patch for this that I use myself, but this is unfortunately for npm-based workflows (using patch-package). Haven't had a chance to go through the process of creating a pull request yet to support C# / Java / rest of the tooling options.

I haven't had a chance to dig into the repo itself. Going to give it a shot myself to try and build the C# package. As far as I understand, C# package uses the ts/js files so I could try to utilize your monkey patch for now.

If you try to build the C# package, try using this patch instead on the original repo - this applies to the source, rather than the JS output like the other one. Hopefully this will also fix the C# package out of the box. It was originally written for v1.63.0, but it could work on 1.70 as well, if there haven't been many changes in between.

@t6nn If you can push for this as a PR and get it into the actual codebase for 1.72.0, that would be fantastic.

鈿狅笍COMMENT VISIBILITY WARNING鈿狅笍

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eladb picture eladb  路  3Comments

slipdexic picture slipdexic  路  3Comments

NukaCody picture NukaCody  路  3Comments

eladb picture eladb  路  3Comments

v-do picture v-do  路  3Comments