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

May Security Update #610

Merged
merged 5 commits into from
Jun 7, 2022
Merged

May Security Update #610

merged 5 commits into from
Jun 7, 2022

Conversation

willronchetti
Copy link
Contributor

@willronchetti willronchetti requested a review from netsettler June 7, 2022 18:58
@willronchetti willronchetti mentioned this pull request Jun 7, 2022
Copy link
Contributor

@netsettler netsettler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comments are not blocking.

@@ -17,7 +17,7 @@ on:
jobs:
# This workflow contains a single job called "build"
build:
name: Test Suite for cgap-portal (Python 3.7, Node 16)
name: Test Suite for cgap-portal (Python 3.8, Node 16)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we done a check to see if names can usefully have environment variables in them? It feels like that would save us a lot of little updates like this if it works. It might not, though.

@@ -1,8 +1,6 @@
# CGAP-Portal (Production) Dockerfile
# Take latest 3.7.12 Debian variant
FROM python:3.7.12-slim-buster
# bullseye seems to perform worse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this note about bullseye is worth mentioning, though it would have been more helpful if dated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this comment is accurate as it pre-dates the performance optimizations. I suspect if I were to build with bullseye, performance would be comparable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

@@ -61,5 +61,4 @@ timeout = 60

[filter:memlimit]
use = egg:encoded#memlimit
rss_limit = 500MB
rss_percent_limit = 20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20% of what? I'm not sure what's going on here but it feels like 20% is a very low limit. Is this because we've got 4 processes that are each taking 25%? Or 5 that this allows 100% of each? (That seems questionable, but maybe it is discounted to 80% of the specified amount elsewhere.) If it's weird math like that, it seriously calls for a comment explaining how the value was chosen. But really, I'd like such a comment regardless.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality that uses this is based on psutil and does not work in Fargate, see giampaolo/psutil#2100. So in effect we are capping portal workers at 450MB of memory, while previously there was effectively no cap. If the cap is reached, the worker is killed and restarted by supervisor.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just what that info in a comment in the code.

colorama = "0.3.3"
dcicpyvcf = "1.0.0"
dcicsnovault = "^5.4.0"
dcicsnovault = "^5.6.0"
dcicutils = "^3.9.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if not engaging the beta, it might be worth requiring "^3.13.1".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.13.1 is locked so I will keep this for now and bump when we introduce env utils.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@willronchetti willronchetti merged commit 44211b1 into master Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants