Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Fix travis integration for netifaces and netsnmp modules. #41

Merged
merged 2 commits into from
Apr 25, 2016
Merged

Fix travis integration for netifaces and netsnmp modules. #41

merged 2 commits into from
Apr 25, 2016

Conversation

stephen-soltesz
Copy link
Contributor

As a security precaution, travis-ci maintains a whitelist of packages that can be installed for tests. Any package not on the whitelist cannot be installed for CI testing. The Ubuntu packages python-netifaces and python-netsnmp are not on the whitelist. Similarly, the pip packages for netifaces and netsnmp cannot build because their dependencies are not whitelisted either, e.g. libsnmp-dev.

Since these packages involve network discovery and system introspection (potential security risks), it is unlikely that travis would whitelist these packages or their dependencies in the future.

So, to work around this limitation, this change adds minimal skeleton versions of each package so that we can still run tests within travis-ci.

From the .travis.yml file, the build script is given a fake module path. And, the build script itself should remain unmodified so that local installations can still run unit tests with the true versions of netifaces and netsnmp.


This change is Reviewable

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.3%) to 97.703% when pulling e3aa2e1 on stephen-soltesz:fix-ci into b430537 on m-lab:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.3%) to 97.703% when pulling 3b8fd0c on stephen-soltesz:fix-ci into b430537 on m-lab:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 98.426% when pulling a9bcbe7 on stephen-soltesz:fix-ci into b430537 on m-lab:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 98.633% when pulling 02db7b5 on stephen-soltesz:fix-ci into b430537 on m-lab:master.

@mtlynch
Copy link
Contributor

mtlynch commented Apr 25, 2016

Reviewed 5 of 5 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


fake-packages/netifaces.py, line 1 [r1] (raw file):
Just because these files will probably be so unexpected to a reader without context, I think the bar for documentation is a bit high. Can we add a README that explains why we have to do this (including the limitations in Travis, bonus for including links) and then, in the module docstrings, direct the reader to the README?


Comments from Reviewable

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 98.633% when pulling 7e8e622 on stephen-soltesz:fix-ci into b430537 on m-lab:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 98.633% when pulling 957d07f on stephen-soltesz:fix-ci into b430537 on m-lab:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 98.633% when pulling 7e10395 on stephen-soltesz:fix-ci into b430537 on m-lab:master.

@stephen-soltesz
Copy link
Contributor Author

Review status: 2 of 6 files reviewed at latest revision, 1 unresolved discussion.


fake-packages/netifaces.py, line 1 [r1] (raw file):
This is a good idea.

I've added fake-packages/README.md and links to the future location of the README under the m-lab/collectd-mlab repo in the package docstrings. Also added a comment in .travis.yml pointing to the same README.


Comments from Reviewable

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 98.633% when pulling 8722f18 on stephen-soltesz:fix-ci into b430537 on m-lab:master.

@mtlynch
Copy link
Contributor

mtlynch commented Apr 25, 2016

:lgtm:


Reviewed 2 of 4 files at r2, 2 of 2 files at r3.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


.travis.yml, line 19 [r3] (raw file):
(optional) I'd rather use relative paths than bake in an assumption that we're always going to be hosted on Github at this path. (ditto for rest of PR)


Comments from Reviewable

@stephen-soltesz
Copy link
Contributor Author

Review status: 3 of 6 files reviewed at latest revision, 2 unresolved discussions.


.travis.yml, line 19 [r3] (raw file):
Oh, okay. No problem. Updated to fake-packages/README.md throughout.


Comments from Reviewable

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 98.633% when pulling b63ae79 on stephen-soltesz:fix-ci into b430537 on m-lab:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants