Skip to content

cdk.CdkStackTest.testStack() FAILURE for Apple M1 Chip Under Firewall #1378

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

Closed
nilayamkamila opened this issue Aug 17, 2023 · 2 comments
Closed
Labels
bug Something isn't working triage

Comments

@nilayamkamila
Copy link

nilayamkamila commented Aug 17, 2023

What were you trying to accomplish?
Running the command mvn clean install under a Firewall Restricted Environment with Correct proxy Settings; and getting the Error as cdk.CdkStackTest.testStack() Time elapsed: 0.127 sec <<< FAILURE!
cdk.CdkStackTest.testStack() Time elapsed: 0.127 sec <<< FAILURE!
java.io.UncheckedIOException: java.io.IOException: Cannot run program "node": error=2, No such file or directory

Expected Behavior

As per document of this repo; All Test case should pass with the following command
Firewall Non-Restricted Environment: mvn clean install
Firewall Restricted Environment: mvn clean install -Dhttps.proxyHost=XXXXXXXXX.abc.xyz -Dhttps.proxyPort=8099 -Dhttps.proxyUsername=XXXXXXX -Dhttps.proxyPassword=XXXXXXX [Replace XXXXXXX with your correct credentials]

Current Behavior

All Test Cases to be Passed. All Project Modules and Examples Modules to show "SUCCESS" after running the above mvn command

Possible Solution

At this time, it should be investigated further.
WorkAround Solution: Team to proceed with, the issue Occurring at the line cdk.CdkStackTest.testStack(){App app = new App();}
Please comment the lines, and run the mvn commands. It'll pass all test cases.

Steps to Reproduce (for bugs)

  1. Follow the change suggested here if you are seeing the log4j Issue: mvn install fails in environment that block log4j:2.15.0 & its dependencies from downloading due to security vulnerabilities #1375
  2. Check if you are in the Machine of : Apple M1 Pro(OS : Ventura 13.5)
  3. You are in Firewall Restricted Environment, and run the command : mvn clean install -Dhttps.proxyHost=XXXXXXXX.abc.xyz -Dhttps.proxyPort=8099 -Dhttps.proxyUsername=XXXXXXX -Dhttps.proxyPassword=XXXXXXX
  4. You would see the failures as follows
    Running cdk.CdkStackTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.127 sec <<< FAILURE! cdk.CdkStackTest.testStack() Time elapsed: 0.127 sec <<< FAILURE! java.io.UncheckedIOException: java.io.IOException: Cannot run program "node": error=2, No such file or directory

Environment

  • Powertools for AWS Lambda (Java) version used: latest master as of August 16, 2023
  • Packaging format (Layers, Maven/Gradle):: Maven 3.3.9
  • AWS Lambda function runtime:: Not Applicable
  • Debugging logs: Running cdk.CdkStackTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.127 sec <<< FAILURE! cdk.CdkStackTest.testStack() Time elapsed: 0.127 sec <<< FAILURE! java.io.UncheckedIOException: java.io.IOException: Cannot run program "node": error=2, No such file or directory
@scottgerring
Copy link
Contributor

Hey @nilayamkamila , thanks for opening the issue.

The E2E tests shouldn't run as part of a normal mvn clean install run from the root of the project. Can you confirm exactly how you are running these? They should only fire when you explicitly set the e2e profile (build config)

If you are actively trying to run them to get through the whole test suite, I would suggest ignoring them for now. They build and launch AWS infrastructure, and require AWS account access, the CDK, and the requirements of the CDK - in this case, NodeJS. We run them for you as part of the pull-request process to this repository, and they don't need to be run as part of the normal development workflow.

If you are not trying to run them but they are running anyway, if you can dump the complete output - showing source directory, command, and maven output, we can try and work out what has gone wrong!

@nilayamkamila
Copy link
Author

Got you @scottgerring . I can ignore as I'm able to proceed with the mentioned WorkAround Solution. As this will run as part of the pull-request, I'm good. Thank you!

@phipag phipag moved this from Triage to Shipped in Powertools for AWS Lambda (Java) Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
Status: Shipped
Development

No branches or pull requests

2 participants