Started by timer
Running as SYSTEM
Building remotely on Ubuntu_18.04_bioeng49 (buildslave Testing) in workspace /home/cmiss/Jenkins/workspace/SPARC-API-DEV
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
The recommended git tool is: NONE
No credentials specified
Cloning the remote Git repository
Cloning repository https://github.com/nih-sparc/sparc-api.git
> git init /home/cmiss/Jenkins/workspace/SPARC-API-DEV # timeout=10
Fetching upstream changes from https://github.com/nih-sparc/sparc-api.git
> git --version # timeout=10
> git --version # 'git version 2.25.1'
> git fetch --tags --force --progress -- https://github.com/nih-sparc/sparc-api.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/nih-sparc/sparc-api.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision 44e28f2f0c3b9474cef7c1d33f7e79e77e1a763e (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 44e28f2f0c3b9474cef7c1d33f7e79e77e1a763e # timeout=10
Commit message: "Merge pull request #203 from nih-sparc/update-osparc-services-default-limit"
> git rev-list --no-walk 44e28f2f0c3b9474cef7c1d33f7e79e77e1a763e # timeout=10
[SPARC-API-DEV] $ /bin/sh -xe /tmp/shiningpanda11126439029952815953.sh
+ pwd
+ export PYTHONPATH=/home/cmiss/Jenkins/workspace/SPARC-API-DEV
+ export SCICRUNCH_HOST=https://scicrunch.org/api/1/elastic/SPARC_PortalDatasets_dev
+ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
+ pip install -r requirements.txt
Requirement already satisfied: api==0.0.7 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (0.0.7)
Requirement already satisfied: pennsieve==6.1.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 2)) (6.1.1)
Requirement already satisfied: boto3==1.17.67 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 3)) (1.17.67)
Requirement already satisfied: botocore==1.20.67 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 4)) (1.20.67)
Requirement already satisfied: certifi==2019.11.28 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 5)) (2019.11.28)
Requirement already satisfied: chardet==3.0.4 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 6)) (3.0.4)
Collecting Click==7.1.2 (from -r requirements.txt (line 7))
Using cached click-7.1.2-py2.py3-none-any.whl.metadata (2.9 kB)
Requirement already satisfied: docutils==0.15.2 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 8)) (0.15.2)
Requirement already satisfied: Flask==1.1.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 9)) (1.1.1)
Requirement already satisfied: flask-marshmallow==0.10.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 10)) (0.10.1)
Requirement already satisfied: flask-cors==3.0.8 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 11)) (3.0.8)
Requirement already satisfied: gunicorn==20.0.4 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 12)) (20.0.4)
Requirement already satisfied: idna==2.8 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 13)) (2.8)
Requirement already satisfied: itsdangerous==1.1.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 14)) (1.1.0)
Requirement already satisfied: Jinja2==2.11.3 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 15)) (2.11.3)
Requirement already satisfied: jmespath==0.9.4 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 16)) (0.9.4)
Requirement already satisfied: MarkupSafe==1.1.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 17)) (1.1.1)
Requirement already satisfied: marshmallow==3.2.2 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 18)) (3.2.2)
Requirement already satisfied: nose==1.3.7 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 19)) (1.3.7)
Requirement already satisfied: osparc==0.4.3 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 20)) (0.4.3)
Requirement already satisfied: pillow in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 21)) (10.3.0)
Requirement already satisfied: public==2019.4.13 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 22)) (2019.4.13)
Requirement already satisfied: pytest in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 23)) (5.4.3)
Requirement already satisfied: pymongo==3.8.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 24)) (3.8.0)
Requirement already satisfied: python-dateutil==2.8.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 25)) (2.8.0)
Requirement already satisfied: python-dotenv==0.10.3 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 26)) (0.10.3)
Requirement already satisfied: query-string==2019.4.13 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 27)) (2019.4.13)
Requirement already satisfied: requests==2.25.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 28)) (2.25.1)
Requirement already satisfied: s3transfer==0.4.2 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 29)) (0.4.2)
Requirement already satisfied: sendgrid==6.9.7 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 30)) (6.9.7)
Requirement already satisfied: six==1.13.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 31)) (1.13.0)
Requirement already satisfied: SQLAlchemy==1.3.20 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 32)) (1.3.20)
Requirement already satisfied: urllib3==1.26.4 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 33)) (1.26.4)
Requirement already satisfied: Werkzeug==0.16.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 34)) (0.16.0)
Requirement already satisfied: psycopg2-binary==2.9.5 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 35)) (2.9.5)
Requirement already satisfied: APScheduler==3.7.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 36)) (3.7.0)
Requirement already satisfied: google-api-python-client==2.52.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 37)) (2.52.0)
Requirement already satisfied: oauth2client==4.1.3 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 38)) (4.1.3)
Requirement already satisfied: algoliasearch==2.6.2 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 39)) (2.6.2)
Requirement already satisfied: contentful==1.13.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 40)) (1.13.1)
Requirement already satisfied: contentful_management==2.11.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements.txt (line 41)) (2.11.0)
Requirement already satisfied: configparser>=3.5 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (6.0.1)
Requirement already satisfied: deprecated>=1.2.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (1.2.14)
Requirement already satisfied: future>=0.15.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (1.0.0)
Requirement already satisfied: futures in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (3.0.5)
Requirement already satisfied: protobuf>=3.2.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (4.25.3)
Requirement already satisfied: python-jose==3.2.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (3.2.0)
Requirement already satisfied: pytz>=2016 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (2024.1)
Requirement already satisfied: rsa==4.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (4.0)
Requirement already satisfied: semver>=2.8.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (3.0.2)
Requirement already satisfied: websocket-client>=0.57.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (1.7.0)
Requirement already satisfied: docopt>=0.6 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (0.6.2)
Requirement already satisfied: psutil>=5.4 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements.txt (line 2)) (5.9.8)
Requirement already satisfied: setuptools>=3.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from gunicorn==20.0.4->-r requirements.txt (line 12)) (69.2.0)
Requirement already satisfied: python-http-client>=3.2.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from sendgrid==6.9.7->-r requirements.txt (line 30)) (3.3.7)
Requirement already satisfied: starkbank-ecdsa>=2.0.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from sendgrid==6.9.7->-r requirements.txt (line 30)) (2.2.0)
Requirement already satisfied: tzlocal~=2.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from APScheduler==3.7.0->-r requirements.txt (line 36)) (2.1)
Requirement already satisfied: httplib2<1dev,>=0.15.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 37)) (0.22.0)
Requirement already satisfied: google-auth<3.0.0dev,>=1.19.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 37)) (2.29.0)
Requirement already satisfied: google-auth-httplib2>=0.1.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 37)) (0.2.0)
Requirement already satisfied: google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 37)) (2.18.0)
Requirement already satisfied: uritemplate<5,>=3.0.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from google-api-python-client==2.52.0->-r requirements.txt (line 37)) (4.1.1)
Requirement already satisfied: pyasn1>=0.1.7 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from oauth2client==4.1.3->-r requirements.txt (line 38)) (0.6.0)
Requirement already satisfied: pyasn1-modules>=0.0.5 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from oauth2client==4.1.3->-r requirements.txt (line 38)) (0.4.0)
Requirement already satisfied: ecdsa<0.15 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from python-jose==3.2.0->pennsieve==6.1.1->-r requirements.txt (line 2)) (0.14.1)
Requirement already satisfied: py>=1.5.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest->-r requirements.txt (line 23)) (1.11.0)
Requirement already satisfied: packaging in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest->-r requirements.txt (line 23)) (24.0)
Requirement already satisfied: attrs>=17.4.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest->-r requirements.txt (line 23)) (23.2.0)
Requirement already satisfied: more-itertools>=4.0.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest->-r requirements.txt (line 23)) (10.2.0)
Requirement already satisfied: pluggy<1.0,>=0.12 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest->-r requirements.txt (line 23)) (0.13.1)
Requirement already satisfied: wcwidth in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest->-r requirements.txt (line 23)) (0.2.13)
Requirement already satisfied: wrapt<2,>=1.10 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from deprecated>=1.2.0->pennsieve==6.1.1->-r requirements.txt (line 2)) (1.16.0)
Requirement already satisfied: googleapis-common-protos<2.0.dev0,>=1.56.2 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client==2.52.0->-r requirements.txt (line 37)) (1.63.0)
Requirement already satisfied: proto-plus<2.0.0dev,>=1.22.3 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-api-python-client==2.52.0->-r requirements.txt (line 37)) (1.23.0)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from google-auth<3.0.0dev,>=1.19.0->google-api-python-client==2.52.0->-r requirements.txt (line 37)) (5.3.3)
Requirement already satisfied: pyparsing!=3.0.0,!=3.0.1,!=3.0.2,!=3.0.3,<4,>=2.4.2 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from httplib2<1dev,>=0.15.0->google-api-python-client==2.52.0->-r requirements.txt (line 37)) (3.1.2)
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Installing collected packages: Click
Attempting uninstall: Click
Found existing installation: click 8.1.7
Uninstalling click-8.1.7:
Successfully uninstalled click-8.1.7
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
black 24.3.0 requires click>=8.0.0, but you have click 7.1.2 which is incompatible.
Successfully installed Click-7.1.2
+ pip install -r requirements-dev.txt
Requirement already satisfied: pytest==5.4.3 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements-dev.txt (line 1)) (5.4.3)
Requirement already satisfied: pennsieve==6.1.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements-dev.txt (line 2)) (6.1.1)
Requirement already satisfied: black in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements-dev.txt (line 3)) (24.3.0)
Requirement already satisfied: isort in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements-dev.txt (line 4)) (5.13.2)
Requirement already satisfied: nose in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements-dev.txt (line 5)) (1.3.7)
Requirement already satisfied: packaging in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from -r requirements-dev.txt (line 6)) (24.0)
Requirement already satisfied: py>=1.5.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest==5.4.3->-r requirements-dev.txt (line 1)) (1.11.0)
Requirement already satisfied: attrs>=17.4.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest==5.4.3->-r requirements-dev.txt (line 1)) (23.2.0)
Requirement already satisfied: more-itertools>=4.0.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest==5.4.3->-r requirements-dev.txt (line 1)) (10.2.0)
Requirement already satisfied: pluggy<1.0,>=0.12 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest==5.4.3->-r requirements-dev.txt (line 1)) (0.13.1)
Requirement already satisfied: wcwidth in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pytest==5.4.3->-r requirements-dev.txt (line 1)) (0.2.13)
Requirement already satisfied: boto3 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.17.67)
Requirement already satisfied: configparser>=3.5 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (6.0.1)
Requirement already satisfied: deprecated>=1.2.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.2.14)
Requirement already satisfied: future>=0.15.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.0.0)
Requirement already satisfied: futures in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (3.0.5)
Requirement already satisfied: protobuf>=3.2.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (4.25.3)
Requirement already satisfied: python-jose==3.2.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (3.2.0)
Requirement already satisfied: pytz>=2016 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2024.1)
Requirement already satisfied: requests>=2.18 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2.25.1)
Requirement already satisfied: rsa==4.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (4.0)
Requirement already satisfied: semver>=2.8.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (3.0.2)
Requirement already satisfied: websocket-client>=0.57.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.7.0)
Requirement already satisfied: docopt>=0.6 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.6.2)
Requirement already satisfied: psutil>=5.4 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (5.9.8)
Requirement already satisfied: python-dateutil>=2.8.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2.8.0)
Requirement already satisfied: six<2.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from python-jose==3.2.0->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.13.0)
Requirement already satisfied: ecdsa<0.15 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from python-jose==3.2.0->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.14.1)
Requirement already satisfied: pyasn1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from python-jose==3.2.0->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.6.0)
Collecting click>=8.0.0 (from black->-r requirements-dev.txt (line 3))
Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Requirement already satisfied: mypy-extensions>=0.4.3 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from black->-r requirements-dev.txt (line 3)) (1.0.0)
Requirement already satisfied: pathspec>=0.9.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from black->-r requirements-dev.txt (line 3)) (0.12.1)
Requirement already satisfied: platformdirs>=2 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from black->-r requirements-dev.txt (line 3)) (4.2.0)
Requirement already satisfied: tomli>=1.1.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from black->-r requirements-dev.txt (line 3)) (2.0.1)
Requirement already satisfied: typing-extensions>=4.0.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from black->-r requirements-dev.txt (line 3)) (4.11.0)
Requirement already satisfied: wrapt<2,>=1.10 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from deprecated>=1.2.0->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.16.0)
Requirement already satisfied: chardet<5,>=3.0.2 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from requests>=2.18->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from requests>=2.18->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from requests>=2.18->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.26.4)
Requirement already satisfied: certifi>=2017.4.17 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from requests>=2.18->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (2019.11.28)
Requirement already satisfied: botocore<1.21.0,>=1.20.67 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from boto3->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (1.20.67)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from boto3->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.9.4)
Requirement already satisfied: s3transfer<0.5.0,>=0.4.0 in /home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages (from boto3->pennsieve==6.1.1->-r requirements-dev.txt (line 2)) (0.4.2)
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Installing collected packages: click
Attempting uninstall: click
Found existing installation: click 7.1.2
Uninstalling click-7.1.2:
Successfully uninstalled click-7.1.2
Successfully installed click-8.1.7
+ pytest
============================= test session starts ==============================
platform linux -- Python 3.9.19, pytest-5.4.3, py-1.11.0, pluggy-0.13.1
rootdir: /home/cmiss/Jenkins/workspace/SPARC-API-DEV
collected 101 items
tests/test_api.py ................... [ 18%]
tests/test_biolucida.py ............. [ 31%]
tests/test_dataset_info.py .s..ss..... [ 42%]
tests/test_health.py . [ 43%]
tests/test_monthly_stats.py ...... [ 49%]
tests/test_osparc.py .............. [ 63%]
tests/test_pmr.py ..... [ 68%]
tests/test_scicrunch.py .F.........F....s..F...F.. [ 94%]
tests/test_segmentation_info.py .. [ 96%]
tests/test_thumbnails.py ... [ 99%]
tests/test_update_contentful_entries.py . [100%]
=================================== FAILURES ===================================
____________________ test_scicrunch_versions_are_supported _____________________
self = <urllib3.response.HTTPResponse object at 0x7fa49a0f0be0>
@contextmanager
def _error_catcher(self):
"""
Catch low-level python exceptions, instead re-raising urllib3
variants, so that low-level exceptions are not leaked in the
high-level api.
On exit, release the connection back to the pool.
"""
clean_exit = False
try:
try:
> yield
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:438:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49a0f0be0>, amt = 10240
decode_content = True
def read_chunked(self, amt=None, decode_content=None):
"""
Similar to :meth:`HTTPResponse.read`, but with an additional
parameter: ``decode_content``.
:param amt:
How much of the content to read. If specified, caching is skipped
because it doesn't make sense to cache partial content as the full
response.
:param decode_content:
If True, will attempt to decode the body based on the
'content-encoding' header.
"""
self._init_decoder()
# FIXME: Rewrite this method and make it a class with a better structured logic.
if not self.chunked:
raise ResponseNotChunked(
"Response is not chunked. "
"Header 'transfer-encoding: chunked' is missing."
)
if not self.supports_chunked_reads():
raise BodyNotHttplibCompatible(
"Body should be http.client.HTTPResponse like. "
"It should have have an fp attribute which returns raw chunks."
)
with self._error_catcher():
# Don't bother reading the body of a HEAD request.
if self._original_response and is_response_to_head(self._original_response):
self._original_response.close()
return
# If a response is already read and closed
# then return immediately.
if self._fp.fp is None:
return
while True:
self._update_chunk_length()
if self.chunk_left == 0:
break
> chunk = self._handle_chunk(amt)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:767:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49a0f0be0>, amt = 10240
def _handle_chunk(self, amt):
returned_chunk = None
if amt is None:
chunk = self._fp._safe_read(self.chunk_left)
returned_chunk = chunk
self._fp._safe_read(2) # Toss the CRLF at the end of the chunk.
self.chunk_left = None
elif amt < self.chunk_left:
> value = self._fp._safe_read(amt)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:711:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <http.client.HTTPResponse object at 0x7fa49a0f0580>, amt = 587
def _safe_read(self, amt):
"""Read the number of bytes requested, compensating for partial reads.
Normally, we have a blocking socket, but a read() can be interrupted
by a signal (resulting in a partial read).
Note that we cannot distinguish between EOF and an interrupt when zero
bytes have been read. IncompleteRead() will be raised in this
situation.
This function should be used when <amt> bytes "should" be present for
reading. If the bytes are truly not available (due to EOF), then the
IncompleteRead exception can be used to detect the problem.
"""
s = []
while amt > 0:
chunk = self.fp.read(min(amt, MAXAMOUNT))
if not chunk:
> raise IncompleteRead(b''.join(s), amt)
E http.client.IncompleteRead: IncompleteRead(9653 bytes read, 587 more expected)
/usr/lib/python3.9/http/client.py:628: IncompleteRead
During handling of the above exception, another exception occurred:
def generate():
# Special case for urllib3.
if hasattr(self.raw, 'stream'):
try:
> for chunk in self.raw.stream(chunk_size, decode_content=True):
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/models.py:753:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49a0f0be0>, amt = 10240
decode_content = True
def stream(self, amt=2 ** 16, decode_content=None):
"""
A generator wrapper for the read() method. A call will block until
``amt`` bytes have been read from the connection or until the
connection is closed.
:param amt:
How much of the content to read. The generator will return up to
much data per iteration, but may return less. This is particularly
likely when using compressed data. However, the empty string will
never be returned.
:param decode_content:
If True, will attempt to decode the body based on the
'content-encoding' header.
"""
if self.chunked and self.supports_chunked_reads():
> for line in self.read_chunked(amt, decode_content=decode_content):
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:572:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49a0f0be0>, amt = 10240
decode_content = True
def read_chunked(self, amt=None, decode_content=None):
"""
Similar to :meth:`HTTPResponse.read`, but with an additional
parameter: ``decode_content``.
:param amt:
How much of the content to read. If specified, caching is skipped
because it doesn't make sense to cache partial content as the full
response.
:param decode_content:
If True, will attempt to decode the body based on the
'content-encoding' header.
"""
self._init_decoder()
# FIXME: Rewrite this method and make it a class with a better structured logic.
if not self.chunked:
raise ResponseNotChunked(
"Response is not chunked. "
"Header 'transfer-encoding: chunked' is missing."
)
if not self.supports_chunked_reads():
raise BodyNotHttplibCompatible(
"Body should be http.client.HTTPResponse like. "
"It should have have an fp attribute which returns raw chunks."
)
with self._error_catcher():
# Don't bother reading the body of a HEAD request.
if self._original_response and is_response_to_head(self._original_response):
self._original_response.close()
return
# If a response is already read and closed
# then return immediately.
if self._fp.fp is None:
return
while True:
self._update_chunk_length()
if self.chunk_left == 0:
break
chunk = self._handle_chunk(amt)
decoded = self._decode(
chunk, decode_content=decode_content, flush_decoder=False
)
if decoded:
yield decoded
if decode_content:
# On CPython and PyPy, we should never need to flush the
# decoder. However, on Jython we *might* need to, so
# lets defensively do it anyway.
decoded = self._flush_decoder()
if decoded: # Platform-specific: Jython.
yield decoded
# Chunk content ends with \r\n: discard it.
while True:
line = self._fp.fp.readline()
if not line:
# Some sites may not end with '\r\n'.
break
if line == b"\r\n":
break
# We read everything; close the "file".
if self._original_response:
> self._original_response.close()
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:793:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <contextlib._GeneratorContextManager object at 0x7fa49a0f0d60>
typ = <class 'http.client.IncompleteRead'>
value = IncompleteRead(9653 bytes read, 587 more expected)
traceback = <traceback object at 0x7fa499293c80>
def __exit__(self, typ, value, traceback):
if typ is None:
try:
next(self.gen)
except StopIteration:
return False
else:
raise RuntimeError("generator didn't stop")
else:
if value is None:
# Need to force instantiation so we can reliably
# tell if we get the same exception back
value = typ()
try:
> self.gen.throw(typ, value, traceback)
/usr/lib/python3.9/contextlib.py:137:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49a0f0be0>
@contextmanager
def _error_catcher(self):
"""
Catch low-level python exceptions, instead re-raising urllib3
variants, so that low-level exceptions are not leaked in the
high-level api.
On exit, release the connection back to the pool.
"""
clean_exit = False
try:
try:
yield
except SocketTimeout:
# FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
# there is yet no clean way to get at it from this context.
raise ReadTimeoutError(self._pool, None, "Read timed out.")
except BaseSSLError as e:
# FIXME: Is there a better way to differentiate between SSLErrors?
if "read operation timed out" not in str(e):
# SSL errors related to framing/MAC get wrapped and reraised here
raise SSLError(e)
raise ReadTimeoutError(self._pool, None, "Read timed out.")
except (HTTPException, SocketError) as e:
# This includes IncompleteRead.
> raise ProtocolError("Connection broken: %r" % e, e)
E urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(9653 bytes read, 587 more expected)', IncompleteRead(9653 bytes read, 587 more expected))
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:455: ProtocolError
During handling of the above exception, another exception occurred:
def test_scicrunch_versions_are_supported():
# Lines below are to allow the test to be run from the root dir or sparc-api/tests
current_directory = os.path.dirname(os.path.abspath(__file__))
app_directory = os.path.join(current_directory, '..', 'app')
# List the contents of the 'app' directory, to find which versions we have files for
available_versions = os.listdir(app_directory)
> r = requests.get(f'{Config.SCI_CRUNCH_HOST}/_search?api_key={Config.KNOWLEDGEBASE_KEY}&q=""')
tests/test_scicrunch.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/api.py:76: in get
return request('get', url, params=params, **kwargs)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/api.py:61: in request
return session.request(method=method, url=url, **kwargs)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/sessions.py:542: in request
resp = self.send(prep, **send_kwargs)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/sessions.py:697: in send
r.content
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/models.py:831: in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def generate():
# Special case for urllib3.
if hasattr(self.raw, 'stream'):
try:
for chunk in self.raw.stream(chunk_size, decode_content=True):
yield chunk
except ProtocolError as e:
> raise ChunkedEncodingError(e)
E requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(9653 bytes read, 587 more expected)', IncompleteRead(9653 bytes read, 587 more expected))
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/models.py:756: ChunkedEncodingError
______________________ test_scicrunch_combined_facet_text ______________________
client = <FlaskClient <Flask 'app.main'>>
def test_scicrunch_combined_facet_text(client):
r = client.get('/filter-search/heart/?facet=All+Species&term=species&facet=male&term=gender&facet=female&term=gender')
> assert json.loads(r.data)['numberOfHits'] > 1
E KeyError: 'numberOfHits'
tests/test_scicrunch.py:145: KeyError
_________________________ test_raw_response_structure __________________________
self = <urllib3.response.HTTPResponse object at 0x7fa49962b0d0>
@contextmanager
def _error_catcher(self):
"""
Catch low-level python exceptions, instead re-raising urllib3
variants, so that low-level exceptions are not leaked in the
high-level api.
On exit, release the connection back to the pool.
"""
clean_exit = False
try:
try:
> yield
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:438:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49962b0d0>, amt = 10240
decode_content = True
def read_chunked(self, amt=None, decode_content=None):
"""
Similar to :meth:`HTTPResponse.read`, but with an additional
parameter: ``decode_content``.
:param amt:
How much of the content to read. If specified, caching is skipped
because it doesn't make sense to cache partial content as the full
response.
:param decode_content:
If True, will attempt to decode the body based on the
'content-encoding' header.
"""
self._init_decoder()
# FIXME: Rewrite this method and make it a class with a better structured logic.
if not self.chunked:
raise ResponseNotChunked(
"Response is not chunked. "
"Header 'transfer-encoding: chunked' is missing."
)
if not self.supports_chunked_reads():
raise BodyNotHttplibCompatible(
"Body should be http.client.HTTPResponse like. "
"It should have have an fp attribute which returns raw chunks."
)
with self._error_catcher():
# Don't bother reading the body of a HEAD request.
if self._original_response and is_response_to_head(self._original_response):
self._original_response.close()
return
# If a response is already read and closed
# then return immediately.
if self._fp.fp is None:
return
while True:
self._update_chunk_length()
if self.chunk_left == 0:
break
> chunk = self._handle_chunk(amt)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:767:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49962b0d0>, amt = 10240
def _handle_chunk(self, amt):
returned_chunk = None
if amt is None:
chunk = self._fp._safe_read(self.chunk_left)
returned_chunk = chunk
self._fp._safe_read(2) # Toss the CRLF at the end of the chunk.
self.chunk_left = None
elif amt < self.chunk_left:
> value = self._fp._safe_read(amt)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:711:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <http.client.HTTPResponse object at 0x7fa49962bf40>, amt = 2803
def _safe_read(self, amt):
"""Read the number of bytes requested, compensating for partial reads.
Normally, we have a blocking socket, but a read() can be interrupted
by a signal (resulting in a partial read).
Note that we cannot distinguish between EOF and an interrupt when zero
bytes have been read. IncompleteRead() will be raised in this
situation.
This function should be used when <amt> bytes "should" be present for
reading. If the bytes are truly not available (due to EOF), then the
IncompleteRead exception can be used to detect the problem.
"""
s = []
while amt > 0:
chunk = self.fp.read(min(amt, MAXAMOUNT))
if not chunk:
> raise IncompleteRead(b''.join(s), amt)
E http.client.IncompleteRead: IncompleteRead(7437 bytes read, 2803 more expected)
/usr/lib/python3.9/http/client.py:628: IncompleteRead
During handling of the above exception, another exception occurred:
def generate():
# Special case for urllib3.
if hasattr(self.raw, 'stream'):
try:
> for chunk in self.raw.stream(chunk_size, decode_content=True):
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/models.py:753:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49962b0d0>, amt = 10240
decode_content = True
def stream(self, amt=2 ** 16, decode_content=None):
"""
A generator wrapper for the read() method. A call will block until
``amt`` bytes have been read from the connection or until the
connection is closed.
:param amt:
How much of the content to read. The generator will return up to
much data per iteration, but may return less. This is particularly
likely when using compressed data. However, the empty string will
never be returned.
:param decode_content:
If True, will attempt to decode the body based on the
'content-encoding' header.
"""
if self.chunked and self.supports_chunked_reads():
> for line in self.read_chunked(amt, decode_content=decode_content):
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:572:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49962b0d0>, amt = 10240
decode_content = True
def read_chunked(self, amt=None, decode_content=None):
"""
Similar to :meth:`HTTPResponse.read`, but with an additional
parameter: ``decode_content``.
:param amt:
How much of the content to read. If specified, caching is skipped
because it doesn't make sense to cache partial content as the full
response.
:param decode_content:
If True, will attempt to decode the body based on the
'content-encoding' header.
"""
self._init_decoder()
# FIXME: Rewrite this method and make it a class with a better structured logic.
if not self.chunked:
raise ResponseNotChunked(
"Response is not chunked. "
"Header 'transfer-encoding: chunked' is missing."
)
if not self.supports_chunked_reads():
raise BodyNotHttplibCompatible(
"Body should be http.client.HTTPResponse like. "
"It should have have an fp attribute which returns raw chunks."
)
with self._error_catcher():
# Don't bother reading the body of a HEAD request.
if self._original_response and is_response_to_head(self._original_response):
self._original_response.close()
return
# If a response is already read and closed
# then return immediately.
if self._fp.fp is None:
return
while True:
self._update_chunk_length()
if self.chunk_left == 0:
break
chunk = self._handle_chunk(amt)
decoded = self._decode(
chunk, decode_content=decode_content, flush_decoder=False
)
if decoded:
yield decoded
if decode_content:
# On CPython and PyPy, we should never need to flush the
# decoder. However, on Jython we *might* need to, so
# lets defensively do it anyway.
decoded = self._flush_decoder()
if decoded: # Platform-specific: Jython.
yield decoded
# Chunk content ends with \r\n: discard it.
while True:
line = self._fp.fp.readline()
if not line:
# Some sites may not end with '\r\n'.
break
if line == b"\r\n":
break
# We read everything; close the "file".
if self._original_response:
> self._original_response.close()
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:793:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <contextlib._GeneratorContextManager object at 0x7fa49962b1f0>
typ = <class 'http.client.IncompleteRead'>
value = IncompleteRead(7437 bytes read, 2803 more expected)
traceback = <traceback object at 0x7fa49a0e3cc0>
def __exit__(self, typ, value, traceback):
if typ is None:
try:
next(self.gen)
except StopIteration:
return False
else:
raise RuntimeError("generator didn't stop")
else:
if value is None:
# Need to force instantiation so we can reliably
# tell if we get the same exception back
value = typ()
try:
> self.gen.throw(typ, value, traceback)
/usr/lib/python3.9/contextlib.py:137:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.response.HTTPResponse object at 0x7fa49962b0d0>
@contextmanager
def _error_catcher(self):
"""
Catch low-level python exceptions, instead re-raising urllib3
variants, so that low-level exceptions are not leaked in the
high-level api.
On exit, release the connection back to the pool.
"""
clean_exit = False
try:
try:
yield
except SocketTimeout:
# FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
# there is yet no clean way to get at it from this context.
raise ReadTimeoutError(self._pool, None, "Read timed out.")
except BaseSSLError as e:
# FIXME: Is there a better way to differentiate between SSLErrors?
if "read operation timed out" not in str(e):
# SSL errors related to framing/MAC get wrapped and reraised here
raise SSLError(e)
raise ReadTimeoutError(self._pool, None, "Read timed out.")
except (HTTPException, SocketError) as e:
# This includes IncompleteRead.
> raise ProtocolError("Connection broken: %r" % e, e)
E urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(7437 bytes read, 2803 more expected)', IncompleteRead(7437 bytes read, 2803 more expected))
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/urllib3/response.py:455: ProtocolError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_raw_response_structure(client):
# 10.26275/zdxd-84xz
# 10.26275/duz8-mq3n
query = create_query_string("computational")
> data = dataset_search(query)
tests/test_scicrunch.py:425:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
app/main.py:652: in dataset_search
response = requests.post(f'{Config.SCI_CRUNCH_HOST}/_search',
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/api.py:119: in post
return request('post', url, data=data, json=json, **kwargs)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/api.py:61: in request
return session.request(method=method, url=url, **kwargs)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/sessions.py:542: in request
resp = self.send(prep, **send_kwargs)
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/sessions.py:697: in send
r.content
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/models.py:831: in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def generate():
# Special case for urllib3.
if hasattr(self.raw, 'stream'):
try:
for chunk in self.raw.stream(chunk_size, decode_content=True):
yield chunk
except ProtocolError as e:
> raise ChunkedEncodingError(e)
E requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(7437 bytes read, 2803 more expected)', IncompleteRead(7437 bytes read, 2803 more expected))
../../shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/requests/models.py:756: ChunkedEncodingError
_____________________________ test_scaffold_files ______________________________
client = <FlaskClient <Flask 'app.main'>>
def test_scaffold_files(client):
r = client.get('/filter-search/?size=30')
results = json.loads(r.data)
> assert results['numberOfHits'] > 0
E KeyError: 'numberOfHits'
tests/test_scicrunch.py:497: KeyError
=============================== warnings summary ===============================
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/apscheduler/__init__.py:1
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/apscheduler/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import get_distribution, DistributionNotFound
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/marshmallow/__init__.py:17
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/marshmallow/__init__.py:17: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
__version_info__ = tuple(LooseVersion(__version__).version)
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_marshmallow/__init__.py:34
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_marshmallow/__init__.py:34: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
__version_info__ = tuple(LooseVersion(__version__).version)
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:19
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:19: DeprecationWarning: Call to deprecated create function FileDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
DESCRIPTOR = _descriptor.FileDescriptor(
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:36
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:36: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_descriptor.FieldDescriptor(
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:53
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:53: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_descriptor.FieldDescriptor(
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:70
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:70: DeprecationWarning: Call to deprecated create function FieldDescriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_descriptor.FieldDescriptor(
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:29
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:29: DeprecationWarning: Call to deprecated create function Descriptor(). Note: Create unlinked descriptors is going to go away. Please use get/find descriptors from generated code or query the descriptor_pool.
_CACHESEGMENT = _descriptor.Descriptor(
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/nose/importer.py:12
/home/cmiss/Jenkins/shiningpanda/jobs/7c726052/virtualenvs/d41d8cd9/lib/python3.9/site-packages/nose/importer.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
from imp import find_module, load_module, acquire_lock, release_lock
tests/test_health.py::test_request_response
/home/cmiss/Jenkins/workspace/SPARC-API-DEV/tests/test_health.py:13: DeprecationWarning: Please use assertEqual instead.
assert_equals("healthy", json_response.get("status"))
-- Docs: https://docs.pytest.org/en/latest/warnings.html
=========================== short test summary info ============================
FAILED tests/test_scicrunch.py::test_scicrunch_versions_are_supported - reque...
FAILED tests/test_scicrunch.py::test_scicrunch_combined_facet_text - KeyError...
FAILED tests/test_scicrunch.py::test_raw_response_structure - requests.except...
FAILED tests/test_scicrunch.py::test_scaffold_files - KeyError: 'numberOfHits'
====== 4 failed, 93 passed, 4 skipped, 10 warnings in 1416.32s (0:23:36) =======
Build step 'Virtualenv Builder' marked build as failure
[Slack Notifications] found #865 as previous completed, non-aborted build
[Slack Notifications] will send OnEveryFailureNotification because build matches and user preferences allow it
Finished: FAILURE