Skip to content

Conversation

@GavinZZ
Copy link
Contributor

@GavinZZ GavinZZ commented Jan 24, 2025

Reason for this change

We want to identify the difference between built-in objects vs customer input objects.

For built-in objects, we want to recursively log the content and redact the values.

However, for property keys and values that customer uniquely create, the entire object will be redacted. For example, if you use InlineApiDefinition to define an OpenAPI specification and pass it into a RestApi construct, the entire InlineApiDefinition object will be redacted.

Description of changes

Build a workflow (that will be linked to GHA in the future) and when redacting, redact based on the value. The workflow on run will parse all files in aws-cdk repository and built a JSON file that contains all constructs and loggable properties of the construct.

When redacting, only log the property key if the key exists in the JSON file. The value will be logged only if the value is not a * in the JSON file. Everything else is redacted for safely.

Description of how you validated changes

Unit tests added to test the updater tool as well as unit tests for modules.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@GavinZZ GavinZZ requested a review from a team as a code owner January 24, 2025 00:56
@aws-cdk-automation aws-cdk-automation requested a review from a team January 24, 2025 00:56
@github-actions github-actions bot added the p2 label Jan 24, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 24, 2025
@GavinZZ GavinZZ force-pushed the yuanhaoz/feat/metadata-collection-importer2 branch from 9584b0d to 6eccb25 Compare January 24, 2025 00:57
@GavinZZ GavinZZ changed the base branch from main to yuanhaoz/feat/metadata-collection January 24, 2025 00:57
@GavinZZ GavinZZ force-pushed the yuanhaoz/feat/metadata-collection-importer2 branch from 6eccb25 to 5940fc3 Compare January 24, 2025 01:06
@GavinZZ GavinZZ changed the base branch from yuanhaoz/feat/metadata-collection to main January 24, 2025 01:08
@GavinZZ GavinZZ force-pushed the yuanhaoz/feat/metadata-collection-importer2 branch from 5940fc3 to 91bd497 Compare January 24, 2025 03:15
@aws aws deleted a comment from aws-cdk-automation Jan 24, 2025
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 2bb02ff
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 24, 2025
@GavinZZ GavinZZ changed the base branch from main to yuanhaoz/feat/metadata-collection January 24, 2025 17:34
if (Array.isArray(data)) {
// Handle arrays by recursively redacting each element
return data.map((item) => redactTelemetryDataHelper(item, visited));
// Do not redact boolean value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Do not redact boolean value
// Do not redact enum value

@QuantumNeuralCoder QuantumNeuralCoder merged commit 11dd8cf into yuanhaoz/feat/metadata-collection Jan 29, 2025
8 checks passed
@QuantumNeuralCoder QuantumNeuralCoder deleted the yuanhaoz/feat/metadata-collection-importer2 branch January 29, 2025 19:25
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants