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

[WIP] Upgrade python to 3.8.12 #5084

Closed
wants to merge 1 commit into from

Conversation

johnnyporkchops
Copy link
Contributor

@johnnyporkchops johnnyporkchops commented Mar 18, 2022

Summary (required)

Upgrade OpenFEC python runtime to 3.8.12

Required reviewers

Two backend

Impacted areas of the application

modified:   .circleci/config.yml
modified:   README.md
modified:   runtime.txt

Related PRs

Previous upgrade to 3.7.4:
#3961:

How to test

Helpfful FEC WIki page for considerations when updating python locally and at the app level: https://github.com/fecgov/openFEC/wiki/Updating-Python

  • checkout this branch
  • pip install -r {requirements.txt, requirements-dev.txt}
  • activate a virtual environment for python@3.8.12
  • pytest
  • nvm use --lts
  • npm install -g swagger-tools
  • npm install
  • npm run build
  • run local api and test swagger-ui
  • run local cms and point to local api, run redis and celery worker to test downloads
  • Maybe push to dev and test

@pkfec
Copy link
Contributor

pkfec commented Mar 21, 2022

Locust test script is failing with the following error:

venv-api-3812) macadmins-mbp-5:openFEC pkasireddy$ locust --host=https://fec-dev-api.app.cloud.gov/v1/
[2022-03-21 11:40:40,442] macadmins-mbp-5.lan/INFO/locust.main: Starting web monitor at *:8089
[2022-03-21 11:40:40,442] macadmins-mbp-5.lan/INFO/locust.main: Starting Locust 0.10.0
[2022-03-21 11:40:40,482] macadmins-mbp-5.lan/ERROR/stderr: Traceback (most recent call last):
[2022-03-21 11:40:40,482] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,482] macadmins-mbp-5.lan/ERROR/stderr: File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
[2022-03-21 11:40:40,482] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,482] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/locust/web.py", line 167, in start
    pywsgi.WSGIServer((options.web_host, options.port),
[2022-03-21 11:40:40,483] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,483] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/baseserver.py", line 367, in serve_forever
    self.start()
[2022-03-21 11:40:40,483] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,483] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/baseserver.py", line 305, in start
    self.init_socket()
[2022-03-21 11:40:40,483] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,483] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/pywsgi.py", line 1491, in init_socket
    self.update_environ()
[2022-03-21 11:40:40,483] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,483] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/pywsgi.py", line 1503, in update_environ
    name = socket.getfqdn(address[0])
[2022-03-21 11:40:40,483] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,484] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/_socketcommon.py", line 269, in getfqdn
    hostname, aliases, _ = gethostbyaddr(name)
[2022-03-21 11:40:40,484] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,484] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/_socketcommon.py", line 241, in gethostbyaddr
    return get_hub().resolver.gethostbyaddr(ip_address)
[2022-03-21 11:40:40,484] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,484] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/resolver/thread.py", line 68, in gethostbyaddr
    return self.pool.apply(_socket.gethostbyaddr, args, kwargs)
[2022-03-21 11:40:40,484] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,493] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/pool.py", line 159, in apply
    return self.spawn(func, *args, **kwds).get()
[2022-03-21 11:40:40,494] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,494] macadmins-mbp-5.lan/ERROR/stderr: File "src/gevent/event.py", line 268, in gevent._event.AsyncResult.get
[2022-03-21 11:40:40,494] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,494] macadmins-mbp-5.lan/ERROR/stderr: File "src/gevent/event.py", line 296, in gevent._event.AsyncResult.get
[2022-03-21 11:40:40,494] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,494] macadmins-mbp-5.lan/ERROR/stderr: File "src/gevent/event.py", line 286, in gevent._event.AsyncResult.get
[2022-03-21 11:40:40,494] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,494] macadmins-mbp-5.lan/ERROR/stderr: File "src/gevent/event.py", line 266, in gevent._event.AsyncResult._raise_exception
[2022-03-21 11:40:40,496] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,496] macadmins-mbp-5.lan/ERROR/stderr: File "src/gevent/event.py", line 211, in gevent._event.AsyncResult.exc_info.__get__
[2022-03-21 11:40:40,496] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,496] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/_tblib.py", line 371, in g
    return f(a)
[2022-03-21 11:40:40,496] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,496] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/_tblib.py", line 432, in load_traceback
    return loads(s)
[2022-03-21 11:40:40,496] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,496] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/_tblib.py", line 337, in unpickle_traceback
    return ret.as_traceback()
[2022-03-21 11:40:40,497] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,497] macadmins-mbp-5.lan/ERROR/stderr: File "/Users/pkasireddy/.pyenv/versions/3.8.12/envs/venv-api-3812/lib/python3.8/site-packages/gevent/_tblib.py", line 202, in as_traceback
    code = CodeType(
[2022-03-21 11:40:40,497] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,497] macadmins-mbp-5.lan/ERROR/stderr: TypeError: an integer is required (got type bytes)
[2022-03-21 11:40:40,497] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,497] macadmins-mbp-5.lan/ERROR/stderr: 2022-03-21T15:40:40Z
[2022-03-21 11:40:40,497] macadmins-mbp-5.lan/ERROR/stderr:
[2022-03-21 11:40:40,498] macadmins-mbp-5.lan/ERROR/stderr: <Greenlet at 0x10d2237b0: start([<class 'locustfile.Swarm'>], <Values at 0x10d285670: {'host': 'https://fec-dev/-)> failed with TypeError

@pkfec
Copy link
Contributor

pkfec commented May 5, 2022

closing in favor of #5126

@pkfec pkfec closed this May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Python version to 3.8
2 participants