Started by user Alan Wu
Running as SYSTEM
Building remotely on Ubuntu_18.04_bioeng49 (buildslave Testing) in workspace /home/cmiss/Jenkins/workspace/SPARC-API
[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 # 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 00d3f3a773542605a432eb25fbaedfaded748f20 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 00d3f3a773542605a432eb25fbaedfaded748f20 # timeout=10
Commit message: "Merge pull request #225 from nih-sparc/Add-file-size-check-to-segmentation-info-endpoint"
> git rev-list --no-walk 00d3f3a773542605a432eb25fbaedfaded748f20 # timeout=10
[SPARC-API] $ /bin/sh -xe /tmp/shiningpanda6723625240930387153.sh
+ pwd
+ export PYTHONPATH=/home/cmiss/Jenkins/workspace/SPARC-API
+ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
+ pip install -r requirements.txt
Requirement already satisfied: api==0.0.7 in /home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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
[notice] A new release of pip is available: 24.0 -> 24.1.2
[notice] To update, run: pip install --upgrade pip
+ pip install -r requirements-dev.txt
Requirement already satisfied: pytest==5.4.3 in /home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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/c6a9534b/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
[notice] A new release of pip is available: 24.0 -> 24.1.2
[notice] To update, run: pip install --upgrade pip
+ 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
collected 106 items
tests/test_api.py F.FF.F............. [ 17%]
tests/test_biolucida.py ............. [ 30%]
tests/test_dataset_info.py .s..ss..... [ 40%]
tests/test_health.py . [ 41%]
tests/test_monthly_stats.py ...... [ 47%]
tests/test_osparc.py .............. [ 60%]
tests/test_pmr.py ......... [ 68%]
tests/test_scicrunch.py .................s......... [ 94%]
tests/test_segmentation_info.py FF [ 96%]
tests/test_thumbnails.py F.. [ 99%]
tests/test_update_contentful_entries.py . [100%]
=================================== FAILURES ===================================
_____________________ test_direct_download_url_small_file ______________________
path = '76/2/files/derivative/Scaffold/mouseColon_metadata.json'
bucket_name = 'pennsieve-prod-discover-publish-use1'
def s3_header_check(path, bucket_name):
try:
> head_response = s3.head_object(
Bucket=bucket_name,
Key=path,
RequestPayer="requester"
)
app/main.py:426:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>, args = ()
kwargs = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '76/2/files/derivative/Scaffold/mouseColon_metadata.json', 'RequestPayer': 'requester'}
def _api_call(self, *args, **kwargs):
# We're accepting *args so that we can give a more helpful
# error message than TypeError: _api_call takes exactly
# 1 argument.
if args:
raise TypeError(
"%s() only accepts keyword arguments." % py_operation_name)
# The "self" in this scope is referring to the BaseClient.
> return self._make_api_call(operation_name, kwargs)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:357:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>
operation_name = 'HeadObject'
api_params = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '76/2/files/derivative/Scaffold/mouseColon_metadata.json', 'RequestPayer': 'requester'}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record('API_CALL', {
'service': service_name,
'operation': operation_name,
'params': api_params,
})
if operation_model.deprecated:
logger.debug('Warning: %s.%s() is deprecated',
service_name, operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
'before-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._make_request(
operation_model, request_dict, request_context)
self.meta.events.emit(
'after-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:676: ClientError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_direct_download_url_small_file(client):
small_s3_file = '76%2F2%2Ffiles%2Fderivative%2FScaffold%2FmouseColon_metadata.json'
> r = client.get(f"/s3-resource/{small_s3_file}")
tests/test_api.py:20:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/testing.py:222: in open
return Client.open(
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:455: in direct_download_url
response = s3_header_check(path, s3BucketName)
app/main.py:439: in s3_header_check
abort(err.response["Error"]["Code"], err.response["Error"]["Message"])
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:772: in abort
return _aborter(status, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <werkzeug.exceptions.Aborter object at 0x7fd20aac8880>, code = '403'
args = ('Forbidden',), kwargs = {}
def __call__(self, code, *args, **kwargs):
if not args and not kwargs and not isinstance(code, integer_types):
raise HTTPException(response=code)
if code not in self.mapping:
> raise LookupError("no exception for %r" % code)
E LookupError: no exception for '403'
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:752: LookupError
----------------------------- Captured stdout call -----------------------------
Error while setting featured dataset id: Method not allowed with this API key
______________________ test_direct_download_url_thumbnail ______________________
path = '95/1/files/derivative/Scaffold/thumbnail.png'
bucket_name = 'pennsieve-prod-discover-publish-use1'
def s3_header_check(path, bucket_name):
try:
> head_response = s3.head_object(
Bucket=bucket_name,
Key=path,
RequestPayer="requester"
)
app/main.py:426:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>, args = ()
kwargs = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '95/1/files/derivative/Scaffold/thumbnail.png', 'RequestPayer': 'requester'}
def _api_call(self, *args, **kwargs):
# We're accepting *args so that we can give a more helpful
# error message than TypeError: _api_call takes exactly
# 1 argument.
if args:
raise TypeError(
"%s() only accepts keyword arguments." % py_operation_name)
# The "self" in this scope is referring to the BaseClient.
> return self._make_api_call(operation_name, kwargs)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:357:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>
operation_name = 'HeadObject'
api_params = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '95/1/files/derivative/Scaffold/thumbnail.png', 'RequestPayer': 'requester'}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record('API_CALL', {
'service': service_name,
'operation': operation_name,
'params': api_params,
})
if operation_model.deprecated:
logger.debug('Warning: %s.%s() is deprecated',
service_name, operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
'before-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._make_request(
operation_model, request_dict, request_context)
self.meta.events.emit(
'after-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:676: ClientError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_direct_download_url_thumbnail(client):
small_s3_file = '95/1/files/derivative%2FScaffold%2Fthumbnail.png'
> r = client.get(f"/s3-resource/{small_s3_file}")
tests/test_api.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/testing.py:222: in open
return Client.open(
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:455: in direct_download_url
response = s3_header_check(path, s3BucketName)
app/main.py:439: in s3_header_check
abort(err.response["Error"]["Code"], err.response["Error"]["Message"])
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:772: in abort
return _aborter(status, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <werkzeug.exceptions.Aborter object at 0x7fd20aac8880>, code = '403'
args = ('Forbidden',), kwargs = {}
def __call__(self, code, *args, **kwargs):
if not args and not kwargs and not isinstance(code, integer_types):
raise HTTPException(response=code)
if code not in self.mapping:
> raise LookupError("no exception for %r" % code)
E LookupError: no exception for '403'
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:752: LookupError
_____________________ test_direct_download_incorrect_path ______________________
path = '32/4/files/', bucket_name = 'pennsieve-prod-discover-publish-use1'
def s3_header_check(path, bucket_name):
try:
> head_response = s3.head_object(
Bucket=bucket_name,
Key=path,
RequestPayer="requester"
)
app/main.py:426:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>, args = ()
kwargs = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '32/4/files/', 'RequestPayer': 'requester'}
def _api_call(self, *args, **kwargs):
# We're accepting *args so that we can give a more helpful
# error message than TypeError: _api_call takes exactly
# 1 argument.
if args:
raise TypeError(
"%s() only accepts keyword arguments." % py_operation_name)
# The "self" in this scope is referring to the BaseClient.
> return self._make_api_call(operation_name, kwargs)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:357:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>
operation_name = 'HeadObject'
api_params = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '32/4/files/', 'RequestPayer': 'requester'}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record('API_CALL', {
'service': service_name,
'operation': operation_name,
'params': api_params,
})
if operation_model.deprecated:
logger.debug('Warning: %s.%s() is deprecated',
service_name, operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
'before-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._make_request(
operation_model, request_dict, request_context)
self.meta.events.emit(
'after-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:676: ClientError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_direct_download_incorrect_path(client):
incorrect_path = '32/4/files/?encodeBase64=true'
> r = client.get(f"/s3-resource/{incorrect_path}")
tests/test_api.py:42:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/testing.py:222: in open
return Client.open(
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:455: in direct_download_url
response = s3_header_check(path, s3BucketName)
app/main.py:439: in s3_header_check
abort(err.response["Error"]["Code"], err.response["Error"]["Message"])
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:772: in abort
return _aborter(status, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <werkzeug.exceptions.Aborter object at 0x7fd20aac8880>, code = '403'
args = ('Forbidden',), kwargs = {}
def __call__(self, code, *args, **kwargs):
if not args and not kwargs and not isinstance(code, integer_types):
raise HTTPException(response=code)
if code not in self.mapping:
> raise LookupError("no exception for %r" % code)
E LookupError: no exception for '403'
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:752: LookupError
_____________________ test_direct_download_url_large_file ______________________
path = '61/2/files/primary/sub-44/sam-1/microscopy/sub-44sam-1C44-1Slide2p2MT_10x.nd2'
bucket_name = 'pennsieve-prod-discover-publish-use1'
def s3_header_check(path, bucket_name):
try:
> head_response = s3.head_object(
Bucket=bucket_name,
Key=path,
RequestPayer="requester"
)
app/main.py:426:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>, args = ()
kwargs = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '61/2/files/primary/sub-44/sam-1/microscopy/sub-44sam-1C44-1Slide2p2MT_10x.nd2', 'RequestPayer': 'requester'}
def _api_call(self, *args, **kwargs):
# We're accepting *args so that we can give a more helpful
# error message than TypeError: _api_call takes exactly
# 1 argument.
if args:
raise TypeError(
"%s() only accepts keyword arguments." % py_operation_name)
# The "self" in this scope is referring to the BaseClient.
> return self._make_api_call(operation_name, kwargs)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:357:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>
operation_name = 'HeadObject'
api_params = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '61/2/files/primary/sub-44/sam-1/microscopy/sub-44sam-1C44-1Slide2p2MT_10x.nd2', 'RequestPayer': 'requester'}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record('API_CALL', {
'service': service_name,
'operation': operation_name,
'params': api_params,
})
if operation_model.deprecated:
logger.debug('Warning: %s.%s() is deprecated',
service_name, operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
'before-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._make_request(
operation_model, request_dict, request_context)
self.meta.events.emit(
'after-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:676: ClientError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_direct_download_url_large_file(client):
large_s3_file = '61%2F2%2Ffiles%2Fprimary%2Fsub-44%2Fsam-1%2Fmicroscopy%2Fsub-44sam-1C44-1Slide2p2MT_10x.nd2'
> r = client.get(f"/s3-resource/{large_s3_file}")
tests/test_api.py:54:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/testing.py:222: in open
return Client.open(
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:455: in direct_download_url
response = s3_header_check(path, s3BucketName)
app/main.py:439: in s3_header_check
abort(err.response["Error"]["Code"], err.response["Error"]["Message"])
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:772: in abort
return _aborter(status, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <werkzeug.exceptions.Aborter object at 0x7fd20aac8880>, code = '403'
args = ('Forbidden',), kwargs = {}
def __call__(self, code, *args, **kwargs):
if not args and not kwargs and not isinstance(code, integer_types):
raise HTTPException(response=code)
if code not in self.mapping:
> raise LookupError("no exception for %r" % code)
E LookupError: no exception for '403'
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:752: LookupError
____________________________ test_segmentation_info ____________________________
path = '43/5/files/derivative/sub-6384/sam-28_sub-6384_islet3/sub-6384_20x_MsGcg_RbCol4_SMACy3_islet3 (1).xml'
bucket_name = 'pennsieve-prod-discover-publish-use1'
def s3_header_check(path, bucket_name):
try:
> head_response = s3.head_object(
Bucket=bucket_name,
Key=path,
RequestPayer="requester"
)
app/main.py:426:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>, args = ()
kwargs = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '43/5/files/derivative/sub-6384/sam-28_sub-6384_islet3/sub-6384_20x_MsGcg_RbCol4_SMACy3_islet3 (1).xml', 'RequestPayer': 'requester'}
def _api_call(self, *args, **kwargs):
# We're accepting *args so that we can give a more helpful
# error message than TypeError: _api_call takes exactly
# 1 argument.
if args:
raise TypeError(
"%s() only accepts keyword arguments." % py_operation_name)
# The "self" in this scope is referring to the BaseClient.
> return self._make_api_call(operation_name, kwargs)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:357:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>
operation_name = 'HeadObject'
api_params = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '43/5/files/derivative/sub-6384/sam-28_sub-6384_islet3/sub-6384_20x_MsGcg_RbCol4_SMACy3_islet3 (1).xml', 'RequestPayer': 'requester'}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record('API_CALL', {
'service': service_name,
'operation': operation_name,
'params': api_params,
})
if operation_model.deprecated:
logger.debug('Warning: %s.%s() is deprecated',
service_name, operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
'before-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._make_request(
operation_model, request_dict, request_context)
self.meta.events.emit(
'after-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:676: ClientError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_segmentation_info(client):
file_path = '43/5/files/derivative/sub-6384/sam-28_sub-6384_islet3/sub-6384_20x_MsGcg_RbCol4_SMACy3_islet3 (1).xml'
> r = client.get('/segmentation_info/', query_string={'dataset_path': file_path})
tests/test_segmentation_info.py:14:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/testing.py:222: in open
return Client.open(
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:617: in get_segmentation_info_from_file
response = s3_header_check(dataset_path, s3BucketName)
app/main.py:439: in s3_header_check
abort(err.response["Error"]["Code"], err.response["Error"]["Message"])
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:772: in abort
return _aborter(status, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <werkzeug.exceptions.Aborter object at 0x7fd20aac8880>, code = '403'
args = ('Forbidden',), kwargs = {}
def __call__(self, code, *args, **kwargs):
if not args and not kwargs and not isinstance(code, integer_types):
raise HTTPException(response=code)
if code not in self.mapping:
> raise LookupError("no exception for %r" % code)
E LookupError: no exception for '403'
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:752: LookupError
______________________ test_segmentation_info_namespaced _______________________
path = '230/1/files/primary/sub-dorsal-4/sam-CGRP-Mouse-Dorsal-4/3D_scaffold_-_CGRP-Mice-Dorsal-4.xml'
bucket_name = 'pennsieve-prod-discover-publish-use1'
def s3_header_check(path, bucket_name):
try:
> head_response = s3.head_object(
Bucket=bucket_name,
Key=path,
RequestPayer="requester"
)
app/main.py:426:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>, args = ()
kwargs = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '230/1/files/primary/sub-dorsal-4/sam-CGRP-Mouse-Dorsal-4/3D_scaffold_-_CGRP-Mice-Dorsal-4.xml', 'RequestPayer': 'requester'}
def _api_call(self, *args, **kwargs):
# We're accepting *args so that we can give a more helpful
# error message than TypeError: _api_call takes exactly
# 1 argument.
if args:
raise TypeError(
"%s() only accepts keyword arguments." % py_operation_name)
# The "self" in this scope is referring to the BaseClient.
> return self._make_api_call(operation_name, kwargs)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:357:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.S3 object at 0x7fd2087ad490>
operation_name = 'HeadObject'
api_params = {'Bucket': 'pennsieve-prod-discover-publish-use1', 'Key': '230/1/files/primary/sub-dorsal-4/sam-CGRP-Mouse-Dorsal-4/3D_scaffold_-_CGRP-Mice-Dorsal-4.xml', 'RequestPayer': 'requester'}
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record('API_CALL', {
'service': service_name,
'operation': operation_name,
'params': api_params,
})
if operation_model.deprecated:
logger.debug('Warning: %s.%s() is deprecated',
service_name, operation_name)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.auth_type,
}
request_dict = self._convert_to_request_dict(
api_params, operation_model, context=request_context)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
'before-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
model=operation_model, params=request_dict,
request_signer=self._request_signer, context=request_context)
if event_response is not None:
http, parsed_response = event_response
else:
http, parsed_response = self._make_request(
operation_model, request_dict, request_context)
self.meta.events.emit(
'after-call.{service_id}.{operation_name}'.format(
service_id=service_id,
operation_name=operation_name),
http_response=http, parsed=parsed_response,
model=operation_model, context=request_context
)
if http.status_code >= 300:
error_code = parsed_response.get("Error", {}).get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/botocore/client.py:676: ClientError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'app.main'>>
def test_segmentation_info_namespaced(client):
file_path = '230/1/files/primary/sub-dorsal-4/sam-CGRP-Mouse-Dorsal-4/3D_scaffold_-_CGRP-Mice-Dorsal-4.xml'
> r = client.get('/segmentation_info/', query_string={'dataset_path': file_path})
tests/test_segmentation_info.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1029: in get
return self.open(*args, **kw)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/testing.py:222: in open
return Client.open(
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:993: in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:884: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/test.py:1119: in run_wsgi_app
app_rv = app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2463: in __call__
return self.wsgi_app(environ, start_response)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2449: in wsgi_app
response = self.handle_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1866: in handle_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:2446: in wsgi_app
response = self.full_dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1951: in full_dispatch_request
rv = self.handle_user_exception(e)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_cors/extension.py:161: in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1820: in handle_user_exception
reraise(exc_type, exc_value, tb)
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/_compat.py:39: in reraise
raise value
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1949: in full_dispatch_request
rv = self.dispatch_request()
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask/app.py:1935: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
app/main.py:617: in get_segmentation_info_from_file
response = s3_header_check(dataset_path, s3BucketName)
app/main.py:439: in s3_header_check
abort(err.response["Error"]["Code"], err.response["Error"]["Message"])
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:772: in abort
return _aborter(status, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <werkzeug.exceptions.Aborter object at 0x7fd20aac8880>, code = '403'
args = ('Forbidden',), kwargs = {}
def __call__(self, code, *args, **kwargs):
if not args and not kwargs and not isinstance(code, integer_types):
raise HTTPException(response=code)
if code not in self.mapping:
> raise LookupError("no exception for %r" % code)
E LookupError: no exception for '403'
../../shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/werkzeug/exceptions.py:752: LookupError
_________________________ test_segmentation_thumbnail __________________________
client = <FlaskClient <Flask 'app.main'>>
def test_segmentation_thumbnail(client):
r = client.get('/thumbnail/segmentation?path=37/2/files/derivative/sub-54-5/TJU_3Scan_ratheart54-5_updated_06_11_19_Fiducials.xml')
> assert r.data.decode('utf-8').startswith('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAFIElEQVR4nO1ZTYgcRRT+aiaaZTCXDegl')
E assert False
E + where False = <built-in method startswith of str object at 0x7fd20875c4b0>('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAFIElEQVR4nO1ZTYgcRRT+aiaaZTCXDegl')
E + where <built-in method startswith of str object at 0x7fd20875c4b0> = '{"error":"404 Not Found: Unknown error for file: \'37/2/files/derivative/sub-54-5/TJU_3Scan_ratheart54-5_updated_06_11_19_Fiducials.xml\'"}\n'.startswith
E + where '{"error":"404 Not Found: Unknown error for file: \'37/2/files/derivative/sub-54-5/TJU_3Scan_ratheart54-5_updated_06_11_19_Fiducials.xml\'"}\n' = <built-in method decode of bytes object at 0x7fd1f5c70a80>('utf-8')
E + where <built-in method decode of bytes object at 0x7fd1f5c70a80> = b'{"error":"404 Not Found: Unknown error for file: \'37/2/files/derivative/sub-54-5/TJU_3Scan_ratheart54-5_updated_06_11_19_Fiducials.xml\'"}\n'.decode
E + where b'{"error":"404 Not Found: Unknown error for file: \'37/2/files/derivative/sub-54-5/TJU_3Scan_ratheart54-5_updated_06_11_19_Fiducials.xml\'"}\n' = <Response 138 bytes [404 NOT FOUND]>.data
tests/test_thumbnails.py:15: AssertionError
=============================== warnings summary ===============================
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/apscheduler/__init__.py:1
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/marshmallow/__init__.py:17
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/flask_marshmallow/__init__.py:34
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:19
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:36
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:53
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:70
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/pennsieve/cache/cache_segment_pb2.py:29
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/c6a9534b/virtualenvs/d41d8cd9/lib/python3.9/site-packages/nose/importer.py:12
/home/cmiss/Jenkins/shiningpanda/jobs/c6a9534b/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/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_api.py::test_direct_download_url_small_file - LookupError: ...
FAILED tests/test_api.py::test_direct_download_url_thumbnail - LookupError: n...
FAILED tests/test_api.py::test_direct_download_incorrect_path - LookupError: ...
FAILED tests/test_api.py::test_direct_download_url_large_file - LookupError: ...
FAILED tests/test_segmentation_info.py::test_segmentation_info - LookupError:...
FAILED tests/test_segmentation_info.py::test_segmentation_info_namespaced - L...
FAILED tests/test_thumbnails.py::test_segmentation_thumbnail - assert False
======= 7 failed, 95 passed, 4 skipped, 10 warnings in 214.50s (0:03:34) =======
Build step 'Virtualenv Builder' marked build as failure
[Slack Notifications] found #1165 as previous completed, non-aborted build
[Slack Notifications] will send OnEveryFailureNotification because build matches and user preferences allow it
Finished: FAILURE