-
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
fix: --base-dir is disregarded in sam build #2718
Changes from 5 commits
02b3ae8
a32bda3
ad9a1ca
3992f8e
ea648fe
2e73128
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import json | ||
|
||
|
||
def handler(event, context): | ||
""" | ||
FunctionA in leaf template | ||
""" | ||
return {"statusCode": 200, "body": json.dumps({"hello": "a2"})} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def layer_ping(): | ||
return "This is a Layer Ping from simple_python" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: A hello world application. | ||
|
||
Resources: | ||
FunctionA: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: main_a_2.handler | ||
Runtime: python3.7 | ||
CodeUri: ChildStackX/ChildStackY/FunctionA | ||
Timeout: 600 | ||
|
||
MyLayerVersion: | ||
Type: AWS::Serverless::LayerVersion | ||
Properties: | ||
LayerName: MyLayer | ||
Description: Layer description | ||
ContentUri: ChildStackX/ChildStackY/MyLayerVersion | ||
CompatibleRuntimes: | ||
- python3.7 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import json | ||
|
||
|
||
def handler(event, context): | ||
""" | ||
FunctionB in child template | ||
""" | ||
return {"statusCode": 200, "body": json.dumps({"hello": "b"})} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: A hello world application. | ||
|
||
Resources: | ||
FunctionB: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: main_b.handler | ||
Runtime: python3.7 | ||
CodeUri: ChildStackX/FunctionB | ||
Timeout: 600 | ||
|
||
ChildStackY: | ||
Type: AWS::Serverless::Application | ||
Properties: | ||
Location: ChildStackY/template.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import json | ||
|
||
|
||
def handler(event, context): | ||
""" | ||
FunctionA in root template | ||
""" | ||
return {"statusCode": 200, "body": json.dumps({"hello": "a"})} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: A hello world application. | ||
|
||
Resources: | ||
FunctionA: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: main_a.handler | ||
Runtime: python3.7 | ||
CodeUri: FunctionA | ||
Timeout: 600 | ||
|
||
ChildStackX: | ||
Type: AWS::Serverless::Application | ||
Properties: | ||
Location: ../ChildStackX/template.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will combine with provided base dir right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no this will not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. However if a base dir is not provided, we just resolve with location of the template. (which is not this particular test, but asking to help grok through the test) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, whether base dir is provided or not, this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on offline conversation: applies only to codeuri and contenturi. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a note here too and reference the issue number.