Skip to content

Don't save irrelevant items into renewal configuration - #2663

Merged
bmw merged 16 commits into
masterfrom
no_irrelevant_items
Mar 24, 2016
Merged

bmw merged 16 commits into
masterfrom
no_irrelevant_items

Conversation

@schoen

@schoen schoen commented Mar 14, 2016

Copy link
Copy Markdown
Contributor

Fix #2503.
#2651 slightly limits the awesomeness of this fix.

I think the basic functionality is correct now. Not ready to merge yet because tests still need updating.

@schoen

schoen commented Mar 14, 2016

Copy link
Copy Markdown
Contributor Author

Also fixes #2277 because the logic here checks for both reasons not to save something into the renewal config.

@schoen schoen changed the title Don't save irrelevant items into renewal configuration [do not merge] Don't save irrelevant items into renewal configuration Mar 15, 2016
@schoen

schoen commented Mar 15, 2016

Copy link
Copy Markdown
Contributor Author

Let's see how this does with Travis. I think I've now avoided making test coverage worse, although there are more meaningful tests that we could now add to directly confirm what does and doesn't get saved in renewal config files. I think those tests might be best added after #2651 is fixed.

Comment thread letsencrypt/cli.py Outdated
raise errors.PluginSelectionError(msg)


def _relevant(option):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since it's being called from other modules, this function should not be private (ie not start with underscore).

@pde pde added this to the 0.5.0 milestone Mar 15, 2016
@bmw

bmw commented Mar 16, 2016

Copy link
Copy Markdown
Member

#2669 should fix integration test failures

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.005%) to 98.524% when pulling 4bc8e9a on no_irrelevant_items into 1abca6f on master.

Comment thread letsencrypt/storage.py Outdated
:rtype: bool
"""
# The list() here produces a list of the plugin names as strings.
from letsencrypt import cli

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.

is it bad that these are imported in a helper function? Will that cause them to get imported multiple times per call to relevant_vaules or does python do some optimazation for this

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Python will import module only once independently of the number of import module. To reimport a module, one must explicitly call reload(module).
But it is considered bad practice to not do import at the top of the file: https://www.python.org/dev/peps/pep-0008/#imports.

@SwartzCr

Copy link
Copy Markdown
Contributor

besides the one mentioned import issue this code looks good (and straightforward) to me

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.005%) to 98.525% when pulling dffa98d on no_irrelevant_items into 764770f on master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.005%) to 98.525% when pulling f3362d9 on no_irrelevant_items into 764770f on master.

@bmw

bmw commented Mar 24, 2016

Copy link
Copy Markdown
Member

Merging with review from @SwartzCr.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.005%) to 98.525% when pulling a9e0b0f on no_irrelevant_items into 764770f on master.

@bmw
bmw merged commit 998e588 into master Mar 24, 2016
@bmw
bmw deleted the no_irrelevant_items branch March 24, 2016 19:12
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.

Do not save irrelevant values to renewal conf files

6 participants