-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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-elasticsearch/aws-opensearch: lambda resource synth not stable between linux and windows #16928
Comments
@jogold I'd appreciate if you could take a look at this, thanks! |
Thanks for the very detailed bug report @fknittel! I was able to reproduce this and found the problem:
In versions < 1.123.0 there were no subfolders in the custom resource's "asset", relatives path were : Opening a PR to fix this. |
The hash for a specific file in a directory include its relative path. This gives different results on Linux vs Windows because of the different path separator. The solution is to normalize the relative path using forward slashes. Affects directory assets with subdirectories. Closes aws#14555 Closes aws#16928
The hash for a specific file in a directory include its relative path. This gives different results on Linux vs Windows because of the different path separator. The solution is to normalize the relative path using forward slashes. Affects directory assets with subdirectories. Closes #14555 Closes #16928 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
The hash for a specific file in a directory include its relative path. This gives different results on Linux vs Windows because of the different path separator. The solution is to normalize the relative path using forward slashes. Affects directory assets with subdirectories. Closes aws#14555 Closes aws#16928 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
What is the problem?
Since 1.123.0 the lambda resources brought in by use of aws-elasticsearch constructs produce different synth values for Linux and Windows. This is a problem for us, as we use the synth results as goldenmaster tests and have Windows on the dev machines and Linux on the CI machines.
I assume that this also affects custom Lambdas, but our problem is specifically with the aws-elasticsearch use.
Reproduction Steps
I've prepared a simple reproduction project, starting with cdk init and a stack containing an example Domain construct copy&pasted from the documentation and a simple test case that highlights which elements of the synth result differ between platforms. Please see the three branches
I've added github actions that hopefully highlight the problem. The test works on both platforms for 1.122.0 but produces different results between Linux and Windows on 1.123.0 up to 1.127.0.
What did you expect to happen?
I expected the same (construct internal) lambda resources to get synthesized, regardless of the platform the synth is performed on.
What actually happened?
The synth differs between Linux and Windows.
CDK CLI Version
1.127.0 (build 0ea309a)
Framework Version
1.127.0 (also affects >= 1.123.0)
Node.js Version
v16.11.0 / v14.18.0
OS
Linux and Windows
Language
Typescript, Java
Language Version
TypeScript (3.9.10) | Java (11)
Other information
I've tried to make it easily reproducible in the referenced repo. If you need anything else, please don't hesitate.
We're currently stuck on 1.122.0 due to this issue.
After some research I found #14555, but I'm not sure whether it's the same issue. Please advise.
The text was updated successfully, but these errors were encountered: