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: add integ test that validates full proxy traversal #33140

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jan 24, 2025

(Re-roll of #33092)

Add a CLI integ test to validate that cdk deploy works in a fully network-isolated environment, with only a proxy to go through.

This validates that no parts of the CLI setup ignore the proxy configuration, which would otherwise be hard to test.

We achieve the network isolation by running the code inside a Docker container where we use iptables to drop all network traffic that doesn't go through the Docker host, where we run a proxy.

I temporarily bumped the tsconfig target to try out the using syntax (didn't work out with Jest), but that caused some compiler errors around class member initialization that I fixed as well.


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

Add a CLI integ test to validate that `cdk deploy` works in a fully
network-isolated environment, with only a proxy to go through.

This validates that no parts of the CLI setup ignore the proxy
configuration, which would otherwise be hard to test.

We achieve the network isolation by running the code inside a Docker
container where we use `iptables` to drop all network traffic that
doesn't go through the Docker host, where we run a proxy.

I temporarily bumped the `tsconfig` `target` to try out the `using`
syntax (didn't work out with Jest), but that caused some compiler errors
around class member initialization that I fixed as well.

----

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@rix0rrr rix0rrr requested a review from a team as a code owner January 24, 2025 13:58
@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Jan 24, 2025
@github-actions github-actions bot added the p2 label Jan 24, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 24, 2025 13:58
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 24, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

(This review is outdated)

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.79%. Comparing base (5377586) to head (e2a989f).
Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #33140      +/-   ##
==========================================
- Coverage   81.57%   80.79%   -0.78%     
==========================================
  Files         227      232       +5     
  Lines       13793    14110     +317     
  Branches     2419     2453      +34     
==========================================
+ Hits        11251    11400     +149     
- Misses       2270     2430     +160     
- Partials      272      280       +8     
Flag Coverage Δ
suite.unit 80.79% <0.00%> (-0.78%) ⬇️

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

Components Coverage Δ
packages/aws-cdk 79.53% <0.00%> (-1.47%) ⬇️
packages/aws-cdk-lib/core 82.17% <0.00%> (ø)

@aws-cdk-automation aws-cdk-automation dismissed their stale review January 24, 2025 14:13

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: af96643
  • 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
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

(This review is outdated)

@rix0rrr rix0rrr added the pr-linter/exempt-codecov The PR linter will not require codecov checks to pass label Jan 26, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review January 26, 2025 20:21

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2 pr/do-not-merge This PR should not be merged at this time. pr/needs-maintainer-review This PR needs a review from a Core Team Member pr-linter/exempt-codecov The PR linter will not require codecov checks to pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants