UEWBot / dipvis

Django-based visualiser for tournaments for the boardgame Diplomacy
GNU General Public License v3.0
7 stars 4 forks source link

Issue seeding first round of Whipping 2023 #264

Closed UEWBot closed 1 year ago

UEWBot commented 1 year ago

Something weird happened when seeding round 1. Need to investigate.

UEWBot commented 1 year ago

Looking at the logs, I see the following:

  1. POST to roll_call (referrer being roll_call) (302)
  2. GET of get_seven (referrer being roll_call) (200)
  3. GET of roll_call (referrer being get_seven) (200)
  4. POST to roll_call (referrer being roll_call) (302)
  5. GET of get_seven (referrer being roll_call) (200)
  6. GET of roll_call (referrer being get_seven) (200)
  7. POST to roll_call (referrer being roll_call) (302)
  8. GET of get_seven (referrer being roll_call) (200)
  9. GET of roll_call (referrer being get_seven) (200)
  10. POST to roll_call (referrer being roll_call) (302)
  11. GET of get_seven (referrer being roll_call) (200)
  12. GET of roll_call (referrer being get_seven) (200)
  13. POST to roll_call (referrer being roll_call) (302)
  14. GET of get_seven (referrer being roll_call) (200)
  15. POST to get_seven (referrer being get_seven) (302)
  16. seeding happens
  17. GET of seed_games (referrer being get_seven) (200)
  18. POST to seed_games (referrer being seed_games) (302)
  19. seeding happens
  20. GET of seed_games (referrer being get_seven) (200)
  21. POST to seed_games (referrer being seed_games) (302)
  22. GET of board_call (referrer being seed_games) (200)
UEWBot commented 1 year ago

So 20 is the odd one - there's no preceding GET or POST of get_seven (except 14&15, but they seem to correspond with 16&17). 18 is presumably confirming the seeding generated at 16.

It's the GET path through seed_games() that triggers the actual game seeding, so 16 is part of 17 and 19 is part of 20 (somewhat surprising that they get logged in that order).

Looking at the seed_games() POST path, if the formset is valid and it is able to create all the games, it will always send the board call email and redirect to board_call. If the formset is not valid or it can't create all the games, it will render seeded_games.html, the same as for a GET.

There were two sets of emails generated for round 1, with different board seedings.

UEWBot commented 1 year ago

20 and 17 both have a referrer of get_seven, but there's no intermediate GET of get_seven, so this looks like the user clicked the button on the get_seven page twice.