Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(contributing): Build failures don't always include !!!!!!!! #28515

Open
laurelmay opened this issue Dec 29, 2023 · 1 comment
Open

(contributing): Build failures don't always include !!!!!!!! #28515

laurelmay opened this issue Dec 29, 2023 · 1 comment
Labels
@aws-cdk/aws-route53resolver bug This issue is a bug. effort/medium Medium work item – several days of effort p3

Comments

@laurelmay
Copy link
Contributor

Describe the bug

When a PR CodeBuild build fails, the end of the build text says:

� Last command failed. Scroll up to see errors in log (search for '!!!!!!!!').

Unfortunately, not all failures have that string. That being present seems to be specific to JSII failures?

Expected Behavior

The error should be on a line that has !!!!!!!! or be pretty obvious/recent in the build output. The message saying how to find a failure should help lead a user to the failure.

Current Behavior

Due to the parallel nature of the build, the error was way earlier without a !!!!!!!! and mixed in with other "random" output:

> @aws-cdk/aws-s3objectlambda-alpha:test

aws-cdk-lib: FAIL aws-cloudfront/test/key-value-store.test.ts
aws-cdk-lib:   � Key Value Store › imported resource throws error when missing ID
aws-cdk-lib:     expect(received).toThrow(expected)
aws-cdk-lib:     Expected pattern: /Invalid Key Store Arn:/
aws-cdk-lib:     Received message: "Invalid Key Value Store ID 'arn:aws:cloudfront::123456789012:key-value-store'"
aws-cdk-lib:         �[0m �[90m 169 |�[39m     �[36mconst�[39m storeId �[33m=�[39m �[33mArn�[39m�[33m.�[39msplit(keyValueStoreArn�[33m,�[39m �[33mArnFormat�[39m�[33m.�[39m�[33mSLASH_RESOURCE_NAME�[39m)�[33m.�[39mresourceName�[33m;�[39m�[0m
aws-cdk-lib:         �[0m �[90m 170 |�[39m     �[36mif�[39m (�[33m!�[39mstoreId) {�[0m
aws-cdk-lib:         �[0m�[31m�[1m>�[22m�[39m�[90m 171 |�[39m       �[36mthrow�[39m �[36mnew�[39m �[33mError�[39m(�[32m`Invalid Key Value Store ID '${keyValueStoreArn}'`�[39m)�[33m;�[39m�[0m
aws-cdk-lib:         �[0m �[90m     |�[39m             �[31m�[1m^�[22m�[39m�[0m
aws-cdk-lib:         �[0m �[90m 172 |�[39m     }�[0m
aws-cdk-lib:         �[0m �[90m 173 |�[39m     �[36mreturn�[39m �[36mnew�[39m �[36mclass�[39m �[33mImport�[39m �[36mextends�[39m �[33mResource�[39m �[36mimplements�[39m �[33mIKeyValueStore�[39m {�[0m
aws-cdk-lib:         �[0m �[90m 174 |�[39m       readonly keyValueStoreArn�[33m:�[39m string �[33m=�[39m keyValueStoreArn�[33m;�[39m�[0m
aws-cdk-lib:       at Function.fromKeyValueStoreArn (aws-cloudfront/lib/key-value-store.ts:171:13)
aws-cdk-lib:       at aws-cloudfront/test/key-value-store.test.ts:108:27
aws-cdk-lib:       at Object.<anonymous> (../../node_modules/expect/build/toThrowMatchers.js:74:11)
aws-cdk-lib:       at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)
aws-cdk-lib:       at Object.<anonymous> (aws-cloudfront/test/key-value-store.test.ts:109:7)
aws-cdk-lib:       at Object.<anonymous> (aws-cloudfront/test/key-value-store.test.ts:109:7)
aws-cdk-lib: PASS aws-ssm/test/util.test.ts
@aws-cdk/aws-route53resolver-alpha: Build times for @aws-cdk/aws-route53resolver-alpha: Total time (53.4s) | /codebuild/output/src2064263468/src/github.com/aws/aws-cdk/tools/@aws-cdk/cdk-build-tools/node_modules/jsii/bin/jsii (41.8s) | /codebuild/output/src2064263468/src/github.com/aws/aws-cdk/node_modules/eslint/bin/eslint.js (10.4s) | /codebuild/output/src2064263468/src/github.com/aws/aws-cdk/tools/@aws-cdk/cdk-build-tools/bin/cdk-awslint (0.9s) | '/usr/bin/node' (0.2s) | pkglint (0.2s)
@aws-cdk/aws-route53resolver-alpha: �[2K�[1G@aws-cdk/aws-route53resolver-alpha: Done in 53.57s.

Reproduction Steps

  1. Review the logs at https://2cl995f30a.execute-api.us-east-1.amazonaws.com/Prod/buildlogs?key=85595289-c0ad-4b14-a403-b343cd25387c%2Fbuild.log
  2. See that the actual failure is a unit test failure; that does not have !!!!!!!!.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

N/A

Framework Version

No response

Node.js Version

N/A

OS

N/A

Language

TypeScript

Language Version

No response

Other information

No response

@laurelmay laurelmay added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 29, 2023
@pahud
Copy link
Contributor

pahud commented Jan 2, 2024

Yes thank you for your feedback. We definitely need to improve that. Please help us prioritize with upvotes 👍

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jan 2, 2024
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-route53resolver bug This issue is a bug. effort/medium Medium work item – several days of effort p3
Projects
None yet
Development

No branches or pull requests

2 participants