dimagi / required-labels

🏷 Automated label checking for GitHub pull requests
BSD 3-Clause "New" or "Revised" License
47 stars 16 forks source link

Help with using required-labels on github #26

Closed mathomp4 closed 5 years ago

mathomp4 commented 5 years ago

I hope you don't mind the issue, but I'm trying to test using your cool required labels functionality on one of my toy repositories. Note that my issue might be trivial, but I'm a Fortran programmer who works on local clusters. Python, heroku, cloud...it's a bit out of my skillset. :smile:

That said, I tried following your instructions, made a few labels to test with, and added a github token. But when I tries to run, I keep getting 503 errors. So I installed the Heroku CLI and when I look at the logs. So I tried editing one of my labels and:

2019-08-27T15:24:48.826006+00:00 heroku[web.1]: State changed from crashed to starting
2019-08-27T15:24:48.599725+00:00 app[api]: Release v9 created by user fortran@gmail.com
2019-08-27T15:24:48.599725+00:00 app[api]: Set REQUIRED_LABELS_ANY config vars by user fortran@gmail.com
2019-08-27T15:24:52.103929+00:00 heroku[web.1]: Starting process with command `gunicorn main:app`
2019-08-27T15:24:54.446089+00:00 app[web.1]: [2019-08-27 15:24:54 +0000] [4] [INFO] Starting gunicorn 19.9.0
2019-08-27T15:24:54.446620+00:00 app[web.1]: [2019-08-27 15:24:54 +0000] [4] [INFO] Listening at: http://0.0.0.0:31757 (4)
2019-08-27T15:24:54.446721+00:00 app[web.1]: [2019-08-27 15:24:54 +0000] [4] [INFO] Using worker: sync
2019-08-27T15:24:54.450525+00:00 app[web.1]: [2019-08-27 15:24:54 +0000] [10] [INFO] Booting worker with pid: 10
2019-08-27T15:24:54.492920+00:00 app[web.1]: [2019-08-27 15:24:54 +0000] [11] [INFO] Booting worker with pid: 11
2019-08-27T15:24:55.029090+00:00 heroku[web.1]: State changed from starting to crashed
2019-08-27T15:24:54.776792+00:00 app[web.1]: [2019-08-27 15:24:54 +0000] [10] [ERROR] Exception in worker process
2019-08-27T15:24:54.776827+00:00 app[web.1]: Traceback (most recent call last):
2019-08-27T15:24:54.776830+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2019-08-27T15:24:54.776832+00:00 app[web.1]:     worker.init_process()
2019-08-27T15:24:54.776834+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
2019-08-27T15:24:54.776836+00:00 app[web.1]:     self.load_wsgi()
2019-08-27T15:24:54.776838+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2019-08-27T15:24:54.776840+00:00 app[web.1]:     self.wsgi = self.app.wsgi()
2019-08-27T15:24:54.776843+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2019-08-27T15:24:54.776845+00:00 app[web.1]:     self.callable = self.load()
2019-08-27T15:24:54.776847+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2019-08-27T15:24:54.776849+00:00 app[web.1]:     return self.load_wsgiapp()
2019-08-27T15:24:54.776851+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2019-08-27T15:24:54.776853+00:00 app[web.1]:     return util.import_app(self.app_uri)
2019-08-27T15:24:54.776855+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
2019-08-27T15:24:54.776857+00:00 app[web.1]:     __import__(module)
2019-08-27T15:24:54.776859+00:00 app[web.1]:   File "/app/main.py", line 5, in <module>
2019-08-27T15:24:54.776861+00:00 app[web.1]:     from utils import PullRequest
2019-08-27T15:24:54.776863+00:00 app[web.1]:   File "/app/utils.py", line 5, in <module>
2019-08-27T15:24:54.776866+00:00 app[web.1]:     from config import get_token, get_credentials, APP_NAME
2019-08-27T15:24:54.776868+00:00 app[web.1]:   File "/app/config.py", line 70, in <module>
2019-08-27T15:24:54.776870+00:00 app[web.1]:     credentials_configured = any(all([CONFIG['github_pw'], CONFIG['github_user']]), CONFIG['github_token'])
2019-08-27T15:24:54.776877+00:00 app[web.1]: TypeError: any() takes exactly one argument (2 given)
2019-08-27T15:24:54.777316+00:00 app[web.1]: [2019-08-27 15:24:54 +0000] [10] [INFO] Worker exiting (pid: 10)
2019-08-27T15:24:54.850756+00:00 app[web.1]: [2019-08-27 15:24:54 +0000] [11] [ERROR] Exception in worker process
2019-08-27T15:24:54.850759+00:00 app[web.1]: Traceback (most recent call last):
2019-08-27T15:24:54.850761+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2019-08-27T15:24:54.850763+00:00 app[web.1]:     worker.init_process()
2019-08-27T15:24:54.850764+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
2019-08-27T15:24:54.850766+00:00 app[web.1]:     self.load_wsgi()
2019-08-27T15:24:54.850767+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2019-08-27T15:24:54.850769+00:00 app[web.1]:     self.wsgi = self.app.wsgi()
2019-08-27T15:24:54.850771+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2019-08-27T15:24:54.850773+00:00 app[web.1]:     self.callable = self.load()
2019-08-27T15:24:54.850774+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2019-08-27T15:24:54.850776+00:00 app[web.1]:     return self.load_wsgiapp()
2019-08-27T15:24:54.850777+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2019-08-27T15:24:54.850779+00:00 app[web.1]:     return util.import_app(self.app_uri)
2019-08-27T15:24:54.850780+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
2019-08-27T15:24:54.850781+00:00 app[web.1]:     __import__(module)
2019-08-27T15:24:54.850783+00:00 app[web.1]:   File "/app/main.py", line 5, in <module>
2019-08-27T15:24:54.850784+00:00 app[web.1]:     from utils import PullRequest
2019-08-27T15:24:54.850786+00:00 app[web.1]:   File "/app/utils.py", line 5, in <module>
2019-08-27T15:24:54.850787+00:00 app[web.1]:     from config import get_token, get_credentials, APP_NAME
2019-08-27T15:24:54.850789+00:00 app[web.1]:   File "/app/config.py", line 70, in <module>
2019-08-27T15:24:54.850790+00:00 app[web.1]:     credentials_configured = any(all([CONFIG['github_pw'], CONFIG['github_user']]), CONFIG['github_token'])
2019-08-27T15:24:54.850795+00:00 app[web.1]: TypeError: any() takes exactly one argument (2 given)
2019-08-27T15:24:54.851252+00:00 app[web.1]: [2019-08-27 15:24:54 +0000] [11] [INFO] Worker exiting (pid: 11)
2019-08-27T15:24:54.896947+00:00 app[web.1]: Traceback (most recent call last):
2019-08-27T15:24:54.896955+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 210, in run
2019-08-27T15:24:54.897292+00:00 app[web.1]:     self.sleep()
2019-08-27T15:24:54.897299+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 360, in sleep
2019-08-27T15:24:54.897518+00:00 app[web.1]:     ready = select.select([self.PIPE[0]], [], [], 1.0)
2019-08-27T15:24:54.897525+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
2019-08-27T15:24:54.897695+00:00 app[web.1]:     self.reap_workers()
2019-08-27T15:24:54.897702+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2019-08-27T15:24:54.897945+00:00 app[web.1]:     raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2019-08-27T15:24:54.897995+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2019-08-27T15:24:54.897998+00:00 app[web.1]: 
2019-08-27T15:24:54.898000+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2019-08-27T15:24:54.898002+00:00 app[web.1]: 
2019-08-27T15:24:54.898007+00:00 app[web.1]: Traceback (most recent call last):
2019-08-27T15:24:54.898011+00:00 app[web.1]:   File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2019-08-27T15:24:54.898139+00:00 app[web.1]:     sys.exit(run())
2019-08-27T15:24:54.898145+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
2019-08-27T15:24:54.898282+00:00 app[web.1]:     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2019-08-27T15:24:54.898288+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 223, in run
2019-08-27T15:24:54.898458+00:00 app[web.1]:     super(Application, self).run()
2019-08-27T15:24:54.898464+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
2019-08-27T15:24:54.898594+00:00 app[web.1]:     Arbiter(self).run()
2019-08-27T15:24:54.898601+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 232, in run
2019-08-27T15:24:54.898764+00:00 app[web.1]:     self.halt(reason=inst.reason, exit_status=inst.exit_status)
2019-08-27T15:24:54.898770+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 345, in halt
2019-08-27T15:24:54.898967+00:00 app[web.1]:     self.stop()
2019-08-27T15:24:54.898973+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
2019-08-27T15:24:54.899181+00:00 app[web.1]:     time.sleep(0.1)
2019-08-27T15:24:54.899209+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
2019-08-27T15:24:54.899360+00:00 app[web.1]:     self.reap_workers()
2019-08-27T15:24:54.899366+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2019-08-27T15:24:54.899603+00:00 app[web.1]:     raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2019-08-27T15:24:54.899632+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2019-08-27T15:24:55.009197+00:00 heroku[web.1]: Process exited with status 1

Any ideas on what I screwed up?

millerdev commented 5 years ago

Thanks for reporting, @mathomp4. The error you're seeing should be fixed by https://github.com/dimagi/required-labels/pull/27

mathomp4 commented 5 years ago

@millerdev Thanks. I'll wait for the merge...and then probably be back with more questions about what I'm doing wrong! (I can handle Travis and Circle since they are pretty brain-dead. This is my first time doing a webhook by hand.)

millerdev commented 5 years ago

Merged.

mathomp4 commented 5 years ago

@millerdev Confirmed it fixes for me. I had to delete and re-deploy the app through your purple button on your front page, but it works.