-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security Solution] fix endpoint list + metadata api FTR tests #170489
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,12 @@ | |
|
||
import semverLte from 'semver/functions/lte'; | ||
|
||
const MIN_ENDPOINT_PACKAGE_V2_VERSION = '8.12.0'; | ||
function parseSemver(semver: string) { | ||
return semver.includes('-') ? semver.substring(0, semver.indexOf('-')) : semver; | ||
} | ||
|
||
const MIN_ENDPOINT_PACKAGE_V2_VERSION = '8.13.0'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Endpoint package spec/unattended upgrade has been bumped from |
||
export function isEndpointPackageV2(version: string) { | ||
return semverLte(MIN_ENDPOINT_PACKAGE_V2_VERSION, version); | ||
const parsedVersion = parseSemver(version); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We weren't catching preview versions previously meaning all preview versions were returning false. |
||
return semverLte(MIN_ENDPOINT_PACKAGE_V2_VERSION, parsedVersion); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no_shard_available_action_exception
encompasses multiple status codes and sometimes can be 500 which is a bit too wide to include. just checking the message allows for a more narrow check.