-
Notifications
You must be signed in to change notification settings - Fork 362
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
ProxyService bugfix #1244
base: master
Are you sure you want to change the base?
ProxyService bugfix #1244
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1244 +/- ##
==========================================
- Coverage 69.45% 69.38% -0.07%
==========================================
Files 328 328
Lines 26196 26199 +3
==========================================
- Hits 18195 18179 -16
- Misses 8001 8020 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Thanks!
I left a couple comments. I wonder also: how to reproduce this bug?
cms/service/ProxyService.py
Outdated
submission.get_result().scored(): | ||
for operation in self.operations_for_score(submission): | ||
self.enqueue(operation) | ||
if task is not None: |
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.
It might be more readable to invert the check here (if task is None
), returning early in that case. It would avoid having to indent the rest of the code.
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.
You are right it would make it more readable. I think I fixed it and pushed, I am not sure it's the first time I open a pull request, sorry for any github-wise misbehaviour :D
cms/service/ProxyService.py
Outdated
for operation in self.operations_for_score(submission): | ||
self.enqueue(operation) | ||
else: | ||
logger.warning("Dataset update for unexistent task %d.", task_id) |
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.
nit: unexistent
-> non-existent
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.
I just corrected each occurrence of it in the file
Can you explain how this bug gets triggered? It could be useful to know it so we can write a test for it. |
While a contest is running, if the dataset for a task that does not belong to the running contest gets updated, the error is triggered. |
No description provided.