aimmo icon indicating copy to clipboard operation
aimmo copied to clipboard

fix: Remove game-creator and move relevant logic into the aimmo django app

Open mrniket opened this issue 3 years ago • 14 comments

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


This change is Reviewable

mrniket avatar Sep 08 '21 13:09 mrniket

@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 avatar Sep 08 '21 16:09 mrniket

@mrniket Hmm, I can't find a game_creator.py in portal 🤔 Can you point me to it?

razvan-pro avatar Sep 08 '21 17:09 razvan-pro

@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 😅

mrniket avatar Sep 09 '21 05:09 mrniket

Looks like the "Test aimmo-game-creator" check needs to be removed from this PR

mrniket avatar Sep 14 '21 12:09 mrniket

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 avatar Sep 15 '21 10:09 razvan-pro

@razvan-pro Any updates on this? Are you waiting on me for anything?

mrniket avatar Oct 12 '21 08:10 mrniket

@mrniket I need to re-review this - sorry for the delay, I'll try to have a look today

razvan-pro avatar Oct 12 '21 08:10 razvan-pro

Really sorry about the delay, @razvan-pro would you have some time to go through this with me at some point?

mrniket avatar Mar 03 '22 09:03 mrniket

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 avatar Mar 04 '22 18:03 razvan-pro

@razvan-pro thanks 😊 I'll send you an email

mrniket avatar Mar 11 '22 16:03 mrniket

@razvan-pro what is an archived game? How are they meant to be handled?

mrniket avatar Mar 16 '22 13:03 mrniket

@mrniket An archived game is a deleted game - we keep it for stats purposes :slightly_smiling_face:

razvan-pro avatar Mar 16 '22 13:03 razvan-pro

Just an update, I've managed to replicate the issue locally:

  1. "create" a game
  2. delete it
  3. 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.

mrniket avatar Mar 24 '22 11:03 mrniket

Codecov Report

Merging #1575 (54c37b2) into master (f152d4d) will increase coverage by 3.14%. The diff coverage is 81.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

Impacted file tree graph

@@            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[bot] avatar Oct 06 '22 16:10 codecov[bot]

Codecov Report

Merging #1575 (cd693b8) into master (54355c8) will increase coverage by 3.07%. The diff coverage is 80.45%.

Impacted file tree graph

@@            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[bot] avatar Oct 25 '22 00:10 codecov[bot]

Codecov Report

Merging #1575 (b4fd4b6) into master (19a49f6) will increase coverage by 17.65%. The diff coverage is 60.00%.

Impacted file tree graph

@@             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:

... and 145 files with indirect coverage changes

codecov[bot] avatar Jun 01 '23 18:06 codecov[bot]

Closing as now replaced by #1798. Original repo has been archived so work on this PR is no longer possible from our end.

faucomte97 avatar Jul 31 '23 15:07 faucomte97