checkly-cli icon indicating copy to clipboard operation
checkly-cli copied to clipboard

bug: locations is required on interface CheckGroupProps

Open slmoore opened this issue 1 year ago • 1 comments

Node.js version

16.17.0

NPM version

8.15.0

@checkly/cli version

4.6.1

Steps to reproduce

When creating a new CheckGroup(), if the CheckGroupProps argument is using privateLocations and omits locations there is a TypeScript Error:

Property 'locations' is missing in type '{ alertChannels: AlertChannelWrapper[]; name: string; activated: true; muted: false; concurrency: number; frequency: Frequency; tags: string[]; privateLocations: string[]; browserChecks: { ...; }; retryStrategy: RetryStrategy; }' but required in type 'CheckGroupProps'.ts(2345)

Is it ok for locations to be an Optional parameter in the interface CheckGroupProps? https://github.com/checkly/checkly-cli/blob/bfc68daeeacc92cfe427e20305a2a36dc0fac043/packages/cli/src/constructs/check-group.ts#L70

This would match with interface CheckProps which is used by ApiCheck and BrowserCheck. https://github.com/checkly/checkly-cli/blob/bfc68daeeacc92cfe427e20305a2a36dc0fac043/packages/cli/src/constructs/check.ts#L51

Thanks!

What is expected?

No TypeScript error

What is actually happening?

TypeScript Error

Any additional comments?

For context, we're running one Group of checks using privateLocations and a separate Group of checks using locations.

slmoore avatar Feb 23 '24 20:02 slmoore

thanks @slmoore for reporting this.

tnolet avatar Feb 28 '24 11:02 tnolet

@slmoore this was just fixed in v4.8.1 which was just published on NPM https://www.npmjs.com/package/checkly

tnolet avatar Aug 15 '24 14:08 tnolet