Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const getMlJobsUsage = async (ml: MlPluginSetup | undefined): Promise<MlJ

if (ml) {
try {
const fakeRequest = {} as KibanaRequest;
const fakeRequest = { headers: {} } as KibanaRequest;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! For now, it's only the modulesProvider that performs the additional headers check, the jobsProvider (and thus ML Rule execution) continues to function as expected.

const fakeSOClient = {} as SavedObjectsClient;

const modules = await ml.modulesProvider(fakeRequest, fakeSOClient).listModules();
Expand Down