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

aws-eks: integ.eks-cluster integ test failing with import error #27302

Open
kishiel opened this issue Sep 26, 2023 · 6 comments
Open

aws-eks: integ.eks-cluster integ test failing with import error #27302

kishiel opened this issue Sep 26, 2023 · 6 comments
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service @aws-cdk/integ-tests bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Comments

@kishiel
Copy link
Contributor

kishiel commented Sep 26, 2023

Describe the bug

When executing the integ.eks-cluster test the ProviderframeworkonEvent lambda is failing with an error:

2023-09-26T20:01:22.589Z	undefined	ERROR	Uncaught Exception 	
{
    "errorType": "Runtime.ImportModuleError",
    "errorMessage": "Error: Cannot find module './outbound'\nRequire stack:\n- /var/task/cfn-response.js\n- /var/task/framework.js\n- /var/runtime/index.mjs",
    "stack": [
        "Runtime.ImportModuleError: Error: Cannot find module './outbound'",
        "Require stack:",
        "- /var/task/cfn-response.js",
        "- /var/task/framework.js",
        "- /var/runtime/index.mjs",
        "    at _loadUserApp (file:///var/runtime/index.mjs:1061:17)",
        "    at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1093:21)",
        "    at async start (file:///var/runtime/index.mjs:1256:23)",
        "    at async file:///var/runtime/index.mjs:1262:1"
    ]
}

This also occurred when executing the ipv6 cluster test.

Expected Behavior

I expected a cluster to create and the test to run

Current Behavior

Cluster creation fails resulting in a rollback after no expected response returns to the handler before a timeout occurs. This requires the stack to be deleted and the cluster resource to be left behind (although no cluster actually exists)

Reproduction Steps

Change the name of the test (or some other inert change) and execute:

yarn integ test/aws-eks/test/integ.eks-cluster.js --update-on-failed

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.42.0 (build 7d8ef0b)

Framework Version

No response

Node.js Version

v18.16.0

OS

MacOS 13.5.2

Language

Typescript

Language Version

No response

Other information

No response

@kishiel kishiel added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 26, 2023
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Sep 26, 2023
@kishiel
Copy link
Contributor Author

kishiel commented Sep 27, 2023

Working on this a bit more today. I've had problems in the past with snapshots having sticky assets, so for fun I've deleted the snapshot directory for this test and am running it again. I can see the cluster creating so whatever this issue is it's localized to the snapshot(s). I've got a few more tests to run so I can regenerate them and see if we can just close this issue.

@kishiel
Copy link
Contributor Author

kishiel commented Sep 27, 2023

Deleting the existing snapshot and re-running it passed with no assertions. This makes debugging changes really expensive because it makes me doubt the existing snapshots are actually sane. Is there anything I can do apart from running the tests in advance of a change to help prevent this condition?

@peterwoodworth
Copy link
Contributor

The version you are using is pretty old. Are you still running into this on latest version?

@kishiel
Copy link
Contributor Author

kishiel commented Sep 27, 2023

The version you are using is pretty old. Are you still running into this on latest version?

CDK version? Good question. Let me try upgrading to latest and see what happens.

@khushail khushail added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Sep 27, 2023
@github-actions
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Sep 29, 2023
@go-to-k
Copy link
Contributor

go-to-k commented Sep 29, 2023

I also got the same error with integ tests such as cluster-inference, handlers-in-vpc, cluster-bottlerocket-ng, cluster-private-endpoint, etc... in the eks module.

My fork repo was in this commit included in v2.99.0.

The outbound.js may or may not be in the asset directory commited.

Some tests failed even if there is the file in the snapshot directory. After deleting the existing snapshot directory, it seems they can sometimes be successful.

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Sep 30, 2023
@pahud pahud added p2 effort/medium Medium work item – several days of effort @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service @aws-cdk/integ-tests bug This issue is a bug. effort/medium Medium work item – several days of effort p2
Projects
None yet
Development

No branches or pull requests

5 participants