-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Ensure AutoPublishCodeSha256 resolves to a string #2173
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2173 +/- ##
===========================================
+ Coverage 93.58% 94.29% +0.70%
===========================================
Files 90 95 +5
Lines 6124 6430 +306
Branches 1260 1291 +31
===========================================
+ Hits 5731 6063 +332
+ Misses 183 169 -14
+ Partials 210 198 -12
Continue to review full report at Codecov.
|
| if not isinstance(code_sha256, string_types): | ||
| raise InvalidResourceException( | ||
| self.logical_id, | ||
| "AutoPublishCodeSha256 must be a string", |
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.
It seems we support intrinsic Fn::Ref but not Fn::Sub, as shown in the test added.
If I understand correctly, Fn::Sub also resolves to a string. My question is - do we also want to support support Fn::Sub?
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.
We do want to support Fn::Sub but would prefer to deal with that when we tackle intrinsics support more broadly.
jfuss
left a comment
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.
Any reason we didn't add unit tests? :)
Issue #, if available:
n/a
Description of changes:
Check that
AutoPublishCodeSha256resolves to a string and fail gracefully if it doesn't.Description of how you validated changes:
Added a unit test to check the failure and ran existing unit tests to confirm there's no regression.
Checklist:
make prpasses