-
Notifications
You must be signed in to change notification settings - Fork 39
Support for multiple teams and groups in clarification destinations #1164
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
Conversation
Adds support for the draft Contest API ability to send clarifications to multiple teams and/or groups. This updates the contest model and all client-side support to support multiple teams and groups. The CDS, presentations, and all other tools will work when pointing to a 2023-06 _or_ draft spec server. By default the CDS will continue to serve the 2023-06 contest API though; if you want the new event feed you need to set the ICPC_CONTEST_API=draft system property as with all other draft spec changes. CDS web pages will need to be updated as well, that will be a separate PR.
vmcj
left a comment
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.
LGTM but feel free to wait for a review from someone more experienced with the code.
| teamId = clar.getToTeamId(); | ||
|
|
||
| // For now, assume that clarifications to hidden teams are only | ||
| // sent to hidden teams. (i.e. no complex groups or hidden+non-hidden teams) |
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 think this should also become part of the spec, so it's easier for someone to implement the spec and not have this edge case.
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.
See also my remark above
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.
Agreed, I've added a topic to the CLICS call.
| team = contest.getTeamById(clar.getToTeamId()); | ||
| if (contest.isTeamHidden(team)) | ||
| return null; | ||
| if (clar.getToTeamIds() != null) { |
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 wonder if it would be better to only hide the clarification if all teams and groups in it are hidden and if not, only hide the team / group IDs of hidden ones? It does complicate stuff though.
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.
Yeah, I started having questions like 'if a clarification is sent to a (visible) group or teams + a hidden team, should the visible teams see a clarification that doesn't include the hidden team and the hidden team see a different clarification with full data?' Most of these cases are so unlikely in practice we could skip implementing and take the chance nobody cares, or make a minor restriction in the spec to avoid it.
I've added an item to the CLICS agenda. Are you ok merging to get the API change and core support though, and revisiting once the spec closes to figure out which edge cases to support better?
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.
Yes I'm fine with that
| teamId = clar.getToTeamId(); | ||
|
|
||
| // For now, assume that clarifications to hidden teams are only | ||
| // sent to hidden teams. (i.e. no complex groups or hidden+non-hidden teams) |
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.
See also my remark above
Adds support for the draft Contest API ability to send clarifications to multiple teams and/or groups.
This updates the contest model and all client-side support to support multiple teams and groups. The CDS, presentations, and all other tools will work when pointing to a 2023-06 or draft spec server.
By default the CDS will continue to serve the 2023-06 contest API though; if you want the new event feed you need to set the ICPC_CONTEST_API=draft system property as with all other draft spec changes.
CDS web pages will need to be updated as well, that will be a separate PR.