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

Keep dev server running for non-fatal errors. #58

Merged
merged 4 commits into from
Jan 28, 2020

Conversation

dillonkearns
Copy link
Owner

@dillonkearns dillonkearns commented Jan 27, 2020

Fixes #56.

Current state

The dev server will continue to run with these non-fatal errors:

  • Metadata parsing failure
  • Content parsing failure

It will terminate the dev server loop with these fatal errors:

  • StaticHttp request failed
  • JSON decoder for a StaticHttp request failed
  • Missing Secret (i.e. environment variable that a StaticHttp request depends on)

If StaticHttp requests could be retried infinite times with no penalty, it would simplify things because we could just greedily try running them again whenever the code changed and keep the dev server running. But Because we have to consider rate limiting and other potential issues with repeatedly hitting an API, for now the strategy is to just let the user re-run the CLI. This is probably good enough, but it might be worth revisiting this at some point to find a more sophisticated approach.

It's also worth noting that StaticHttp requests are not performed again when they change while the dev server is running, so you currently have to re-run it. This may be worth revisiting at some point, too, but the same tradeoffs apply regarding rate limiting.

@dillonkearns dillonkearns force-pushed the keep-running-on-non-fatal-errors branch from 5e43bcb to d22521a Compare January 28, 2020 00:04
@dillonkearns dillonkearns merged commit 9b2f26f into master Jan 28, 2020
@dillonkearns dillonkearns deleted the keep-running-on-non-fatal-errors branch May 11, 2020 17:06
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.

Developer loop breaks when a code gen error happens.
1 participant