Skip to content
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

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

Open
nickygerritsen opened this issue Nov 3, 2024 · 2 comments

Comments

@nickygerritsen
Copy link
Member

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.

@vmcj
Copy link
Member

vmcj commented Nov 3, 2024

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
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants