-
Notifications
You must be signed in to change notification settings - Fork 28
[enhancement] Check task exists in db and requirements upgrade #1361
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
[enhancement] Check task exists in db and requirements upgrade #1361
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1361 +/- ##
==========================================
+ Coverage 72.61% 72.63% +0.01%
==========================================
Files 201 201
Lines 8414 8426 +12
Branches 943 945 +2
==========================================
+ Hits 6110 6120 +10
+ Misses 2030 2029 -1
- Partials 274 277 +3
Continue to review full report at Codecov.
|
Previous logic would fill the postgres service log with errors. This solution is more quite Created subfunctions to separate logic
5c06420
to
a223728
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it basically reduces the chance of the error happening but it might still happen right?
services/web/server/src/simcore_service_webserver/computation_api.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go. However, could you split "beautification" changes and "code" changes into different PRs?
…arc-simcore into enh/check-task-exists-in-db
What do these changes do?
Due to a "race condition fix" done for the comp-tasks table, we introduced a additional constraint in the db table. This constraint was also "abused" to check whether a task was already in place or not. At the time this seemed to me an efficient way of "check and if it does not exists, create" in one call. The drawback is that it would log lots of irrelevant error messages in the postgres server. This type of noise was hiding real issues.
Now instead, we split in two calls: pre-check task existence before creating in comp-tasks table. It adds one call but the errors are only logged when we have race condition. No
some minor extras
sc-pg discover
and added Makefile recipe for devHow to test
Run a tutorial. Tasks should be correctly updated in comp-task table
Checklist
make openapi-specs
,git commit ...
and thenmake version-*
)