-
Notifications
You must be signed in to change notification settings - Fork 4k
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(release): 2.62.0 #23834
Merged
Merged
chore(release): 2.62.0 #23834
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… concurrency (#23714) This pull request adds support for maximum concurrency for Amazon SQS event sources: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: ~~* [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies)~~ ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…s update (#23669) ---- This PR bumps the template version, since it was modified in #21975 but the version number was not changed. cc: @rix0rrr who has assisted with merging the previous PR. ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
fixes #21668 adding method `logGroup.grantRead` We refer to the following suspended PRs #22132 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [x] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Loading the sourcemap file is prohibitively slow. We don't need to do this unless we actually want to debug things. ```console # with inline sourcemap $ time cdk --help cdk --help 6.32s user 1.66s system 106% cpu 7.510 total # with linked sourcemap $ time cdk --help ./bin/cdk --help 4.01s user 0.38s system 113% cpu 3.872 total # without sourcemap $ time cdk --help ./bin/cdk --help 0.65s user 0.12s system 91% cpu 0.839 total ``` Sourcemap support can be tested by running an unknown command: ```console $ cdk unknown -v [12:05:46] Error: Unknown command: unknown at main (/abc/node_modules/aws-cdk/lib/cli.ts:628:15) at exec4 (/abc/node_modules/aws-cdk/lib/cli.ts:384:18) ``` ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…d with stack region (#23568) This resource missed the common pattern of configuring the resource environment from the arn, which results in the region being that of the stack and not the profiling group. This means that integrations that look at this (like the lambda profiling integration) will configure the wrong region for the resource. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This is the best performing bundle. Un-minified: Time (mean ± σ): 736.3 ms ± 25.8 ms Minified: Time (mean ± σ): 665.3 ms ± 13.6 ms Whitespace: Time (mean ± σ): 481.6 ms ± 6.2 ms <--- winner Identifiers: Time (mean ± σ): 1.042 s ± 0.113 s Syntax: Time (mean ± σ): 662.9 ms ± 22.8 ms ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…23728) Reverts #23062. #23062 introduced #23407, which causes lambda functions that use triggers to fail to invoke with either this error ``` submit response to cloudformation { Status: 'FAILED', Reason: `TypeError [ERR_INVALID_ARG_TYPE]: The "msecs" argument must be of type number. Received type string ('120000')\n` + ' at new NodeError (internal/errors.js:322:7)\n' + ' at validateNumber (internal/validators.js:129:11)\n' + ' at getTimerDuration (internal/timers.js:384:3)\n' + ' at ClientRequest.setTimeout (_http_client.js:865:11)\n' + ' at features.constructor.handleRequest (/var/runtime/node_modules/aws-sdk/lib/http/node.js:82:12)\n' + ' at executeSend (/var/runtime/node_modules/aws-sdk/lib/event_listeners.js:370:29)\n' + ' at Request.SEND (/var/runtime/node_modules/aws-sdk/lib/event_listeners.js:384:9)\n' + ' at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:102:18)\n' + ' at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)\n' + ' at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)', StackId: 'arn:aws:cloudformation:us-east-1:***:stack/TestStack/83f77790-806c-11ed-8956-0a55d38b49ed', RequestId: '86a74312-347d-40c4-873a-09eed5b8eddd', PhysicalResourceId: 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED', LogicalResourceId: 'Trigger', NoEcho: undefined, Data: undefined } ``` or ``` Error: Trigger handler failed with status code 202 at handler (/var/task/index.js:53:15) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Runtime.handler (/var/task/__entrypoint__.js:32:24) (RequestId: ab252a7a-e06b-4fcf-b2b4-f59b2dd88734) ``` Reverting for now, since people are unable to upgrade. To unblock this revert, I'm disabling the integration test `dependencies-pnpm`, because when running it locally (and in this PR build) the logical ID of the version changes every run. This has been reproduced by others locally, so it's being disabled until we can resolve that issue. Fixes #23407
… runtimes (#23416) We have single-sourced our node versions in our repositories into a single `.nvmrc` at the root of the repo. From there, we create the Runtimes, like so: ```typescript const nvmrc = readFileSync(path.join(__dirname, '..', '.nvmrc')).toString().trim() new Runtime(`nodejs${nvmrc}.x'`, RuntimeFamily.NODEJS, { supportsInlineCode: true }) ``` As of #22989 the detection for the appropriate command line flags that dictate which aws-sdk is considered as an external module in esbuild broke for our self-defined Lambda runtimes < node18, as the [codepath](https://github.com/aws/aws-cdk/pull/22989/files#diff-cd86fbd4f2bbefcbcffc2143adccabafa1debe5981edbcdfcc766b5a705fe770R371-R383) detecting runtime versions that ship with the aws-sdk v2 never returned a truthy result. This left us with Lambdas running node 16, that did not bundle the aws-sdk v3, as it was incorrectly set as external in the esbuild command, which should only be the case from node 18 onwards. I am thus suggesting explicitly comparing the runtimes family and name to detect whether the runtime is one shipping the aws-sdk v2, as none of the other features of the Runtime class actually have an effect on the Lambda runtime environment. Related issue: #22976
The integ-runner obtains information on how to run a test from the `integ.json` manifest file in the cloud assembly. In order to get this information for a new version of the test it first synthesizes the new cloud assembly _only for the purpose of loading the integ manifest_. It will then run the actual test which synthesizes again into the same cloud assembly directory. We need to cleanup that first temporary cloud assembly _before_ running the actual test to make sure we remove any leftover files. Here is one example of what might happen. 1. Do the temporary synthesis and create the cloud assembly at `cdk-integ.out.my-test.js/`. This assembly has an asset with some hash `asset.abcdefg`. 2. Do the synthesis while executing the test. The cloud assembly at `cdk-integ.out.my-test.js` is updated. This time the asset hash is different `asset.123456`. Now we have two assets in the cloud assembly and one `asset.abcdefg` is not being used! 3. Test completes and copies the temporary snapshot to the final snapshot directory, including the old asset I've also added back the `lambda-nodejs/integ.dependencies-pnpm.ts` integration test that was removed in #23728. With this fix the test will no longer check in the asset file. I also removed the Trigger from the test since that is what introduced the always changing diff. ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ct app name uniqueness is per region per account (#23762) This fix is to modify the ApplicationAssociator L2 construct's documentation to let the customers know that Application name uniqueness is enforced on per account per region. This fixes #22486 ### All Submissions: * [ X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
We are getting an error when updating the cfnspec: ```bash Error: Unexpected array diff entry: [" "] ``` We are using `json-diff` to calculate diff entries, and expect that each entry is a 2-tuple array. Indeed, the [docs](https://github.com/andreyvit/json-diff#arrays) say this. Turns out, this is only true when supplying the `--full` option. With `--full`, the output for equivalent entries is `[' ', 1]`. Without `--full`, the output for equivalent entries is `[' ']`. I considered that this might be a bug/breaking change in `json-diff`, but I did some spelunking and this is behavior that is codified in tests that haven't been changed in 11 years: https://github.com/andreyvit/json-diff/blob/35582a9d19f8b0b2773360d67937e57ce2866781/test/diff_test.coffee#L78 More likely, we were relying on an implicit default to `--full` that is now turned off, or we have never come across such an issue before (which feels unlikely). I don't think we actually want `--full`, because we want the difference and that's it. So I've instead handled this case that should be a one-off case. I have run the update on my own machine and confirm it works as expected, and the output in `CHANGELOG.md` is correct. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
package.json files are required to have a `name` property. However, for some reason some deps can have embedded package.json files that do not adhere to this. For example, `minimatch/dist/cjs/package.json` looks like this: ```json { "type": "commonjs" } ``` This kills `yarn pkglint` because pkglint is expecting a real package (with a real name), which is running `node-bundle`. I've decided that simply ignoring these invalid package.jsons is the right thing to do. Can confirm that this does fix `yarn pkglint`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The timeout needs to account for the worst-case running time of all tests, single-threaded. This is because a test may be started, but never be able to acquire the lock until all other tests have run. Set it to 2hrs (currently, the test suite takes ~90 minutes to run single-threaded). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Now that the official CloudFormation resource `AWS::CertificateManager::Certificate` (CDK's `Certificate` construct) supports DNS validation we do not want to recommend using the `DnsValidatedCertificate` construct. The `DnsValidatedCertificate` construct uses CloudFormation custom resources to perform the certificate creation and this creates a lot of maintenance burden on our team (see the list of linked issues). Currently the primary use case for using `DnsValidatedCertificate` over `Certificate` is for cross region use cases. For this use case I have updated the README to have our suggested solution. The example in the README is tested in this [integration test](https://github.com/aws/aws-cdk/blob/main/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-cross-region-cert.ts) fixes #8934, #2914, #20698, #17349, #15217, #14519 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixes slow import of top-level aws-cdk-lib. At the very end of the build, the compiled `index.js` file is replaced with a version optimized for import performance. Instead of loading submodules directly at the top level, exports are defined as getter functions. This way they will only be required when actually imported from `aws-cdk-lib`. Improves AWS CDK app performance by ~400ms. Background reading: https://medium.com/trabe/exporting-getters-in-commonjs-modules-dd8f98b7d85e ---- ```console $ hyperfine -i "node -e \"const { App } = require('aws-cdk-lib');\"" "node -e \"const { App } = require('aws-cdk-lib-candidate');\"" --warmup 5 Benchmark 1: node -e "const { App } = require('aws-cdk-lib');" Time (mean ± σ): 1.227 s ± 0.125 s [User: 1.102 s, System: 0.262 s] Range (min … max): 1.110 s … 1.508 s 10 runs Benchmark 2: node -e "const { App } = require('aws-cdk-lib-candidate');" Time (mean ± σ): 251.9 ms ± 19.7 ms [User: 226.6 ms, System: 51.0 ms] Range (min … max): 224.6 ms … 278.3 ms 10 runs Summary 'node -e "const { App } = require('aws-cdk-lib-candidate');"' ran 4.87 ± 0.62 times faster than 'node -e "const { App } = require('aws-cdk-lib');"' ``` ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
We got some customer feedback that this was confusing and easy to interpret in a way that makes it desirable to use `--no-staging` for general usage. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…er permission in appsync (#23777) fixes #23434 ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
otaviomacedo
approved these changes
Jan 25, 2023
Thank you for contributing! Your pull request will be automatically updated and merged without squashing (do not update manually, and be sure to allow changes to be pushed to your fork). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto-approve
p2
pr/no-squash
This PR should be merged instead of squash-merging it
pr-linter/cli-integ-tested
Assert that any CLI changes have been integ tested
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See CHANGELOG