Skip to content

Commit

Permalink
fix bug in redaction
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinZZ committed Jan 15, 2025
1 parent 4b3e51d commit fbef381
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-pipes-alpha/lib/pipe.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { IResource, Resource, Stack } from 'aws-cdk-lib';
import { IRole, Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam';
import { CfnPipe } from 'aws-cdk-lib/aws-pipes';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';
import { Construct } from 'constructs';
import { IEnrichment } from './enrichment';
import { IFilter } from './filter';
import { ILogDestination, IncludeExecutionData, LogLevel } from './logs';
import { ISource, SourceWithDeadLetterTarget } from './source';
import { ITarget } from './target';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Interface representing a created or an imported `Pipe`.
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/core/lib/metadata-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function redactTelemetryDataHelper(data: any, visited = new WeakSet()): a

if (Array.isArray(data)) {
// Handle arrays by recursively redacting each element
return data.map((item) => redactTelemetryDataHelper(item));
return data.map((item) => redactTelemetryDataHelper(item, visited));
}

if (data && Token.isUnresolved(data)) {
Expand Down
Loading

0 comments on commit fbef381

Please sign in to comment.