-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
docgen: bump railroad diagram generation timeout to 120s #64430
docgen: bump railroad diagram generation timeout to 120s #64430
Conversation
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.
I actually thought this timeout limit was set on the server side... This is really nice. I've been using a local JAR to build the larger files (something to also consider, for stability).
Yeah I prefer to use the JAR as well for stability but currently docgen will fail on our generated bnfs without a JAR. Figure its beneficial to also get this working. |
pkg/cmd/docgen/extract/extract.go
Outdated
@@ -77,7 +78,8 @@ func GenerateRRNet(bnf []byte) ([]byte, error) { | |||
v.Add("options", "factoring") | |||
v.Add("options", "inline") | |||
|
|||
resp, err := httputil.Post(context.TODO(), rrAddr, "application/x-www-form-urlencoded", strings.NewReader(v.Encode())) | |||
httpClient := httputil.NewClientWithTimeout(120 * time.Second) |
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.
if you want something fancy you should make this a flag with flag.Duration
:P
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.
Good call I think it's pretty straight forward to do this as well. Will update.
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.
Updated PTAL @otan
49b83cb
to
04f8ac3
Compare
Previously it was hardcoded to 3s timeout when using the HTTP api for either railroad generation or bnf generation. Now the user can pass a value via the --timeout flag to set a timeout for the HTTP apis. Default is 120s. Release note: None
04f8ac3
to
dfcd8b7
Compare
Thanks for the reviews! |
Build succeeded: |
Some diagrams are too long to be generated in the current 3s. Bumping up to 120s for now since generating diagrams isn't exactly time sensitive.
Release note: None