Skip to content

fix(cli): logs entire environment #623

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jun 17, 2025

Right now the CLI logs the entire environment to debug logging. This is a lot of data, and potentially also includes tokens we'd rather don't end up in logging.

Instead, just log our additions to the existing environment.


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

@rix0rrr rix0rrr requested a review from a team June 17, 2025 14:06
@github-actions github-actions bot added the p2 label Jun 17, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team June 17, 2025 14:07
Copy link
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

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

Any chance we can make this change in a way that the next person working on this code doesn't see the double env assignment and "optimizes" it away? Thus creating a regression?

A test case would help. Or variable naming maybe or moving process.env into the writeContextToEnv helper.

@rix0rrr rix0rrr force-pushed the huijbers/reduce-env-logging branch from fc9e319 to 4f22974 Compare June 19, 2025 07:46
@rix0rrr
Copy link
Contributor Author

rix0rrr commented Jun 19, 2025

I did both.

@rix0rrr rix0rrr requested a review from mrgrain June 19, 2025 07:46
Right now the CLI logs the entire environment to debug logging.  This is
a lot of data, and potentially also includes tokens we'd rather don't
end up in logging.

Instead, just log our additions to the existing environment.
@rix0rrr rix0rrr force-pushed the huijbers/reduce-env-logging branch from 4f22974 to ae81dc0 Compare June 19, 2025 09:48
@rix0rrr rix0rrr temporarily deployed to integ-approval June 19, 2025 09:48 — with GitHub Actions Inactive
@codecov-commenter
Copy link

codecov-commenter commented Jun 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.01%. Comparing base (e9c24a6) to head (ae81dc0).
⚠️ Report is 82 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #623      +/-   ##
==========================================
- Coverage   79.03%   79.01%   -0.03%     
==========================================
  Files          46       46              
  Lines        7092     7085       -7     
  Branches      791      791              
==========================================
- Hits         5605     5598       -7     
  Misses       1468     1468              
  Partials       19       19              
Flag Coverage Δ
suite.unit 79.01% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rix0rrr rix0rrr changed the title fix(cli): don't log entire environment fix(cli): logs entire environment Jun 19, 2025
@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Jun 19, 2025
Merged via the queue into main with commit 639455e Jun 19, 2025
32 checks passed
@aws-cdk-automation aws-cdk-automation deleted the huijbers/reduce-env-logging branch June 19, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants