-
Notifications
You must be signed in to change notification settings - Fork 1.2k
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Bug: Template not rendered correctly #7283
Comments
Hi @cscetbon, thanks for opening the issue. For issue 1, this seems like an expected behavior where a list defined in Globals would get merged with any specific value specified for a resource. You can read more about it here. For issue 2, I tried to reproduce it but did not see that warning and got a successful build. Here's my setup:
Is your layer not getting built? |
I disagree on this, it says "If there are duplicates, the Resource section entry overrides the Globals section entry".
It's getting built, it's only that the warning doesn't make sense. |
That's only true for |
@hnnasit Oh I see, okay so on this one we're on the same page, thanks. |
Description:
I found 2 issues in the way
template.yaml
is rendered. The first one is that ifArchitecture
is defined in Globals.functions and also in a function then the local version gets merged with the global one instead overwriting it and sam complains about having more than one element in the Architectures listThe other issue is that when building a layer even if with CompatibleArchitectures set sam throws a warning saying that it's not set
Steps to reproduce:
a. For Architectures list having more than one element, just define Architectures in Globals.function and in ProgramsFunction as well
Use this template.yaml
b. For warning about CompatibleArchitectures, use this template.yaml and put some dummy code in functions/programs and layers/my_layer
Adding some custom debug I see that a Layer class is called multiples times for MyLayer and at one point it sees the right configuration for CompatibleArchitectures but then it's gone
Observed result:
Check output at https://pastebin.com/raw/1PnPW63Z
Expected result:
Both of those cases should not happen.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
MacOs
andLinux
sam --version
:1.120.0
us-west-2
The text was updated successfully, but these errors were encountered: