-
Notifications
You must be signed in to change notification settings - Fork 93
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
feat: adds option to increase rover's client timeout #838
Conversation
Co-authored-by: Jesse Rosenberger <git@jro.cc>
Co-authored-by: Jesse Rosenberger <git@jro.cc>
883f679
to
88b41d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos again on the really great documentation! 🎉
- cleans up request errors by properly assigning codes and suggestions - local import for backoff crate - const the cfg!(test) check
Thanks for the reviews all - appreciate the help, this already looks much better 😄 |
6960c69
to
1bdf2f4
Compare
|
||
## Increase the client timeout | ||
|
||
Sometimes, you may want to make queries for large amounts of data that may take some extra time for the Studio API to process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommendation (feel free to adjust anything I've gotten a little wrong or you disagree with):
Increasing request timeouts
By default, Rover times out requests to the Apollo Studio API after 30 seconds. If you're executing a command that might take longer than 30 seconds to process, you can increase this timeout with the --client-timeout
option:
rover lengthy command (whatever that would be) --client-timeout=60 # in seconds
@@ -246,3 +246,9 @@ Some build errors are part of normal workflows. For instance, you may need to pu | |||
|
|||
This error occurs when an operation check fails. This means that you proposed a schema that would break operations in use by existing clients. You can configure this behavior in the Checks -> Configuration view in [Apollo Studio](https://studio.apollographql.com/), and you can read more about client checks [here](https://www.apollographql.com/docs/studio/schema-checks/). | |||
|
|||
### E031 | |||
|
|||
This error occurs when Rover made an HTTP(S) request and it timed out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"made an HTTP request that timed out." <- I'm not too stressed about needing to include the (S)
|
||
This error occurs when Rover made an HTTP(S) request and it timed out. | ||
|
||
The client timeout that Rover sets is configurable. You can try increasing the number of seconds Rover will wait to timeout with the `--client-timeout` flag, but it's also possible that you've made a request for too much data from the Studio API, or that the Studio API is experiencing degraded performance. You can check for the latter at our [status page](https://status.apollographql.com). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"You can increase Rover's request timeout, but it's also possible..."
"You can check for known performance issues on our status page"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That link would point to the new section in configuring.md
Fixes #792 by providing an option for configuring Rover's HTTP client timeout in seconds, and adding a new error code
E031
for when HTTP(S) operations time out.From the docs attached to this PR (I'm not sure why Netlify didn't make a preview deploy... maybe because I didn't branch off of
main
?)Increase the client timeout
Sometimes, you may want to make queries for large amounts of data that may take some extra time for the Studio API to process.
Rover supports increasing the client timeout in cases like this with the
--client-timeout
option, which takes a number of seconds as a parameter. By default, Rover will time out requests after 30 seconds.