Skip to content

Commit faef39e

Browse files
authored
[Bugfix] [DP] Propagate Timeout Across Subcommands (#1978)
1 parent 4c147c7 commit faef39e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- (Bugfix) (Platform) Increase memory limit for Inventory
55
- (Feature) (LM) Inventory Generator
66
- (Feature) (License) Activation CLI
7+
- (Bugfix) (DP) Propagate Timeout Across Subcommands
78

89
## [1.3.1](https://github.com/arangodb/kube-arangodb/tree/1.3.1) (2025-10-07)
910
- (Documentation) Add ArangoPlatformStorage Docs & Examples

cmd/admin.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@ const (
5757
ArgMemberName = "member-name"
5858
ArgAcceptedCode = "accepted-code"
5959
ArgTimeout = "timeout"
60+
ArgTimeoutDefault = time.Minute
6061
)
6162

6263
func init() {
6364
cmdMain.AddCommand(cmdAdmin)
64-
cmdAdminAgencyDump.PersistentFlags().DurationP(ArgTimeout, "t", time.Minute,
65+
cmdAdmin.PersistentFlags().DurationP(ArgTimeout, "t", ArgTimeoutDefault,
6566
"timeout of the request")
6667

6768
cmdAdmin.AddCommand(cmdAdminAgency)
@@ -134,7 +135,7 @@ func extractTimeout(cmd *cobra.Command) (context.Context, context.CancelFunc) {
134135
return context.WithTimeout(cmd.Context(), v)
135136
}
136137

137-
return context.WithCancel(cmd.Context())
138+
return context.WithTimeout(cmd.Context(), ArgTimeoutDefault)
138139
}
139140

140141
func cmdGetAdminMemberRequestGetE(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)