-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Only check for layer changes when actually deploying #10170
Only check for layer changes when actually deploying #10170
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10170 +/- ##
==========================================
- Coverage 85.35% 85.28% -0.08%
==========================================
Files 337 338 +1
Lines 13725 13815 +90
==========================================
+ Hits 11715 11782 +67
- Misses 2010 2033 +23
Continue to review full report at Codecov.
|
Thanks @ankon for your proposition. I've talked with @medikoo to learn more about the motivation behind the previous change and unfortunatelly your proposal will result in un-doing the optimization to how layers are handled. During our packaging step, we're producing the final CloudFormation template and it's affected by the logic in Given the above, would you be okay with closing this PR? |
I guess, it's your product after all :) With that said: What we want to achieve is that developers and do an For now we'll simply maintain that trivial patch in our fork, and I'll subscribe to #8499 to see if/how we can adapt eventually. |
Sorry if it came out rude - I didn't mean it this way. The thing is, the solution most likely will have to be way different where we have the ability to separate build/package steps and potentially offer an "offline" approach for generating the CloudFormation template. The big question is though - how useful that is going to be, because in some cases it's just impossible to create the correct CF template in an offline manner (e.g. when using AWS-based variable sources or even in this case), so validating against such template might not be the best choice. I understand what you're trying to achieve in your specific use case, but I don't see at this moment a simple and quick "win" that would allow to do so, as the proposed change breaks the layer optimization. |
Addresses: #8187
The discussion in #8187 seems to be stuck, and proposes quite some changes. I think it would be beneficial to unbreak
serverless package
using this trivial change, and then look into the bigger picture (see also #8499 and #8666, for example.)The layers part is clearly depending on the
aws
provider, and so (IMHO) should be free to hook into theaws:deploy:checkForChanges
.Practical reasons for this change for us: We're using
package
to produce the cloudformation template (for various combinations of parameters), which we then run through cfn-lint as a first step in sanity-checking before deploying.