Skip to content
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

Pin all pip dependencies for Homu #686

Merged
merged 2 commits into from Jun 5, 2017

Conversation

@aneeshusa
Copy link
Member

aneeshusa commented Jun 1, 2017

New versions of requests that were just released removed the bundled
cacert.pem file, causing Homu to be unable to post comments.
Pin requests and all other Homu dependencies to avoid future problems,
now that we are using upgrade=True to ensure Homu gets updated.


This change is Reviewable

New versions of requests that were just released removed the bundled
`cacert.pem` file, causing Homu to be unable to post comments.
Pin requests and all other Homu dependencies to avoid future problems,
now that we are using `upgrade=True` to ensure Homu gets updated.
@aneeshusa aneeshusa force-pushed the aneeshusa:pin-requests-for-homu branch from f507884 to 5b2b2dd Jun 1, 2017
@aneeshusa aneeshusa changed the title Pin requests version for Homu Pin all pip dependencies for Homu Jun 1, 2017
@aneeshusa
Copy link
Member Author

aneeshusa commented Jun 1, 2017

Part of #601. Follow-up to #593.

@aneeshusa
Copy link
Member Author

aneeshusa commented Jun 1, 2017

r? @larsbergstrom or @edunham
Any deploys without this will break Homu, due to the aforementioned requests update, as I just found out.
(Note that this isn't caught by the saltfs Travis cron builder, since Homu starts fine and only chokes when actually trying to post a comment.)

Since we are pinning the Python package dependencies for Homu,
we need to make sure to upgrade those dependencies when they have
vulnerabilities.

Use the `safety` CLI tool from https://pyup.io/safety/ for this.
@aneeshusa
Copy link
Member Author

aneeshusa commented Jun 1, 2017

I added a commit to use the safety CLI tool to check for vulnerable packages since we are pinning them. Their freely available database is updated once a month, with more frequent updates available using an API Key with a subscription. Mozilla is listed on their front page, do you know if we have an organizational account?

@edunham
Copy link
Contributor

edunham commented Jun 5, 2017

@bors-servo r+

Thanks for doing this, Aneesh!

@bors-servo
Copy link
Contributor

bors-servo commented Jun 5, 2017

📌 Commit 6618e33 has been approved by edunham

@bors-servo
Copy link
Contributor

bors-servo commented Jun 5, 2017

Testing commit 6618e33 with merge c93be67...

bors-servo added a commit that referenced this pull request Jun 5, 2017
Pin all pip dependencies for Homu

New versions of requests that were just released removed the bundled
`cacert.pem` file, causing Homu to be unable to post comments.
Pin requests and all other Homu dependencies to avoid future problems,
now that we are using `upgrade=True` to ensure Homu gets updated.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/686)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 5, 2017

☀️ Test successful - status-travis
Approved by: edunham
Pushing c93be67 to master...

@bors-servo bors-servo merged commit 6618e33 into servo:master Jun 5, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@jdm
Copy link
Member

jdm commented Jun 14, 2017

I ran a highstate with test=True and saw these errors, which look relevant:

From servo-linux2:

----------
          ID: pip
    Function: pkg.installed
      Result: True
     Comment: All specified packages are already installed
     Started: 13:37:55.891571
    Duration: 40.616 ms
     Changes:
----------
          ID: virtualenv
    Function: pip.installed
      Result: False
     Comment: An importable pip module is required but could not be found on your system. This usually means that the system's pip package is not installed properly.
     Started: 13:37:56.049861
    Duration: 0.944 ms
     Changes:
----------
          ID: buildbot-slave-dependencies
    Function: pip.installed
      Result: False
     Comment: An importable pip module is required but could not be found on your system. This usually means that the system's pip package is not installed properly.
              An importable pip module is required but could not be found on your system. This usually means that the system's pip package is not installed properly.
     Started: 13:37:56.143335
    Duration: 0.754 ms
     Changes:
----------
          ID: servo-dependencies
    Function: pip.installed
      Result: False
     Comment: One or more requisite failed: python.virtualenv
     Started:
    Duration:
     Changes:
----------

From servo-mac4:

----------
          ID: virtualenv
    Function: pip.installed
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/local/Cellar/saltstack/2015.5.5_1/libexec/lib/python2.7/site-packages/salt/state.py", line 1561, in call
                  **cdata['kwargs'])
                File "/usr/local/Cellar/saltstack/2015.5.5_1/libexec/lib/python2.7/site-packages/salt/states/pip_state.py", line 535, in installed
                  out = _check_pkg_version_format(pkg)
                File "/usr/local/Cellar/saltstack/2015.5.5_1/libexec/lib/python2.7/site-packages/salt/states/pip_state.py", line 159, in _check_pkg_version_format
                  ret['prefix'] = install_req.req.project_name
              AttributeError: 'Requirement' object has no attribute 'project_name'
     Started: 09:37:19.955936
    Duration: 1.948 ms
     Changes:
----------
          ID: buildbot-slave-dependencies
    Function: pip.installed
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/local/Cellar/saltstack/2015.5.5_1/libexec/lib/python2.7/site-packages/salt/state.py", line 1561, in call
                  **cdata['kwargs'])
                File "/usr/local/Cellar/saltstack/2015.5.5_1/libexec/lib/python2.7/site-packages/salt/states/pip_state.py", line 535, in installed
                  out = _check_pkg_version_format(pkg)
                File "/usr/local/Cellar/saltstack/2015.5.5_1/libexec/lib/python2.7/site-packages/salt/states/pip_state.py", line 159, in _check_pkg_version_format
                  ret['prefix'] = install_req.req.project_name
              AttributeError: 'Requirement' object has no attribute 'project_name'
     Started: 09:37:19.958123
    Duration: 1.301 ms
     Changes:
----------
          ID: servo-dependencies
    Function: pip.installed
      Result: False
     Comment: One or more requisite failed: python.virtualenv
     Started:
    Duration:
     Changes:
@jdm
Copy link
Member

jdm commented Jun 14, 2017

Why is mac4 using saltstack 2015.5.5_1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.