From 063ec8039fe7d7d87471a49d26358595feb89cf0 Mon Sep 17 00:00:00 2001 From: Dylan Ratcliffe Date: Tue, 26 Sep 2023 14:26:23 +0000 Subject: [PATCH] Increase default timeouts to 5min We're starting to see timeouts due to long-running queries --- cmd/createbookmark.go | 2 +- cmd/endchange.go | 2 +- cmd/getaffectedbookmarks.go | 2 +- cmd/getchange.go | 2 +- cmd/getsnapshot.go | 2 +- cmd/request.go | 2 +- cmd/startchange.go | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/createbookmark.go b/cmd/createbookmark.go index 24209ff1..a5b8ff83 100644 --- a/cmd/createbookmark.go +++ b/cmd/createbookmark.go @@ -135,5 +135,5 @@ func init() { createBookmarkCmd.PersistentFlags().String("file", "", "JSON formatted file to read bookmark. (defaults to stdin)") - createBookmarkCmd.PersistentFlags().String("timeout", "1m", "How long to wait for responses") + createBookmarkCmd.PersistentFlags().String("timeout", "5m", "How long to wait for responses") } diff --git a/cmd/endchange.go b/cmd/endchange.go index b958a796..755c8f67 100644 --- a/cmd/endchange.go +++ b/cmd/endchange.go @@ -109,5 +109,5 @@ func init() { endChangeCmd.PersistentFlags().String("frontend", "https://app.overmind.tech/", "The frontend base URL") - endChangeCmd.PersistentFlags().String("timeout", "1m", "How long to wait for responses") + endChangeCmd.PersistentFlags().String("timeout", "5m", "How long to wait for responses") } diff --git a/cmd/getaffectedbookmarks.go b/cmd/getaffectedbookmarks.go index cb8cb02e..8385ae9d 100644 --- a/cmd/getaffectedbookmarks.go +++ b/cmd/getaffectedbookmarks.go @@ -113,5 +113,5 @@ func init() { getAffectedBookmarksCmd.PersistentFlags().String("snapshot-uuid", "", "The UUID of the snapshot that should be checked.") getAffectedBookmarksCmd.PersistentFlags().String("bookmark-uuids", "", "A comma separated list of UUIDs of the potentially affected bookmarks.") - getAffectedBookmarksCmd.PersistentFlags().String("timeout", "1m", "How long to wait for responses") + getAffectedBookmarksCmd.PersistentFlags().String("timeout", "5m", "How long to wait for responses") } diff --git a/cmd/getchange.go b/cmd/getchange.go index cd8b4c6b..4f1fb8ad 100644 --- a/cmd/getchange.go +++ b/cmd/getchange.go @@ -141,5 +141,5 @@ func init() { getChangeCmd.PersistentFlags().String("frontend", "https://app.overmind.tech/", "The frontend base URL") getChangeCmd.PersistentFlags().String("format", "json", "How to render the change. Possible values: json, markdown") - getChangeCmd.PersistentFlags().String("timeout", "1m", "How long to wait for responses") + getChangeCmd.PersistentFlags().String("timeout", "5m", "How long to wait for responses") } diff --git a/cmd/getsnapshot.go b/cmd/getsnapshot.go index 771c513f..faa9e55e 100644 --- a/cmd/getsnapshot.go +++ b/cmd/getsnapshot.go @@ -124,5 +124,5 @@ func init() { getSnapshotCmd.PersistentFlags().String("uuid", "", "The UUID of the snapshot that should be displayed.") - getSnapshotCmd.PersistentFlags().String("timeout", "1m", "How long to wait for responses") + getSnapshotCmd.PersistentFlags().String("timeout", "5m", "How long to wait for responses") } diff --git a/cmd/request.go b/cmd/request.go index b725b91f..bea50023 100644 --- a/cmd/request.go +++ b/cmd/request.go @@ -404,7 +404,7 @@ func init() { requestCmd.PersistentFlags().String("snapshot-name", "CLI", "The snapshot name of the query results") requestCmd.PersistentFlags().String("snapshot-description", "none", "The snapshot description of the query results") - requestCmd.PersistentFlags().String("timeout", "1m", "How long to wait for responses") + requestCmd.PersistentFlags().String("timeout", "5m", "How long to wait for responses") requestCmd.PersistentFlags().Uint32("link-depth", 0, "How deeply to link") requestCmd.PersistentFlags().Bool("blast-radius", false, "Whether to query using blast radius, note that if using this option, link-depth should be set to > 0") } diff --git a/cmd/startchange.go b/cmd/startchange.go index d6589a45..58d2565d 100644 --- a/cmd/startchange.go +++ b/cmd/startchange.go @@ -52,7 +52,7 @@ func StartChange(signals chan os.Signal, ready chan bool) int { )) defer span.End() - ctx, err = ensureToken(ctx, []string{"changes:write"},signals) + ctx, err = ensureToken(ctx, []string{"changes:write"}, signals) if err != nil { log.WithContext(ctx).WithFields(log.Fields{ "url": viper.GetString("url"), @@ -109,5 +109,5 @@ func init() { startChangeCmd.PersistentFlags().String("frontend", "https://app.overmind.tech/", "The frontend base URL") - startChangeCmd.PersistentFlags().String("timeout", "1m", "How long to wait for responses") + startChangeCmd.PersistentFlags().String("timeout", "5m", "How long to wait for responses") }