Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cubercsl
Copy link
Contributor

@cubercsl cubercsl commented May 28, 2025

Always null out entries in the main array

Otherwise, the resolver will only remove the first object when removing multiple objects.

So there will be almost nothing removed by removeHiddenTeams and removeSubmissionsOutsideOfContestTime.

public static Contest filter(Contest contest) {
Contest c = removeUnnecessaryTypes(contest);
c.removeHiddenTeams();
c.removeSubmissionsOutsideOfContestTime();
return c;
}

Example event-feed.json

Hidden team makes some submissions. In the resolver logic filter, the team is removed from the history, but some submissions are not.

In the given small event-feed, it will output an error before launch resolver UI, but in a larger event-feed, it will flood the terminal.

Invalid submission: submissions
  id: 10688
  problem_id: genshin-impact-trading
  team_id: domjudge
  language_id: cpp
  files: File Reference List [1]
  contest_time: 3:02:28.223
  time: 2024-11-10T12:02:28.223+08:00

demo

Always null out entries in the main array

Otherwise, the resolver will only remove the first
object when removing multiple objects.

Signed-off-by: cubercsl <[email protected]>
Copy link
Collaborator

@deboer-tim deboer-tim left a comment

Choose a reason for hiding this comment

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

Nice work, thank you!

@deboer-tim deboer-tim merged commit aa899cb into icpctools:main May 29, 2025
4 checks passed
@cubercsl cubercsl deleted the fix-remove-from-history branch May 30, 2025 01:56
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