Skip to content

Conversation

@jfuss
Copy link
Contributor

@jfuss jfuss commented Apr 23, 2019

Issue #, if available:
N/A

Description of changes:

This enables a customer to build a single function similar to how they would invoke a single function. To build a single function, you can pass the LogicalID to the command sam build <MyLogicalId>. If the LogicalID is omitted, the command will behave exactly how it does not and build the whole template.

Concerns on approach:

This change enables a customer (or IDE) to quickly build a single function for faster test cycles. This could result in a deployment to of source code instead of built code, if the customer only builds one of the n number of functions in the template and then does a package and deploy. With this change, customers will need to still use sam build without the logicalId before package and deploying. This could create more customer confusion in the short term.

Checklist:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@sriram-mv sriram-mv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!

function_logical_id)

all_artifacts = set(os.listdir(str(resource_artifact_dir)))
print(all_artifacts)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove prints

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"jinja2",
'requirements.txt'}

def test_fucntion_not_found(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


EXPECTED_FILES_GLOBAL_MANIFEST = set()
EXPECTED_FILES_PROJECT_MANIFEST = {'__init__.py', 'main.py', 'numpy',
# 'cryptography',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is cryptography commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sriram-mv sriram-mv merged commit 4512794 into aws:develop Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants