mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -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 {
|
export class RuleMigrationsDataIntegrationsClient extends RuleMigrationsDataBaseClient {
|
||||||
async getIntegrationPackages(): Promise<PackageList | undefined> {
|
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 */
|
/** Indexes an array of integrations to be used with ELSER semantic search queries */
|
||||||
async populate(): Promise<void> {
|
async populate(): Promise<void> {
|
||||||
const index = await this.getIndexName();
|
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) {
|
if (packages) {
|
||||||
const ragIntegrations = packages.map<RuleMigrationIntegration>((pkg) => ({
|
const ragIntegrations = packages.map<RuleMigrationIntegration>((pkg) => ({
|
||||||
title: pkg.title,
|
title: pkg.title,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue