Skip to content

Commit 958331b

Browse files
committed
fix: make sure singleRetry doesn't return defaults for extra properties
1 parent 4ee0be1 commit 958331b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/cli/src/constructs/retry-strategy.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,18 @@ export class RetryStrategyBuilder {
149149
* A single retry will be performed.
150150
*/
151151
static singleRetry (options?: SingleRetryStrategyOptions): RetryStrategy {
152-
return RetryStrategyBuilder.retryStrategy('SINGLE', {
152+
const {
153+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
154+
maxRetries,
155+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
156+
maxDurationSeconds,
157+
...strategy
158+
} = RetryStrategyBuilder.retryStrategy('SINGLE', {
153159
baseBackoffSeconds: options?.baseBackoffSeconds,
154160
sameRegion: options?.sameRegion,
155161
})
162+
163+
return strategy
156164
}
157165

158166
/**

0 commit comments

Comments
 (0)