Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Fix otb sync_npm test failures #4321

Closed
chadwhitacre opened this issue Feb 2, 2017 · 8 comments
Closed

Fix otb sync_npm test failures #4321

chadwhitacre opened this issue Feb 2, 2017 · 8 comments

Comments

@chadwhitacre
Copy link
Contributor

@JessaWitzel @jacqueline-homan and @dmk246 are all hitting three test failures in test_sync_npm.py. This seems to be the worst of our onboarding problems right now. Let's fix it! :-)

Steps to repro are basically to follow the readme on a fresh (Ubuntu?) system.

@chadwhitacre
Copy link
Contributor Author

I'm seeing this myself now, but I see a Traceback prior to the failure that shows the error in the sync-npm script that is resulting in the failure. Anyone able to provide a traceback from your environment? That should give us a clue to debug here.

Fpid-26175 thread-140735301169920 (MainThread) Won't log to Sentry (SENTRY_DSN is empty).
skipping None
skipping {u'package_manager': 'npm', u'name': u'_updated', u'emails': [], u'description': ''}
processed 1 packages in   0 seconds
pid-26183 thread-140735301169920 (MainThread) Won't log to Sentry (SENTRY_DSN is empty).
Traceback (most recent call last):
  File "env/bin/sync-npm", line 9, in <module>
    load_entry_point('gratipay', 'console_scripts', 'sync-npm')()
  File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/sync_npm/cli.py", line 42, in main
    subcommands[args.command](env, args, db)
  File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/sync_npm/upsert.py", line 57, in main
    upsert(env, args, db)
  File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/sync_npm/upsert.py", line 29, in upsert
    "FROM STDIN WITH (FORMAT csv, NULL '%s')" % NULL, fp)
psycopg2.ProgrammingError: column "emails" of relation "updates" does not exist

Fpid-26134 thread-140735301169920 (MainThread) Won't log to Sentry (SENTRY_DSN is empty).
.

======================================================== FAILURES ========================================================
___________________________________ Tests.test_sn_handles_empty_description_and_emails ___________________________________
Traceback (most recent call last):
  File "/Users/whit537/personal/gratipay/gratipay.com/tests/py/test_sync_npm.py", line 94, in test_sn_handles_empty_description_and_emails
    assert package.package_manager == 'npm'
AttributeError: 'NoneType' object has no attribute 'package_manager'
_____________________________________________ Tests.test_sn_handles_quoting ______________________________________________
Traceback (most recent call last):
  File "/Users/whit537/personal/gratipay/gratipay.com/tests/py/test_sync_npm.py", line 76, in test_sn_handles_quoting
    assert package.package_manager == 'npm'
AttributeError: 'NoneType' object has no attribute 'package_manager'
_____________________________________________ Tests.test_sn_inserts_packages _____________________________________________
Traceback (most recent call last):
  File "/Users/whit537/personal/gratipay/gratipay.com/tests/py/test_sync_npm.py", line 56, in test_sn_inserts_packages
    assert package.package_manager == 'npm'
AttributeError: 'NoneType' object has no attribute 'package_manager'
========================================== 3 failed, 2 passed in 15.45 seconds ===========================================
[gratipay] $

@chadwhitacre
Copy link
Contributor Author

(In my case the underlying traceback is due to changes I just started making while hacking on new stuff.)

@chadwhitacre
Copy link
Contributor Author

(So it's not relevant to the out-of-the-box failures.)

@dmk246
Copy link
Contributor

dmk246 commented Feb 8, 2017

A clue ... if we run the test with

env/bin/honcho run -e defaults.env,local.env,tests/test.env ./env/bin/py.test tests/py/

it passes

if we run make pytest it fails

@dmk246
Copy link
Contributor

dmk246 commented Feb 16, 2017

It passed when we removed --cov from the make file
Next step: run env test with --cov and see what happens

@chadwhitacre
Copy link
Contributor Author

Did this perhaps get fixed as a side-effect of #4438?

@chadwhitacre
Copy link
Contributor Author

@dmk246 Can you try reproducing this error again? I think it got fixed in #4438.

@dmk246
Copy link
Contributor

dmk246 commented Jun 1, 2017

@whit537 I am sorry for the delay. I had some other issues that came up when I ran this again. But now I can say that that specific error is indeed fixed! Thanks for your patience!

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

No branches or pull requests

2 participants