Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Nov 21, 2024
1 parent 0c7f4dc commit 13a7b62
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,19 @@ export class ObservabilityAIAssistantPlugin
config: this.config,
}));

setupConversationAndKbIndexAssets({ core, logger: this.logger }).then(() => {
return registerMigrateKnowledgeBaseEntriesTask({
core,
taskManager: plugins.taskManager,
logger: this.logger,
setupConversationAndKbIndexAssets({ core, logger: this.logger })
.then(() => {
return registerMigrateKnowledgeBaseEntriesTask({
core,
taskManager: plugins.taskManager,
logger: this.logger,
});
})
.catch((e) => {
this.logger.error(
`Observability Assistant assets were not setup successfully: ${e.message}`
);
});
});

service.register(registerFunctions);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,5 @@ export async function setupConversationAndKbIndexAssets({
} catch (error) {
logger.error(`Failed setting up index assets: ${error.message}`);
logger.debug(error);
throw error;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export async function runSemanticTextKnowledgeBaseMigration({
logger.debug(`Knowledge base migration: Migrated ${promises.length} entries`);
await runSemanticTextKnowledgeBaseMigration({ esClient, logger });
} catch (e) {
logger.error('Knowledge base migration: Failed to migrate entries');
logger.error(`Knowledge base migration failed: ${e.message}`);
logger.error(e);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { clearKnowledgeBase } from '../../knowledge_base/helpers';
export default function ApiTest({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
const log = getService('log');
const ml = getService('ml');
const es = getService('es');
const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { FtrProviderContext } from '../../common/ftr_provider_context';
import { clearKnowledgeBase } from './helpers';

export default function ApiTest({ getService }: FtrProviderContext) {
const ml = getService('ml');
const es = getService('es');
const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient');
const esArchiver = getService('esArchiver');
const es = getService('es');
const ml = getService('ml');

const archive =
'x-pack/test/functional/es_archives/observability/ai_assistant/knowledge_base_8_15';
Expand Down

0 comments on commit 13a7b62

Please sign in to comment.