-
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
Ignore wrong contest submissions in ProxyService #1142
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1142 +/- ##
==========================================
+ Coverage 63.56% 63.61% +0.04%
==========================================
Files 233 233
Lines 17117 17126 +9
==========================================
+ Hits 10881 10894 +13
+ Misses 6236 6232 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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, conceptually this looks good.
I think it is better placed in submission_scored()
/submission_tokened()
:
_missing_operations()
filters by contest id anyway- You can put the code together with the other checks and log a message
dataset_updated()
can have its own meaningful message
Could you please update the PR accordingly?
Sure! I'll take a look again at this in few days, I'm pretty busy right now! |
832781d
to
295b7f4
Compare
Sorry for the small delay, I've rebased on the current master and fixed the comments you left. Not sure why the CI doesn't work, but it seems quite unrelated. |
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 for the update. Please see some comments below.
babed7c
to
ee73339
Compare
When you are running cms with more than a contest (ie multicontest) ProxyService can be notified by ScoringService of new submissions of any contest, ignoring the `-c X` flag of PS. This will lead to `Inconsistent Data` errors in RWS due to submissions of the wrong contest (bad user, bad task, ...). This is especially bad because the wrong submission can be sent with other valid submissions, and RWS drop them all. The proposed fix just ignores those submissions from ProxyService since ScoringService has no way to know which contest PS is bound to.
Filter out the submissions from the wrong contest before rejecting them if they are hidden/unofficial. Add also some debug logging when it happens. This also adds the check in dataset_updated() since AWS may trigger the same kind of wrong RWS notifications.
ee73339
to
326375e
Compare
Thanks, now the changes look good. Please adjust the code to 79 characters and add periods at the end of log messages. Also, you can print submission id with |
Done! Btw, is there an automated tool for formatting the code? |
Thanks, merging. Well, not currently, but one could be used in the future. |
* Ignore wrong contest submissions in ProxyService When you are running cms with more than a contest (ie multicontest) ProxyService can be notified by ScoringService of new submissions of any contest, ignoring the `-c X` flag of PS. This will lead to `Inconsistent Data` errors in RWS due to submissions of the wrong contest (bad user, bad task, ...). This is especially bad because the wrong submission can be sent with other valid submissions, and RWS drop them all. The proposed fix just ignores those submissions from ProxyService since ScoringService has no way to know which contest PS is bound to. * Move the contest_id checks in submission_scored/tokened * Move PS contest checks before submission validation Filter out the submissions from the wrong contest before rejecting them if they are hidden/unofficial. Add also some debug logging when it happens. This also adds the check in dataset_updated() since AWS may trigger the same kind of wrong RWS notifications. * Fix line lengths and message format
* Ignore wrong contest submissions in ProxyService When you are running cms with more than a contest (ie multicontest) ProxyService can be notified by ScoringService of new submissions of any contest, ignoring the `-c X` flag of PS. This will lead to `Inconsistent Data` errors in RWS due to submissions of the wrong contest (bad user, bad task, ...). This is especially bad because the wrong submission can be sent with other valid submissions, and RWS drop them all. The proposed fix just ignores those submissions from ProxyService since ScoringService has no way to know which contest PS is bound to. * Move the contest_id checks in submission_scored/tokened * Move PS contest checks before submission validation Filter out the submissions from the wrong contest before rejecting them if they are hidden/unofficial. Add also some debug logging when it happens. This also adds the check in dataset_updated() since AWS may trigger the same kind of wrong RWS notifications. * Fix line lengths and message format
When you are running cms with more than a contest (ie multicontest) ProxyService can be notified by ScoringService of new submissions of any contest, ignoring the
-c X
flag of PS. This will lead toInconsistent Data
errors in RWS due to submissions of the wrong contest (bad user, bad task, ...). This is especially bad because the wrong submission can be sent with other valid submissions, and RWS drop them all.The proposed fix just ignores those submissions from ProxyService since ScoringService has no way to know which contest PS is bound to.
Related to #1102 but less intrusive.
This change is