aimmo
aimmo copied to clipboard
fix: Remove game-creator and move relevant logic into the aimmo django app
Now that the Django code can communicate with the kubernetes cluster, aimmo-game-creator
is not needed. This PR removes it.
Planning to make:
- [x] GameServiceManager
- [x] GameServerManager
- [x] GameIngressManager
- [x] GameSecretManager
The GameManager
can then just use these managers to call the relevant code.
Needs a PR in app engine for this to work too
@razvan-pro I see that there is a difference between aimmo's game_creator.py
and portal's game_creator.py
. Would you be able to explain it to me? I'm thinking of moving that logic into the GameManager along with everything else.
@mrniket Hmm, I can't find a game_creator.py
in portal 🤔 Can you point me to it?
@mrniket Hmm, I can't find a
game_creator.py
in portal thinking Can you point me to it?
Ah ignore me, my branch was outdated 😅
Looks like the "Test aimmo-game-creator" check needs to be removed from this PR
Looks like the "Test aimmo-game-creator" check needs to be removed from this PR
Yep, we'll do this right before merging :slightly_smiling_face:
@razvan-pro Any updates on this? Are you waiting on me for anything?
@mrniket I need to re-review this - sorry for the delay, I'll try to have a look today
Really sorry about the delay, @razvan-pro would you have some time to go through this with me at some point?
No problem @mrniket! Sure, if it takes longer I'll allocate some time next sprint (in April), otherwise we can have a quick call next week :slightly_smiling_face:
@razvan-pro thanks 😊 I'll send you an email
@razvan-pro what is an archived game? How are they meant to be handled?
@mrniket An archived game is a deleted game - we keep it for stats purposes :slightly_smiling_face:
Just an update, I've managed to replicate the issue locally:
- "create" a game
- delete it
- try to create it again
Remove the ingress path and service when you delete the game server should fix the issue. However, I need to handle the local dev environment different which doesn't use ingress.
Codecov Report
Merging #1575 (54c37b2) into master (f152d4d) will increase coverage by
3.14%
. The diff coverage is81.90%
.
:exclamation: Current head 54c37b2 differs from pull request most recent head f294cb7. Consider uploading reports for the commit f294cb7 to get more accurate results
@@ Coverage Diff @@
## master #1575 +/- ##
==========================================
+ Coverage 66.10% 69.25% +3.14%
==========================================
Files 177 183 +6
Lines 3638 3776 +138
Branches 305 263 -42
==========================================
+ Hits 2405 2615 +210
+ Misses 1201 1128 -73
- Partials 32 33 +1
Impacted Files | Coverage Δ | |
---|---|---|
...t/commands/start_game_servers_for_running_games.py | 0.00% <0.00%> (ø) |
|
example_project/settings.py | 0.00% <0.00%> (ø) |
|
aimmo/game_manager/game_ingress_manager.py | 81.48% <81.48%> (ø) |
|
aimmo/views.py | 90.90% <82.35%> (-2.25%) |
:arrow_down: |
aimmo/game_manager/game_manager.py | 87.75% <87.75%> (ø) |
|
aimmo/app_settings.py | 100.00% <100.00%> (ø) |
|
aimmo/game_creator.py | 100.00% <100.00%> (ø) |
|
aimmo/game_manager/__init__.py | 100.00% <100.00%> (ø) |
|
aimmo/game_manager/constants.py | 100.00% <100.00%> (ø) |
|
aimmo/game_manager/game_secret_manager.py | 100.00% <100.00%> (ø) |
|
... and 5 more |
Codecov Report
Merging #1575 (cd693b8) into master (54355c8) will increase coverage by
3.07%
. The diff coverage is80.45%
.
@@ Coverage Diff @@
## master #1575 +/- ##
==========================================
+ Coverage 66.24% 69.32% +3.07%
==========================================
Files 179 185 +6
Lines 3662 3808 +146
Branches 252 260 +8
==========================================
+ Hits 2426 2640 +214
+ Misses 1204 1135 -69
- Partials 32 33 +1
Impacted Files | Coverage Δ | |
---|---|---|
aimmo-game/authentication.py | 50.00% <0.00%> (-3.34%) |
:arrow_down: |
...t/commands/start_game_servers_for_running_games.py | 0.00% <0.00%> (ø) |
|
example_project/settings.py | 0.00% <0.00%> (ø) |
|
aimmo-game/simulation/django_communicator.py | 76.66% <50.00%> (-4.11%) |
:arrow_down: |
aimmo-game/service.py | 57.77% <57.14%> (+57.77%) |
:arrow_up: |
aimmo/game_manager/game_ingress_manager.py | 82.75% <82.75%> (ø) |
|
aimmo/views.py | 90.90% <83.33%> (-2.25%) |
:arrow_down: |
aimmo/game_manager/game_manager.py | 87.75% <87.75%> (ø) |
|
aimmo/app_settings.py | 100.00% <100.00%> (ø) |
|
aimmo/game_creator.py | 100.00% <100.00%> (ø) |
|
... and 8 more |
Codecov Report
Merging #1575 (b4fd4b6) into master (19a49f6) will increase coverage by
17.65%
. The diff coverage is60.00%
.
@@ Coverage Diff @@
## master #1575 +/- ##
===========================================
+ Coverage 66.72% 84.38% +17.65%
===========================================
Files 182 38 -144
Lines 3727 1204 -2523
Branches 264 117 -147
===========================================
- Hits 2487 1016 -1471
+ Misses 1209 164 -1045
+ Partials 31 24 -7
Impacted Files | Coverage Δ | |
---|---|---|
aimmo-game/authentication.py | 50.00% <0.00%> (-3.34%) |
:arrow_down: |
aimmo-game/simulation/django_communicator.py | 76.66% <50.00%> (-4.11%) |
:arrow_down: |
aimmo-game/service.py | 61.90% <80.00%> (+61.90%) |
:arrow_up: |
Closing as now replaced by #1798. Original repo has been archived so work on this PR is no longer possible from our end.