Skip to content

[WIP] sam local support for InlineCode key - #792

Closed
j0lly wants to merge 1 commit into
aws:developfrom
j0lly:develop
Closed

j0lly wants to merge 1 commit into
aws:developfrom
j0lly:develop

Conversation

@j0lly

@j0lly j0lly commented Nov 22, 2018 •

Copy link
Copy Markdown
Contributor

Issue #, if available:

#790

Description of changes:

Possibility to run sam local invoke for Functions authored via InlineCode or Code key

Checklist:

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

@sanathkr sanathkr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you so much for writing a design document! It really helps thinking about the problem more clearly before you spend cycles writing the code. Love it!

The design itself is straightforward. I have one comment though w.r.t Docker.

Comment thread designs/sam_local_inlinecode.rst Resolved

@j0lly j0lly left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is ideally the route I would like to pick

Comment thread designs/sam_local_inlinecode.rst Resolved
Comment thread designs/sam_local_inlinecode.rst Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we going to restrict the file permissions at all for this tmp file and if so to what?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not really sure if makes any sense/bring any value.. I would prefer to have a suggestion on this point rather than stating anything about it

Comment thread designs/sam_local_inlinecode.rst Resolved
Comment thread designs/sam_local_inlinecode.rst Resolved
@j0lly j0lly changed the title sam local support for InlineCode key [WIP] sam local support for InlineCode key Dec 11, 2018
@j0lly
j0lly force-pushed the develop branch 4 times, most recently from f0ef5bf to 20277c1 Compare December 20, 2018 23:31
@j0lly

j0lly commented Jan 6, 2019

Copy link
Copy Markdown
Contributor Author

@jfuss I did a rework. would you like to provide a feedback for the new implementation?

@jfuss jfuss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like the direction this is taking!

Comment thread designs/sam_local_inlinecode.rst Resolved
Comment thread designs/sam_local_inlinecode.rst Resolved
Comment thread designs/sam_local_inlinecode.rst Resolved
Comment thread designs/sam_local_inlinecode.rst Resolved
Comment thread designs/sam_local_inlinecode.rst Resolved
@j0lly
j0lly force-pushed the develop branch 4 times, most recently from 446839e to 36ee41d Compare February 10, 2019 22:07
@sriram-mv

Copy link
Copy Markdown
Contributor

@j0lly Could you handle the rebase back onto develop and we can take a look at this again

@j0lly

j0lly commented Feb 19, 2019

Copy link
Copy Markdown
Contributor Author

@j0lly Could you handle the rebase back onto develop and we can take a look at this again

I've just rebased.. But looking at integration tests, I'm pretty sure will be a mess to work out a decent solution for python 2.7. I'm looking for a different approach that might have to change a bit more the interfaces (codeUri is used all around) but will not fiddle with trying to make my class look like a string AND a file object :(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we encapsulate this in a dictionary rather than multiple if else statements

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we encapsulate this in a dictionary rather than multiple if else statements

@j0lly j0lly May 2, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@thesriram mind you elaborate? I've basically kept consistent behavior based on _extract_functions function in samcli/commands/local/lib/sam_function_provider.py

@j0lly

j0lly commented May 2, 2019

Copy link
Copy Markdown
Contributor Author

So, the implementation is working but I should look into how to make it work with python 2.7 implementation. There's anything else you see as a blocker to bring this PR forward?

@ispyinternet

Copy link
Copy Markdown

Is this still happening?

@aahung aahung added stage/pm-review Waiting for review by our Product Manager, please don't work on this yet and removed stage/pm-review Waiting for review by our Product Manager, please don't work on this yet labels Jan 25, 2021
@mgrandis mgrandis removed the area/sam label Feb 9, 2021
Base automatically changed from develop to elbayaaa-develop March 25, 2021 21:28
Base automatically changed from elbayaaa-develop to develop March 25, 2021 21:38
@jfuss

jfuss commented Nov 24, 2021

Copy link
Copy Markdown
Contributor

Closing this PR.

If this is still something valuable we should add, please 👍 #790

@jfuss jfuss closed this Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants