Skip to content

Local invoke AWS CF function resolution for env variable : Ref#8198

Merged
medikoo merged 5 commits into
serverless:masterfrom
fredericbarthelet:resolve-ref
Sep 8, 2020
Merged

Local invoke AWS CF function resolution for env variable : Ref#8198
medikoo merged 5 commits into
serverless:masterfrom
fredericbarthelet:resolve-ref

Conversation

@fredericbarthelet

Copy link
Copy Markdown
Contributor

Addresses: #7087 #8147

@codecov-commenter

codecov-commenter commented Sep 7, 2020

Copy link
Copy Markdown

Codecov Report

Merging #8198 into master will decrease coverage by 0.03%.
The diff coverage is 68.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8198      +/-   ##
==========================================
- Coverage   88.21%   88.17%   -0.04%     
==========================================
  Files         248      249       +1     
  Lines        9460     9475      +15     
==========================================
+ Hits         8345     8355      +10     
- Misses       1115     1120       +5     
Impacted Files Coverage Δ
lib/plugins/aws/utils/resolveCfRefValue.js 66.66% <66.66%> (ø)
lib/plugins/aws/invokeLocal/index.js 69.74% <71.42%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b6a5f0d...c2554d8. Read the comment docs.

@fredericbarthelet

Copy link
Copy Markdown
Contributor Author

@medikoo I could add an intermediate service responsible for resolving both imports and refs in order to simplify invoke local code and abstracting away the different functions that can be resolved. Would you prefer such service to be implemented or do you like it better this way ?

@medikoo medikoo 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.

Thank you @fredericbarthelet it looks good! Still let me know what you think about my suggetsions

@medikoo I could add an intermediate service responsible for resolving both imports and refs in order to simplify invoke local code and abstracting away the different functions that can be resolved. Would you prefer such service to be implemented or do you like it better this way ?

Do you think, we can (and should) use it then in some other places? If yes, then yes I think it might be nice to abstract it away.

Comment thread lib/plugins/aws/utils/resolveCfRefValue.js Outdated
Comment thread lib/plugins/aws/invokeLocal/index.js Outdated
@fredericbarthelet

Copy link
Copy Markdown
Contributor Author

@medikoo I updated my PR with your comments. I don't see any use yet for a service requiring as well import and ref intrinsic functions. When the case arise, I shall implement such service.

@medikoo medikoo 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.

@fredericbarthelet

Copy link
Copy Markdown
Contributor Author

@medikoo you're right, I updated the documentation as well :)

@medikoo medikoo 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.

Thank you @fredericbarthelet !

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.

3 participants