Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade due to sec vul #181

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,19 @@ jobs:
pip install .
pip install -r requirements_dev.txt
- name: Deploy app
run: docker-compose up -d --build
run: docker compose up -d --build
- name: Wait for app startup
run: sleep 20
run: |
for i in $(seq 1 24); do
sleep 5; curl localhost:8080 -so /dev/null && break;
docker compose ps;
echo "Retrying ($i) in 5 seconds...";
done
- name: Run integration tests
shell: bash
run: pytest tests/test_integration
- name: Tear down app
run: docker-compose down
run: docker compose down
publish:
name: Build and publish app image
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions pro_tes/ga4gh/tes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TesCreateTaskResponse(CustomBaseModel):

class TesExecutor(CustomBaseModel):
image: str = Field(
default=[""],
default="",
description=(
"Name of the container image. The string will be passed as "
" the image\nargument to the containerization run command. "
Expand Down Expand Up @@ -626,7 +626,7 @@ class TesTask(CustomBaseModel):
)
resources: Optional[TesResources] = None
executors: list[TesExecutor] = Field(
default=[TesExecutor],
default=[TesExecutor()],
description=(
"An array of executors to be run. Each of the executors "
" will run one\nat a time sequentially. Each executor is a"
Expand Down
2 changes: 1 addition & 1 deletion pro_tes/gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
forwarded_allow_ips = "*" # pylint: disable=invalid-name

# Set Gunicorn bind address
bind = f"{app_config.server.host}:{app_config.server.port}"
bind = f"{app_config.server.host}:{app_config.server.port}" # pylint: disable=C0103

# Source environment variables for Gunicorn workers
raw_env = [
Expand Down
2 changes: 1 addition & 1 deletion pro_tes/tasks/track_task_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
ignore_result=True,
track_started=True,
)
def task__track_task_progress( # pylint: disable=too-many-arguments
def task__track_task_progress( # pylint: disable=too-many-arguments,R0917
self, # pylint: disable=unused-argument
worker_id: str,
remote_host: str,
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ celery-types>=0.20.0
connexion>=2.11.2,<3
foca>=0.12.1
geopy>=2.2.0
gunicorn>=20.1.0,<21
gunicorn>=22
ip2geotools>=0.1.6
py-tes>=0.4.2
pytest-ordering>=0.6
types-PyYAML>=6.0.12
types-requests>=2.28.5
types-simplejson>=3.17.7
types-urllib3>=1.26.17
pymongo==4.8.0
4 changes: 2 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ mypy>=0.990
pylint>=2.15.5
pytest>=7.2.0
python-semantic-release>=7.32.2
mypy>=1.8.0
types-python-dateutil>=2.8.19.20240106
mypy==1.14.1
types-python-dateutil>=2.8.19.20240106
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[flake8]
per-file-ignores =
pro_tes/ga4gh/tes/models.py:D101

max-line-length = 120
Loading