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

Make wafer and thin-auth check if SkotOS is fully booted #62

Open
noahgibbs opened this issue May 3, 2021 · 0 comments
Open

Make wafer and thin-auth check if SkotOS is fully booted #62

noahgibbs opened this issue May 3, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers javascript This bug is mostly or completely fixable in Javascript

Comments

@noahgibbs
Copy link
Collaborator

Prior to cold-boot SkotOS, the game's DGD server was nearly always fully booted. It just wasn't much of an issue. In this new world, we cold-boot much more often and so we care more often. That's why deploy_scripts/shared/wait_for_full_boot.sh exists - so we can wait for SkotOS to finish loading all that MERRY code, open its ports, etc.

It would be really useful if wafer and thin-auth could indicate whether SkotOS appears to have booted fully. Because if you click through before that, errors are expected. When spinning up a new local install, we just don't boot wafer until DGD has finished booting -- but a bookmark will still get you to the not-yet-ready server. Some kind of visual indicator (warning text?) would be nice, and possibly a "reload" button to check right now instead of waiting for the next 30 second timer.

There's a URL for that, the same one used by wait_for_full_boot.sh. On the SkotOS raw HTTP port (localhost:10080 or the client URL's port 10080), the url "/FullyBooted" will only return 200 if it's fully booted. A 404 normally means "still booting" and a 5XX (error) response normally means "something went wrong and it's not going to boot up." It's possible to get an error where it will just 404 forever, but that's not normally what happens.

For wafer, the right answer is probably to colour or disable the "Play" and "Tree of WOE" buttons and add a setInterval to keep pinging the server (maybe every 30 seconds or so?) and enable them when the server is fully booted. After the server is up we can get rid of the setInterval and not keep doing it.

It would also be possible to check every you hit "Play" and give you a dialogue if it's not fully booted - not sure if that's a good idea. The up-side is that if you keep a stale Wafer browser tab open it will still tell you if your current boot isn't finished. The down-side is that sometimes you get a browser alert when you may not want one.

@noahgibbs noahgibbs added enhancement New feature or request good first issue Good for newcomers javascript This bug is mostly or completely fixable in Javascript labels May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers javascript This bug is mostly or completely fixable in Javascript
Projects
None yet
Development

No branches or pull requests

1 participant