Merge ~smoser/cloud-init:pylint/1444-pylint-tip-ignore-e1101-from-contextlib into cloud-init:master

Proposed by Scott Moser on 2017-05-22
Status: Merged
Merged at revision: 9c33cb24b8a834aa8034db4c989725901a0814c6
Proposed branch: ~smoser/cloud-init:pylint/1444-pylint-tip-ignore-e1101-from-contextlib
Merge into: cloud-init:master
Diff against target: 48 lines (+9/-2)
3 files modified
cloudinit/util.py (+3/-2)
setup.py (+4/-0)
systemd/systemd-fsck@.service.d/cloud-init.conf (+2/-0)
Reviewer Review Type Date Requested Status
Chad Smith 2017-05-22 Approve on 2017-05-22
Server Team CI bot continuous-integration Approve on 2017-05-22
Joshua Powers (community) 2017-05-22 Approve on 2017-05-22
cloud-init commiters 2017-05-22 Pending
Review via email: mp+324401@code.launchpad.net

Commit Message

tox: move pylint target to 1.7.1

The motivation for this is to make tip-pylint target green.
It does 2 things:
 a.) silence a warning that is generated in pylint 1.7.1, but not
     other versions of pylint. This bug in pylint is filed at
     https://github.com/PyCQA/pylint/issues/1444
 b.) move tox -e pylint to use pylint 1.7.1

To post a comment you must log in.
Chad Smith (chad.smith) wrote :

s/pylint-tip/tip-pylint/ in commit message.

Joshua Powers (powersj) wrote :

Why are there systemd changes at all? I am probably the last person who should comment on a merge request including more than what the change log says, but why are those necessary?

Scott Moser (smoser) wrote :

The systemd changes are not actually present.
They were a result of me being on a branch (https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/324191) when i created *this* branch.
They're not present any more, launchpad just isn't updating the diff that you see.
If you look at the commit
 https://git.launchpad.net/~smoser/cloud-init/commit/?id=b01ae9627652e9ef03c68049dcee345755b5e806
directly, you'll see the proper diff.

Joshua Powers (powersj) wrote :

LGTM

review: Approve
Chad Smith (chad.smith) wrote :

I think we agreed in standup that since you've fixed this with a workaround for pylint's bug, you could probably add a structured comment or something that mark that we should look at pylint tip in the future to see if that issue is fixed. For bugs on external dependencies which cloud-init expects to be fixed at some in the future, we probably should decide on a comment label or something if we need to revisit this logic in the future to clean it up or remove a workaround. (like # RELEASE_REVIEW or RELEASE_BLOCKER). Then we can have a simple grep to search for fixes or old external bugs we should double check upon next SRU.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/util.py b/cloudinit/util.py
2index 67ff7ba..135e460 100644
3--- a/cloudinit/util.py
4+++ b/cloudinit/util.py
5@@ -478,10 +478,11 @@ def decomp_gzip(data, quiet=True, decode=True):
6 try:
7 buf = six.BytesIO(encode_text(data))
8 with contextlib.closing(gzip.GzipFile(None, "rb", 1, buf)) as gh:
9+ # E1101 is https://github.com/PyCQA/pylint/issues/1444
10 if decode:
11- return decode_binary(gh.read())
12+ return decode_binary(gh.read()) # pylint: disable=E1101
13 else:
14- return gh.read()
15+ return gh.read() # pylint: disable=E1101
16 except Exception as e:
17 if quiet:
18 return data
19diff --git a/setup.py b/setup.py
20index 4616599..a61c24a 100755
21--- a/setup.py
22+++ b/setup.py
23@@ -65,6 +65,7 @@ INITSYS_FILES = {
24 'sysvinit_openrc': [f for f in glob('sysvinit/gentoo/*') if is_f(f)],
25 'systemd': [f for f in (glob('systemd/*.service') +
26 glob('systemd/*.target')) if is_f(f)],
27+ 'systemd.fsck-dropin': ['systemd/systemd-fsck@.service.d/cloud-init.conf'],
28 'systemd.generators': [f for f in glob('systemd/*-generator') if is_f(f)],
29 'upstart': [f for f in glob('upstart/*') if is_f(f)],
30 }
31@@ -76,6 +77,9 @@ INITSYS_ROOTS = {
32 'systemd': pkg_config_read('systemd', 'systemdsystemunitdir'),
33 'systemd.generators': pkg_config_read('systemd',
34 'systemdsystemgeneratordir'),
35+ 'systemd.fsck-dropin': (
36+ os.path.sep.join([pkg_config_read('systemd', 'systemdsystemunitdir'),
37+ 'systemd-fsck@.service.d'])),
38 'upstart': '/etc/init/',
39 }
40 INITSYS_TYPES = sorted([f.partition(".")[0] for f in INITSYS_ROOTS.keys()])
41diff --git a/systemd/systemd-fsck@.service.d/cloud-init.conf b/systemd/systemd-fsck@.service.d/cloud-init.conf
42new file mode 100644
43index 0000000..0bfa465
44--- /dev/null
45+++ b/systemd/systemd-fsck@.service.d/cloud-init.conf
46@@ -0,0 +1,2 @@
47+[Unit]
48+After=cloud-init.service

Subscribers

People subscribed via source and target branches

to all changes: