Closed chadwhitacre closed 9 years ago
It looks like it's not picking up the database configuration and it's using a default (travis
).
One idea I had is that the test deps update (#3017) updated honcho: we're using a fork. That doesn't pan out though. Other hypotheses?
From the Travis log it looks like the problem is coming from this line:
echo "DROP SCHEMA public CASCADE" | psql $DATABASE_URL
So DATABASE_URL
is not getting set properly?
Today we're happy to announce our new build infrastructure
http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
Not relevant. The new infrastructure is opt-in, and we haven't opted in.
I'm going to push commits to #3011 to debug the problem. I'll force-push those off once I'm done.
Hypothesis: DATABASE_URL
is not set properly in the env files.
Test: cat
the env files and inspect them.
Here's the env files:
https://travis-ci.org/gratipay/gratipay.com/builds/44458444
defaults
====================
DATABASE_URL="dbname=gratipay"
[snip]
tests/test.env
====================
DATABASE_URL="dbname=gratipay-test"
CANONICAL_HOST=
UPDATE_HOMEPAGE_EVERY=0
CHECK_DB_EVERY=0
RAISE_CARD_EXPIRATION=yes
GRATIPAY_CACHE_STATIC=yes
tests/local.env
====================
DATABASE_URL=dbname=gratipay
Hypothesis: Nothing whatsoever from the env files make it into recreate-schema.sh
.
Test: Output something besides DATABASE_URL
.
Hypothesis: The lack of quotes in DATABASE_URL=dbname=gratipay
in tests/local.env
is causing the problem.
Test: Add quotes.
Nothing whatsoever from the env files make it into
recreate-schema.sh
.
Well, I effed up the tracer in tests/local.env
, but the results are nonetheless conclusive: the hypothesis is confirmed!
Hypothesis: The lack of quotes in DATABASE_URL=dbname=gratipay in tests/local.env is causing the problem.
None of the tracers are getting picked up.
What he said. :-)
Oops, didnt' see the above comment.
Yoiks. We can see envvars from the base environment, just nothing from our env files. Makes it sound like a honcho problem, but we do seem to be using the same version locally and at Travis. What gives?
We retried several previously passing commits, and they fail. @rohitpaulk is pinging Travis. IRC
Python was upgraded from 2.7.8 to 2.7.9 earlier this week
After upgrading to python 2.7.9 tests are failing for me:
tests/py/test_anonymous_json.py:4: in <module>
from gratipay.testing import Harness
gratipay/testing/__init__.py:55: in <module>
class Harness(unittest.TestCase):
gratipay/testing/__init__.py:57: in Harness
client = ClientWithAuth(www_root=WWW_ROOT, project_root=PROJECT_ROOT)
gratipay/testing/__init__.py:31: in __init__
Client.website = Client.hydrate_website(self)
env/lib/python2.7/site-packages/aspen/testing/client.py:66: in hydrate_website
self._website = Website(argv)
env/lib/python2.7/site-packages/aspen/website.py:35: in __init__
self.configure(argv)
env/lib/python2.7/site-packages/aspen/configuration/__init__.py:295: in configure
self.run_config_scripts()
env/lib/python2.7/site-packages/aspen/configuration/__init__.py:338: in run_config_scripts
execfile(filepath, {'website': self})
configure-aspen.py:64: in <module>
env = website.env = gratipay.wireup.env()
gratipay/wireup.py:429: in env
raise BadEnvironment("Missing envvar{}: {}.".format(plural, keys))
E BadEnvironment: Missing envvars: BALANCED_API_SECRET, BITBUCKET_CALLBACK, BITBUCKET_CONSUMER_KEY, BITBUCKET_CONSUMER_SECRET, BOUNTYSOURCE_API_HOST, BOUNTYSOURCE_API_SECRET, BOUNTYSOURCE_CALLBACK, BOUNTYSOURCE_WWW_HOST, CANONICAL_HOST, CANONICAL_SCHEME, CHECK_DB_EVERY, DATABASE_MAXCONN, DATABASE_URL, FACEBOOK_APP_ID, FACEBOOK_APP_SECRET, FACEBOOK_CALLBACK, GITHUB_CALLBACK, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, GOOGLE_ANALYTICS_ID, GOOGLE_CALLBACK, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GRATIPAY_ASSET_URL, GRATIPAY_CACHE_STATIC, GRATIPAY_COMPRESS_ASSETS, GUNICORN_OPTS, LOG_METRICS, MANDRILL_KEY, NANSWERS_THRESHOLD, OPENSTREETMAP_API_URL, OPENSTREETMAP_AUTH_URL, OPENSTREETMAP_CALLBACK, OPENSTREETMAP_CONSUMER_KEY, OPENSTREETMAP_CONSUMER_SECRET, OPTIMIZELY_ID, RAISE_CARD_EXPIRATION, SENTRY_DSN, TWITTER_CALLBACK, TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET, UPDATE_GLOBAL_STATS_EVERY, VENMO_CALLBACK, VENMO_CLIENT_ID, VENMO_CLIENT_SECRET.
It's clear that honcho is silently failing to inject the variables into the env.
nickstenning/honcho#121
Travis is failing on #3011 and #3020 with this error:
What's up? IRC