-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
chore: update gitpod.yaml to build multiple packages #25245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
.gitpod.yml
Outdated
# build aws-cdk-lib | ||
cd packages/aws-cdk-lib && ../../scripts/buildup | ||
# build framework-integ | ||
cd ../@aws-cdk-testing/framework-integ && ../../../scripts/buildup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like we'll end up building some packages twice (e.g. aws-cdk-lib
, some of the build tools).
Could you refactor this to using lerna
directly to build the two target packages instead of using buildup
? That way lerna
should be able to figure out exactly which packages to build and will only build them once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrgrain Thank you. I actually encountered some errors using lerna in gitpod. I will try again later today and report back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mrgrain
When I run npx lerna run build --scope=aws-cdk-lib
at aws-cdk-lib
in gitpod I got this error message
aws-ecr-assets/lib/image-asset.ts:56:14
56 export class Platform {
~~~~~~~~
The declaring class is introduced here
aws-lambda/lib/lambda-version.ts:180:19 - warning JSII5019: The property name "version" conflicts with the declaring class "Version". This will result in renaming the class to "_Version" in C#. Consider renaming "version".
180 public readonly version: string;
~~~~~~~
aws-lambda/lib/lambda-version.ts:114:14
114 export class Version extends QualifiedFunctionBase implements IVersion {
~~~~~~~
The declaring class is introduced here
Build times for aws-cdk-lib: Total time (4m36.1s) | /workspace/aws-cdk/tools/@aws-cdk/cdk-build-tools/node_modules/jsii/bin/jsii (4m3.5s) | ts-node ./scripts/verify-imports-resolve-same.ts && ts-node ./scripts/verify-imports-shielded.ts && ts-node ./cx-api/build-tools/flag-report.ts (20.8s) | ts-node -P tsconfig.dev.json scripts/gen.ts (7.2s) | npx ts-node -P tsconfig.dev.json region-info/build-tools/generate-static-data.ts && node aws-events-targets/build-tools/gen.js && (cp -f $(node -p 'require.resolve("aws-sdk/apis/metadata.json")') custom-resources/lib/aws-custom-resource/sdk-api-metadata.json && rm -rf custom-resources/test/aws-custom-resource/cdk.out) && (rm -rf core/test/fs/fixtures && cd core/test/fs && tar -xzf fixtures.tar.gz) && (rm -rf assets/test/fs/fixtures && cd assets/test/fs && tar -xzvf fixtures.tar.gz) (3.0s)
node:events:491
throw er; // Unhandled 'error' event
^
Error: read ENOTCONN
at tryReadStart (node:net:662:20)
at Socket._read (node:net:673:5)
at Socket.Readable.read (node:internal/streams/readable:487:10)
at Socket.read (node:net:729:39)
at new Socket (node:net:449:12)
at Object.Socket (node:net:318:41)
at createSocket (node:internal/child_process:335:14)
at ChildProcess.spawn (node:internal/child_process:452:23)
at spawn (node:child_process:733:9)
at execFile (node:child_process:331:17)
at /workspace/aws-cdk/node_modules/nx/src/tasks-runner/cache.js:151:46
at new Promise (<anonymous>)
at Cache.<anonymous> (/workspace/aws-cdk/node_modules/nx/src/tasks-runner/cache.js:150:20)
at Generator.next (<anonymous>)
at /workspace/aws-cdk/node_modules/tslib/tslib.js:167:75
at new Promise (<anonymous>)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -107,
code: 'ENOTCONN',
syscall: 'read'
}
That's why I switched to buildup
. Any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, it appears the cache is causing an issue. Not sure why exactly, maybe because the artifacts are so large?!
But this works for me:
npx lerna run build --scope=aws-cdk-lib --scope=@aws-cdk-testing/framework-integ --skip-nx-cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I've learned something new today 👍
Will wait for the prebuild and see how it works!
Co-authored-by: Momo Kornher <[email protected]>
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
With #25224 , gitpod now prebuilds the `aws-cdk-lib` for us and is potentially saving 7-9 minutes with that. This PR makes gitpod continue to build `@aws-cdk-testing/framework-integ` so developers don't have to spend their time waiting for the all integ building. Closes #<issue number here>. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
With #25224 , gitpod now prebuilds the
aws-cdk-lib
for us and is potentially saving 7-9 minutes with that. This PR makes gitpod continue to build@aws-cdk-testing/framework-integ
so developers don't have to spend their time waiting for the all integ building.Closes #.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license