-
Notifications
You must be signed in to change notification settings - Fork 364
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
Template: add_description -> set_description (stratosphere 3.x). #999
Conversation
@@ -2414,7 +2414,7 @@ def create_stack_template( | |||
|
|||
# build a fresh template | |||
self.cf_template = troposphere.Template() | |||
self.cf_template.add_description("Automatically generated with Zappa") | |||
self.cf_template.set_description("Automatically generated with Zappa") |
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.
Do we also need to update the requirements to force usage of the new troposphere?
If someone is using troposphere==2.7.0
, will this still work?
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.
Yes, I agree that this would break if this PR ran on a deploy that used troposphere==2.7.0
. The core issue imo is that troposphere
isn't pinned to a version yet Zappa is relying on a version specific api from troposphere. If Zappa had pinned troposphere
to 2x initially there wouldn't be a breakage issue.
@povesma would you add a change to the requirements.txt
that pins the version of troposphere
to a 3x major version?
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.
if we want to keep backwards compatibility why not do something like:
if hasattr(self.cf_template, 'add_description'):
add_description
elif hasattr(self.cf_template, 'set_description'):
set_description
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.
The above backwards compatibility change is not needed for troposphere v2.7.x as the change (from v2.4.2 2019-02-02) included both methods (with a deprecation warning on the set_* variant). Of course, the reason for v3.0.0 was to deprecate Python 2.x support and only support Python 3+ in case that factors into zappa's Python version support.
#1029 also pins to troposphere version, using that one instead |
Description
As
stratosphere
has been upgraded to3.0.1
,add_description
is deprecated and removed.set_description
should be used instead.GitHub Issues
#998