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

chore(merge-back): 2.171.1 #32326

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.171.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.171.0-alpha.0...v2.171.1-alpha.0) (2024-11-27)

## [2.171.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.170.0-alpha.0...v2.171.0-alpha.0) (2024-11-25)

## [2.170.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.169.0-alpha.0...v2.170.0-alpha.0) (2024-11-22)
Expand Down Expand Up @@ -80,7 +82,7 @@ All notable changes to this project will be documented in this file. See [standa

### Bug Fixes

* **location:** remove base class from PlaceIndex class ([#31287](https://github.com/aws/aws-cdk/issues/31287)) ([bc67866](https://github.com/aws/aws-cdk/commit/bc67866f579c401556d427eb150bcd118d69bd17)), closes [#30711](https://github.com/aws/aws-cdk/issues/30711) [#30682](https://github.com/aws/aws-cdk/issues/30682)
* **location:** remove base class from PlaceIndex class ([#31287](https://github.com/aws/aws-cdk/issues/31287)) ([bc67866](https://github.com/aws/aws-cdk/commit/bc67866f579c401556d427eb150bcd118d69bd17)), closes [#30711](https://github.com/aws/aws-cdk/issues/30711) [#30682](https://github.com/aws/aws-cdk/issues/30682)
* **scheduler-alpha:** scheduler input always get transformed to string with extra double quotes ([#31894](https://github.com/aws/aws-cdk/issues/31894)) ([186b8ab](https://github.com/aws/aws-cdk/commit/186b8abfab8452b31cba13b56998242f63c43159))
* **scheduler-alpha:** too many KMS permissions granted ([#31923](https://github.com/aws/aws-cdk/issues/31923)) ([06678a3](https://github.com/aws/aws-cdk/commit/06678a39e029582af14c8b021f946b9ce9cac9be)), closes [#31785](https://github.com/aws/aws-cdk/issues/31785)

Expand Down Expand Up @@ -148,10 +150,10 @@ All notable changes to this project will be documented in this file. See [standa

### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **kinesisfirehose-destinations:** the `logging` and `logGroup` properties in `DestinationLoggingProps` have been removed and replaced with a single optional property `loggingConfig` which accepts a class of type `LoggingConfig`.
* **kinesisfirehose-destinations:** the `logging` and `logGroup` properties in `DestinationLoggingProps` have been removed and replaced with a single optional property `loggingConfig` which accepts a class of type `LoggingConfig`.

#### Details
Combine the `logging` and `logGroup` properties into a single new optional property called `loggingConfig` which accepts a class of type `LoggingConfig`.
Combine the `logging` and `logGroup` properties into a single new optional property called `loggingConfig` which accepts a class of type `LoggingConfig`.

`LoggingConfig` is an abstract class which can be instantiated through either an instance of `EnableLogging` or `DisableLogging` which can be used in the following 3 ways:

Expand Down Expand Up @@ -222,7 +224,7 @@ unit + integ test

### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **kinesisfirehose-alpha:** `encryptionKey` property is removed and `encryption` property type has changed from the `StreamEncryption` enum to the `StreamEncryption` class.
* **kinesisfirehose-alpha:** `encryptionKey` property is removed and `encryption` property type has changed from the `StreamEncryption` enum to the `StreamEncryption` class.

To pass in a KMS key for the customer managed key case, use `StreamEncryption.customerManagedKey(key)`

Expand All @@ -234,12 +236,12 @@ StreamEncryption.awsOwnedKey()
StreamEncryption.customerManagedKey(key?: IKey)
```

This makes it so it's not longer possible to pass in a key when the encryption type is AWS owned or unencrypted. The `key` is an optional parameter in `StreamEncryption.customerManagedKey(key?: IKey)` so following the previous behaviour, if a key is provided it will be used, otherwise a key will be created for the user.
This makes it so it's not longer possible to pass in a key when the encryption type is AWS owned or unencrypted. The `key` is an optional parameter in `StreamEncryption.customerManagedKey(key?: IKey)` so following the previous behaviour, if a key is provided it will be used, otherwise a key will be created for the user.
### Description of how you validated changes

Generated templates do not change so behaviour remains the same.
Generated templates do not change so behaviour remains the same.

Updated integ/unit tests.
Updated integ/unit tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.171.1](https://github.com/aws/aws-cdk/compare/v2.171.0...v2.171.1) (2024-11-27)


### Bug Fixes

* **cli:** lambda hotswap fails if `lambda:GetFunctionConfiguration` action is not allowed ([#32301](https://github.com/aws/aws-cdk/issues/32301)) ([a073e93](https://github.com/aws/aws-cdk/commit/a073e9302dbd4213275e99c86476ab8152af7caf)), closes [/github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdatedV2.ts#L10](https://github.com/aws//github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdatedV2.ts/issues/L10) [/github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdated.ts#L13](https://github.com/aws//github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdated.ts/issues/L13)

## [2.171.0](https://github.com/aws/aws-cdk/compare/v2.170.0...v2.171.0) (2024-11-25)


Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk/lib/api/aws-auth/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ import {
UpdateFunctionConfigurationCommand,
type UpdateFunctionConfigurationCommandInput,
type UpdateFunctionConfigurationCommandOutput,
waitUntilFunctionUpdated,
waitUntilFunctionUpdatedV2,
} from '@aws-sdk/client-lambda';
import {
GetHostedZoneCommand,
Expand Down Expand Up @@ -841,7 +841,7 @@ export class SDK {
delaySeconds: number,
input: UpdateFunctionConfigurationCommandInput,
): Promise<WaiterResult> => {
return waitUntilFunctionUpdated(
return waitUntilFunctionUpdatedV2(
{
client,
maxDelay: delaySeconds,
Expand Down
8 changes: 5 additions & 3 deletions packages/aws-cdk/test/api/hotswap/hotswap-test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as cxapi from '@aws-cdk/cx-api';
import { ListStackResourcesCommand, StackResourceSummary, StackStatus } from '@aws-sdk/client-cloudformation';
import { GetFunctionConfigurationCommand } from '@aws-sdk/client-lambda';
import { GetFunctionCommand } from '@aws-sdk/client-lambda';
import { ICloudFormationClient, SuccessfulDeployStackResult } from '../../../lib/api';
import { HotswapMode, HotswapPropertyOverrides } from '../../../lib/api/hotswap/common';
import * as deployments from '../../../lib/api/hotswap-deployments';
Expand Down Expand Up @@ -109,8 +109,10 @@ export class HotswapMockSdkProvider extends MockSdkProvider {
constructor(rootStackName?: string) {
super();

mockLambdaClient.on(GetFunctionConfigurationCommand).resolves({
LastUpdateStatus: 'Successful',
mockLambdaClient.on(GetFunctionCommand).resolves({
Configuration: {
LastUpdateStatus: 'Successful',
},
});

mockCloudFormationClient.on(ListStackResourcesCommand).callsFake((input) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UpdateFunctionCodeCommand, waitUntilFunctionUpdated } from '@aws-sdk/client-lambda';
import { UpdateFunctionCodeCommand, waitUntilFunctionUpdatedV2 } from '@aws-sdk/client-lambda';
import * as setup from './hotswap-test-setup';
import { HotswapMode } from '../../../lib/api/hotswap/common';
import { mockLambdaClient } from '../../util/mock-sdk';
Expand All @@ -9,7 +9,7 @@ jest.mock('@aws-sdk/client-lambda', () => {

return {
...original,
waitUntilFunctionUpdated: jest.fn(),
waitUntilFunctionUpdatedV2: jest.fn(),
};
});

Expand Down Expand Up @@ -116,7 +116,7 @@ describe.each([HotswapMode.FALL_BACK, HotswapMode.HOTSWAP_ONLY])('%p mode', (hot
await hotswapMockSdkProvider.tryHotswapDeployment(hotswapMode, cdkStackArtifact);

// THEN
expect(waitUntilFunctionUpdated).toHaveBeenCalledWith(
expect(waitUntilFunctionUpdatedV2).toHaveBeenCalledWith(
expect.objectContaining({
minDelay: 5,
maxDelay: 5,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
UpdateFunctionCodeCommand,
UpdateFunctionConfigurationCommand,
waitUntilFunctionUpdated,
waitUntilFunctionUpdatedV2,
} from '@aws-sdk/client-lambda';
import * as setup from './hotswap-test-setup';
import { HotswapMode } from '../../../lib/api/hotswap/common';
Expand All @@ -10,10 +10,9 @@ import { silentTest } from '../../util/silent';

jest.mock('@aws-sdk/client-lambda', () => {
const original = jest.requireActual('@aws-sdk/client-lambda');

return {
...original,
waitUntilFunctionUpdated: jest.fn(),
waitUntilFunctionUpdatedV2: jest.fn(),
};
});

Expand Down Expand Up @@ -617,7 +616,7 @@ describe.each([HotswapMode.FALL_BACK, HotswapMode.HOTSWAP_ONLY])('%p mode', (hot

// THEN
expect(mockLambdaClient).toHaveReceivedCommand(UpdateFunctionCodeCommand);
expect(waitUntilFunctionUpdated).toHaveBeenCalledWith(
expect(waitUntilFunctionUpdatedV2).toHaveBeenCalledWith(
expect.objectContaining({
minDelay: 1,
maxDelay: 1,
Expand Down Expand Up @@ -675,7 +674,7 @@ describe.each([HotswapMode.FALL_BACK, HotswapMode.HOTSWAP_ONLY])('%p mode', (hot
await hotswapMockSdkProvider.tryHotswapDeployment(hotswapMode, cdkStackArtifact);

// THEN
expect(waitUntilFunctionUpdated).toHaveBeenCalledWith(
expect(waitUntilFunctionUpdatedV2).toHaveBeenCalledWith(
expect.objectContaining({
minDelay: 1,
maxDelay: 1,
Expand Down Expand Up @@ -733,7 +732,7 @@ describe.each([HotswapMode.FALL_BACK, HotswapMode.HOTSWAP_ONLY])('%p mode', (hot
await hotswapMockSdkProvider.tryHotswapDeployment(hotswapMode, cdkStackArtifact);

// THEN
expect(waitUntilFunctionUpdated).toHaveBeenCalledWith(
expect(waitUntilFunctionUpdatedV2).toHaveBeenCalledWith(
expect.objectContaining({
minDelay: 5,
maxDelay: 5,
Expand Down
4 changes: 2 additions & 2 deletions version.v2.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.171.0",
"alphaVersion": "2.171.0-alpha.0"
"version": "2.171.1",
"alphaVersion": "2.171.1-alpha.0"
}
Loading