mirror of
https://github.com/elastic/kibana.git
synced 2025-04-19 15:35:00 -04:00
[Rule Migrations] Add Prerelease flag for integrations (#212206)
## Summary This adds the flag to include prerelease integrations in the packageClient used to fetch integrations for the Rule Migration RAG
This commit is contained in:
parent
2b621eef9b
commit
d2c8984d67
1 changed files with 6 additions and 2 deletions
|
@ -19,13 +19,17 @@ const RETURNED_INTEGRATIONS = 5 as const;
|
|||
*/
|
||||
export class RuleMigrationsDataIntegrationsClient extends RuleMigrationsDataBaseClient {
|
||||
async getIntegrationPackages(): Promise<PackageList | undefined> {
|
||||
return this.dependencies.packageService?.asInternalUser.getPackages();
|
||||
return this.dependencies.packageService?.asInternalUser.getPackages({
|
||||
prerelease: true,
|
||||
});
|
||||
}
|
||||
|
||||
/** Indexes an array of integrations to be used with ELSER semantic search queries */
|
||||
async populate(): Promise<void> {
|
||||
const index = await this.getIndexName();
|
||||
const packages = await this.dependencies.packageService?.asInternalUser.getPackages();
|
||||
const packages = await this.dependencies.packageService?.asInternalUser.getPackages({
|
||||
prerelease: true,
|
||||
});
|
||||
if (packages) {
|
||||
const ragIntegrations = packages.map<RuleMigrationIntegration>((pkg) => ({
|
||||
title: pkg.title,
|
||||
|
|
Loading…
Add table
Reference in a new issue