DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
732 stars 256 forks source link

Shadowing import crashes when a team is found with an unknown category or affiliation #2776

Open nickygerritsen opened 2 days ago

nickygerritsen commented 2 days ago

When we find a team in the event feed that has a category or affiliation not yet present in DOMjudge, we try to create it here. However, we do not set any name and this gives an SQL error.

We can do two things:

This happened because I could not import JSON files for the PC^2 GNY2024 shadow (since they are wrong) and they never gave us the group event. It should never happen in practice, but clearly it did.

My vote would be option 2, to make the event feed reader a bit more robust.

vmcj commented 2 days ago

When we find a team in the event feed that has a category or affiliation not yet present in DOMjudge, we try to create it here. However, we do not set any name and this gives an SQL error.

We can do two things:

  • Do not import the team at this point and put it as pending, wait for the group / category to show up.
  • Come up with a name (based in the external ID)

This happened because I could not import JSON files for the PC^2 GNY2024 shadow (since they are wrong) and they never gave us the group event. It should never happen in practice, but clearly it did.

My vote would be option 2, to make the event feed reader a bit more robust.

I assume we still update it when the correct event comes in?

nickygerritsen commented 2 days ago

If the whole a script wouldn't crash then yes we would