Skip to content
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

feat(AWS Lambda): Support referencing images with tags #8683

Merged
merged 1 commit into from Dec 29, 2020

Conversation

pgrzesik
Copy link
Contributor

@pgrzesik pgrzesik commented Dec 29, 2020

Adds support for referencing images with tags

To also share a bit more context about it because it seems fairly simple, but there was a little bit more consideration to it. I was also wondering if we should resolve SHA for an image at all times, because it seems like ImageUri can also accept an URI with tag only. My first idea here that maybe (without versioning), if ImageUri would be e.g. xxx.xxx/repo-name:latest, then after updating the image under the latest tag in that repo will result in new Lambdas being invoked with that newly pushed image. I was a bit surprised to learn that it's not the case, it seems like Lambda internally is somehow still pinning the image to specific sha (maybe during the image optimization process that happens before the first invocation) and you have to force update your Lambda function anyway. In that case, I feel like, at this point, we should always resolve the specific SHA of an image.

Closes: #8621

@codecov
Copy link

codecov bot commented Dec 29, 2020

Codecov Report

Merging #8683 (4b71b1c) into master (ef53050) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8683      +/-   ##
==========================================
+ Coverage   87.23%   87.25%   +0.01%     
==========================================
  Files         255      255              
  Lines        9597     9611      +14     
==========================================
+ Hits         8372     8386      +14     
  Misses       1225     1225              
Impacted Files Coverage Δ
lib/plugins/aws/provider.js 93.06% <ø> (ø)
lib/plugins/aws/package/compile/functions.js 96.18% <100.00%> (+0.19%) ⬆️

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 ef53050...4b71b1c. Read the comment docs.

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

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

I feel like, at this point, we should always resolve the specific SHA of an image.

Thanks for elaborating on that. I had exactly same thought path which lead me to assumption that we always should put SHA in CF config. I should have shared that in original issue.

Great work @pgrzesik, I have nothing to add!

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.

AWS Lambda: Support referencing images via tags
2 participants