FreedomCoop / valuenetwork

Fork coming from NRP-Sensorica to use and work for FREEDOM COOP
http://fair.coop
GNU Affero General Public License v3.0
31 stars 12 forks source link

Travis build failures #370

Open bhaugen opened 7 years ago

bhaugen commented 7 years ago

We are seeing a lot of Travis build failures when we push new changes, that are not related to the code changes being push.

Travis is an app that automatically runs some tests after every new commit gets pushed to github. It was set up by XaviP, and is potentially a great code quality monitor, but when we get a lot of build failures that have nothing to do with the code being pushed, we start to ignore them so we can get some work done.

Here's the latest Travis build failure: https://travis-ci.org/FreedomCoop/valuenetwork/builds/281909736

Here are some details about why it failed:

...Internal Server Error: /membership/

  File "/home/travis/build/FreedomCoop/valuenetwork/work/views.py", line 484, in membership_request

    if membership_form.is_valid():

  File "/home/travis/build/FreedomCoop/valuenetwork/work/forms.py", line 127, in _clean_fields

    self.cleaned_data[name] = bleach.clean(value)

  File "/home/travis/build/FreedomCoop/valuenetwork/.tox/py27_django11/lib/python2.7/site-packages/bleach/__init__.py", line 84, in clean

    return cleaner.clean(text)

  File "/home/travis/build/FreedomCoop/valuenetwork/.tox/py27_django11/lib/python2.7/site-packages/bleach/sanitizer.py", line 197, in clean

    raise TypeError('argument must of text type')

TypeError: argument must of text type

This same error has happened in several build failures for the last couple of days. It does not show up in my local tests, which pass. And it has nothing to do with the code that is being pushed, as far as I can tell. Seems to be about a membership request form, but since it is in a database that was created for the test, it also has nothing to do with the live database.

@fosterlynn @bum2 any ideas about how to find and fix this problem?

bhaugen commented 6 years ago

This bleach problem continues. It is a bug (or feature) in the latest version of bleach, 2.1.1.

@bum2 fixed thebleach bugs in production by pinning bleach to version 2.0 in https://github.com/FreedomCoop/valuenetwork/blob/master/requirements.txt but Travis continues to use bleach==2.1.1.

Looks like version numbers also need to be changed in https://github.com/FreedomCoop/valuenetwork/blob/master/tox.ini

I'll try to change bleach versions there and see if it works.

bhaugen commented 6 years ago

Ok, https://github.com/FreedomCoop/valuenetwork/pull/392/commits fixed the bleach error, but travis builds still fail in test_membership_request (work.tests.test_membership_request.MembershipRequestTestCase)