@@ -110,7 +110,7 @@ export interface CheckGroupProps {
110
110
/**
111
111
* Sets a retry policy for the group. Use RetryStrategyBuilder to create a retry policy.
112
112
*/
113
- retryStrategy ?: RetryStrategy | null
113
+ retryStrategy ?: RetryStrategy
114
114
/**
115
115
* Determines whether the checks in the group should run on all selected locations in parallel or round-robin.
116
116
* See https://www.checklyhq.com/docs/monitoring/global-locations/ to learn more about scheduling strategies.
@@ -143,7 +143,7 @@ export class CheckGroup extends Construct {
143
143
apiCheckDefaults : ApiCheckDefaultConfig
144
144
browserChecks ?: BrowserCheckConfig
145
145
multiStepChecks ?: MultiStepCheckConfig
146
- retryStrategy ?: RetryStrategy | null
146
+ retryStrategy ?: RetryStrategy
147
147
runParallel ?: boolean
148
148
alertSettings ?: AlertEscalation
149
149
useGlobalAlertSettings ?: boolean
@@ -163,6 +163,7 @@ export class CheckGroup extends Construct {
163
163
this . name = props . name
164
164
this . activated = props . activated
165
165
this . muted = props . muted
166
+ this . doubleCheck = props . doubleCheck
166
167
this . tags = props . tags
167
168
this . runtimeId = props . runtimeId
168
169
this . locations = props . locations
@@ -184,11 +185,6 @@ export class CheckGroup extends Construct {
184
185
this . alertChannels = props . alertChannels ?? [ ]
185
186
this . localSetupScript = props . localSetupScript
186
187
this . localTearDownScript = props . localTearDownScript
187
- // When `retryStrategy: null` and `doubleCheck: undefined`, we want to let the user disable all retries.
188
- // The backend has a Joi default of `doubleCheck: true`, though, so we need special handling for this case.
189
- this . doubleCheck = props . doubleCheck === undefined && props . retryStrategy === null
190
- ? false
191
- : props . doubleCheck
192
188
this . retryStrategy = props . retryStrategy
193
189
this . runParallel = props . runParallel
194
190
// `browserChecks` is not a CheckGroup resource property. Not present in synthesize()
@@ -286,7 +282,6 @@ export class CheckGroup extends Construct {
286
282
name : this . name ,
287
283
activated : this . activated ,
288
284
muted : this . muted ,
289
- doubleCheck : this . doubleCheck ,
290
285
tags : this . tags ,
291
286
locations : this . locations ,
292
287
runtimeId : this . runtimeId ,
@@ -299,7 +294,15 @@ export class CheckGroup extends Construct {
299
294
localTearDownScript : this . localTearDownScript ,
300
295
apiCheckDefaults : this . apiCheckDefaults ,
301
296
environmentVariables : this . environmentVariables ,
302
- retryStrategy : this . retryStrategy ,
297
+ // The backend doesn't actually support the `NO_RETRIES` type, it uses `null` instead.
298
+ retryStrategy : this . retryStrategy ?. type === 'NO_RETRIES'
299
+ ? null
300
+ : this . retryStrategy ,
301
+ // When `retryStrategy: NO_RETRIES` and `doubleCheck: undefined`, we want to let the user disable all retries.
302
+ // The backend has a Joi default of `doubleCheck: true`, though, so we need special handling for this case.
303
+ doubleCheck : this . doubleCheck === undefined && this . retryStrategy ?. type === 'NO_RETRIES'
304
+ ? false
305
+ : this . doubleCheck ,
303
306
runParallel : this . runParallel ,
304
307
alertSettings : this . alertSettings ,
305
308
useGlobalAlertSettings : this . useGlobalAlertSettings ,
0 commit comments