aws-samples / aws-fault-injection-simulator-workshop

MIT No Attribution
38 stars 18 forks source link

FisStackLoadGen failed to deploy #218

Open awshj opened 3 years ago

awshj commented 3 years ago

Problem/Issue

After running cd resources/templates ./deploy-parallel.sh I was unable to locate FisStackLoadGen in Cloudformation stack. This was the output of deploy-output.goad.txt.

+ go test -v
go: github.com/aws/aws-lambda-go@v1.13.3 requires
        github.com/stretchr/testify@v1.4.0 requires
        gopkg.in/yaml.v2@v2.2.2: reading gopkg.in/yaml.v2/go.mod at revision v2.2.2: unknown revision v2.2.2

/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/node_modules/@aws-cdk/core/lib/asset-staging.ts:398
      throw new Error(`Failed to bundle asset ${this.node.path}, bundle output is located at ${bundleErrorDir}: ${err}`);
            ^
Error: Failed to bundle asset FisStackLoadGen/LoadGenerator/Code/Stage, bundle output is located at /home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/cdk.out/asset.b7e7c1ca0b8196516d3835864ef04216fda0c4d9aeafe7876fd02975954dbc5d-error: Error: docker exited with status 1
    at AssetStaging.bundle (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/node_modules/@aws-cdk/core/lib/asset-staging.ts:398:13)
    at AssetStaging.stageByBundling (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/node_modules/@aws-cdk/core/lib/asset-staging.ts:246:10)
    at stageThisAsset (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/node_modules/@aws-cdk/core/lib/asset-staging.ts:137:35)
    at Cache.obtain (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/node_modules/@aws-cdk/core/lib/private/cache.ts:24:13)
    at new AssetStaging (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/node_modules/@aws-cdk/core/lib/asset-staging.ts:162:44)
    at new Asset (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/node_modules/@aws-cdk/aws-s3-assets/lib/asset.ts:68:21)
    at AssetCode.bind (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/node_modules/@aws-cdk/aws-lambda/lib/code.ts:180:20)
    at new Function (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/node_modules/@aws-cdk/aws-lambda/lib/function.ts:331:29)
    at new GoadCdkTestStack (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/lib/goad-cdk-test-stack.ts:12:28)
    at Object.<anonymous> (/home/ec2-user/environment/aws-fault-injection-simulator-workshop/resources/templates/goad-cdk/bin/goad-cdk-test.ts:8:1)
Subprocess exited with error 1

Solution

Comment out 'export GOPRIVATE=*', variable in goad-cdk-test-stack.ts

rudpot commented 3 years ago

@awshj can retry the build with this setting and validate that this is actually tied to GOPRIVATE=*? This setting deals with some filtering issues we've seen in corporate scenarios. Testing with cloud9 and this setting has worked in our testing but we've seen issues where the build would fail with similar error messages

rudpot commented 3 years ago

Duplicate of #188

Kevinwochan commented 2 years ago

@rudpot I've managed to replicate this issue in a fresh account and the suggested fix worked for me. From what i understand, the GOPRIVATE environment variable is for setting the URLs to fetch modules from (the limit of my knowledge) but it looks like this repo is only using publicly available modules.

Any idea if this solution works for corporate users? "Users who cannot reach the default proxy and checksum database (for example, due to a firewalled or sandboxed configuration) may disable their use by setting GOPROXY to direct, and/or GOSUMDB to off. go env -w can be used to set the default values for these variables independent of platform:" - https://golang.org/doc/go1.13

mjkubba commented 2 years ago

I'm failing to reproduce this in both us-east-1 and us-west-2, can you share what steps did you take to reproduce this?