Skip to content

Commit

Permalink
fix(lambda-event-sources): unsupported property onFailure for Kafka…
Browse files Browse the repository at this point in the history
…EventSources (aws#19995)

Closes aws#19917. Seems this was missed in a previous fix: aws#17965. 

Adding breaking changes to `allowed-breaking-changes.txt` because they never worked in the first place.

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/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/master/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*
  • Loading branch information
kaizencc authored and Stephen Potter committed Apr 27, 2022
1 parent ee237ad commit e8a769b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,9 @@ removed:@aws-cdk/aws-s3.BucketProps.eventBridgeEnabled
# changed the type of RDS's SnapshotCredentials.secret from Secret to ISecret,
# shouldn't matter
changed-type:@aws-cdk/aws-rds.SnapshotCredentials.secret

# removed property from kafka eventsources as they are not supported
removed:@aws-cdk/aws-lambda-event-sources.BaseStreamEventSourceProps.onFailure
removed:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps.onFailure
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.onFailure
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.onFailure
22 changes: 11 additions & 11 deletions packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as lambda from '@aws-cdk/aws-lambda';
import { Duration } from '@aws-cdk/core';

/**
* The set of properties for event sources that follow the streaming model,
* such as, Dynamo, Kinesis and Kafka.
* The set of properties for streaming event sources shared by
* Dynamo, Kinesis and Kafka.
*/
export interface BaseStreamEventSourceProps{
/**
Expand All @@ -21,13 +21,6 @@ export interface BaseStreamEventSourceProps{
*/
readonly batchSize?: number;

/**
* An Amazon SQS queue or Amazon SNS topic destination for discarded records.
*
* @default discarded records are ignored
*/
readonly onFailure?: lambda.IEventSourceDlq;

/**
* Where to begin consuming the stream.
*/
Expand All @@ -50,8 +43,8 @@ export interface BaseStreamEventSourceProps{
}

/**
* The set of properties for event sources that follow the streaming model,
* such as, Dynamo, Kinesis.
* The set of properties for streaming event sources shared by
* Dynamo and Kinesis.
*/
export interface StreamEventSourceProps extends BaseStreamEventSourceProps {
/**
Expand Down Expand Up @@ -107,6 +100,13 @@ export interface StreamEventSourceProps extends BaseStreamEventSourceProps {
* @default - None
*/
readonly tumblingWindow?: Duration;

/**
* An Amazon SQS queue or Amazon SNS topic destination for discarded records.
*
* @default - discarded records are ignored
*/
readonly onFailure?: lambda.IEventSourceDlq;
}

/**
Expand Down

0 comments on commit e8a769b

Please sign in to comment.