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

Bring the repo back to a working state. Reverting a long time! #306

Merged
merged 1 commit into from Oct 24, 2017

Conversation

OlafSzmidt
Copy link
Contributor

@OlafSzmidt OlafSzmidt commented Oct 20, 2017

As discussed with @Spycho, @CelineBoudier and everyone else; we are reverting the game to the last known working state.

Could everyone please, test this if the game works properly? Use the test plan to see if the game works properly. It would be nice to see this being tested on both Windows and Linux.

The test plan as we stand can be found here (it's being rewritten to this).

@mrniket
Copy link
Contributor

mrniket commented Oct 20, 2017

OS: macOS
when the game completes without kubernetes I get this:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/Users/niket.shah1/Downloads/aimmo-magic1/aimmo-game/simulation/turn_manager.py", line 86, in run
    self._mark_complete()
  File "/Users/niket.shah1/Downloads/aimmo-magic1/aimmo-game/simulation/turn_manager.py", line 70, in _mark_complete
    requests.post(self._completion_url, json=get_world_state())
NameError: global name 'requests' is not defined

@CelineBoudier
Copy link
Contributor

CelineBoudier commented Oct 20, 2017

At the beginning (without Kubernetes), I was not able to see Level 1 map before programming it first (normal for the avatar obviously but not sure about the map)

@mrniket
Copy link
Contributor

mrniket commented Oct 20, 2017

OS: macOS
With kubernetes, I can't watch level 1:

Error opening service: Could not find finalized endpoint being pointed to by game-1: Error validating service: Error getting service game-1: services "game-1" not found

image

@CelineBoudier
Copy link
Contributor

In non K8 mode, I can't watch my custom levels: the map is not shown
screenshot from 2017-10-20 16-43-55

@CelineBoudier
Copy link
Contributor

Without K8, I logged in with a different user to generate a new avatar for level 1, but when I click Watch after programming, I get redirected to the wrong level: http://127.0.0.1:8000/players/watch/5/ . If I try to watch level 1 by choosing it in the drop down, I get a blank screen

@CelineBoudier
Copy link
Contributor

(I'm using Chrome on Linux (Version 59.0.3071.104 (Official Build) (64-bit)) )

@CelineBoudier
Copy link
Contributor

It looks ok with -k option. But one of my avatars just stopped moving when I launched two :( 'Nyhow

@OlafSzmidt
Copy link
Contributor Author

Regarding the game completion, @mrniket. That has been never implemented, even in the current master. The issue is raised here.

@CelineBoudier
Copy link
Contributor

So, I'm trying again with k8, and it actually works with several avatars. But you have to wait between 2 and 5 min to see the new avatar moving.

@CelineBoudier
Copy link
Contributor

Trying again without k8:

  • I am now able to see Level 1 map before programming it first - i jut need to wait 10 seconds...
  • I have a problem when creating a custom level with an accent in the name - itcreates, i can program, but then when I watch, Ĩ see nothing. Error in the console:
Traceback (most recent call last):
  File "/home/celineboudier/code-for-life/worktree/aimmo/aimmo-game-creator/service.py", line 16, in <module>
    main()
  File "/home/celineboudier/code-for-life/worktree/aimmo/aimmo-game-creator/service.py", line 13, in main
    worker_manager.run()
  File "/home/celineboudier/code-for-life/worktree/aimmo/aimmo-game-creator/worker_manager.py", line 102, in run
    self.update()
  File "/home/celineboudier/code-for-life/worktree/aimmo/aimmo-game-creator/worker_manager.py", line 118, in update
    self._parallel_map(self.spawn, games_to_add.keys(), games_to_add.values())
  File "/home/celineboudier/code-for-life/worktree/aimmo/aimmo-game-creator/worker_manager.py", line 98, in _parallel_map
    list(self._pool.imap(func, *iterable_args))
  File "/home/celineboudier/.virtualenvs/aimmo/local/lib/python2.7/site-packages/eventlet/greenpool.py", line 244, in next
    val = self.waiters.get().wait()
  File "/home/celineboudier/.virtualenvs/aimmo/local/lib/python2.7/site-packages/eventlet/greenthread.py", line 179, in wait
    return self._exit_event.wait()
  File "/home/celineboudier/.virtualenvs/aimmo/local/lib/python2.7/site-packages/eventlet/event.py", line 125, in wait
    current.throw(*self._exc)
  File "/home/celineboudier/.virtualenvs/aimmo/local/lib/python2.7/site-packages/eventlet/greenthread.py", line 218, in main
    result = function(*args, **kwargs)
  File "/home/celineboudier/code-for-life/worktree/aimmo/aimmo-game-creator/worker_manager.py", line 95, in spawn
    self.create_worker(game_id, game_data)
  File "/home/celineboudier/code-for-life/worktree/aimmo/aimmo-game-creator/worker_manager.py", line 151, in create_worker
    game_data = {str(k):str(v) for k,v in game_data.items()}
  File "/home/celineboudier/code-for-life/worktree/aimmo/aimmo-game-creator/worker_manager.py", line 151, in <dictcomp>
    game_data = {str(k):str(v) for k,v in game_data.items()}
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)

Note I could see the map with run.py -k

  • But I still can't see the map even for a valid name for a custom level. All I see in the logs are:
[23/Oct/2017 11:51:57] "GET /players/jsreverse/ HTTP/1.1" 200 5664
INFO:simulation.worker_manager:Waking up
[23/Oct/2017 11:51:59] "GET /players/api/games/1/ HTTP/1.1" 200 341
INFO:simulation.worker_manager:Sleeping
[23/Oct/2017 11:52:00] "GET /players/watch/3/ HTTP/1.1" 200 4281
[23/Oct/2017 11:52:00] "GET /players/jsreverse/ HTTP/1.1" 200 5664
INFO:simulation.worker_manager:Waking up
[23/Oct/2017 11:52:09] "GET /players/api/games/1/ HTTP/1.1" 200 341
INFO:simulation.worker_manager:Sleeping

sometimes preceded by:

INFO:engineio:e98a4c4f34b44074a188fb50a2230cac: Sending packet MESSAGE data 0
INFO:engineio:e98a4c4f34b44074a188fb50a2230cac: Received request to upgrade to websocket
INFO:engineio:e98a4c4f34b44074a188fb50a2230cac: Sending packet NOOP data None
INFO:engineio:e98a4c4f34b44074a188fb50a2230cac: Upgrade to websocket successful
[23/Oct/2017 11:51:56] "GET /players/watch/2/ HTTP/1.1" 200 4281
INFO:engineio:e98a4c4f34b44074a188fb50a2230cac: Unexpected error "[Errno 107] Transport endpoint is not connected", closing connection

@OlafSzmidt
Copy link
Contributor Author

OlafSzmidt commented Oct 24, 2017

So far we know:

  • Game completion problem can be omitted. It was never implemented. Commented out code has been turned into a issue linked above.
  • Levels seems to run correctly on Kubernetes if it's set up right.
  • Maps are actually shown in K8 mode, just it might take time for clusters to be created.
  • Maps are shown locally too, it may take time (local mode isn't important for the future anyways).
  • The imports have to be nested in local mode (also not important, it's only for testing I presume).
  • Games can't be watched with special characters (low importance imho).

There appears to be a problem with endpoints for custom levels. Could be an auth problem (?), could be a connection problem. It only happens sometimes. It's gone for both Niket and Celine now it seems :/

@OlafSzmidt
Copy link
Contributor Author

I agree we can merge this now. If it works on staging, that's what's most important. Local issues seem to be PC specific and finding a different commit won't help in this case.

@OlafSzmidt OlafSzmidt merged commit 104faf5 into ocadotechnology:master Oct 24, 2017
@OlafSzmidt OlafSzmidt deleted the magic1 branch February 5, 2018 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants