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 @@ -9,7 +9,8 @@ import { ALERT_OWNER, RULE_ID, SPACE_IDS } from '@kbn/rule-data-utils';
import { map, mergeMap, catchError } from 'rxjs/operators';
import { from } from 'rxjs';
import {
isValidFeatureId,
// TODO: Undo comment in fix here https://github.com/elastic/kibana/pull/107857
// isValidFeatureId,
mapConsumerToIndexName,
AlertConsumers,
} from '@kbn/rule-data-utils/target/alerts_as_data_rbac';
Expand Down Expand Up @@ -49,7 +50,9 @@ export const timelineSearchStrategyProvider = <T extends TimelineFactoryQueryTyp
search: (request, options, deps) => {
const factoryQueryType = request.factoryQueryType;
const entityType = request.entityType;
const alertConsumers = request.alertConsumers;
let alertConsumers = request.alertConsumers;
// TODO: Remove in fix here https://github.com/elastic/kibana/pull/107857
alertConsumers = undefined;

if (factoryQueryType == null) {
throw new Error('factoryQueryType is required');
Expand All @@ -58,7 +61,9 @@ export const timelineSearchStrategyProvider = <T extends TimelineFactoryQueryTyp
const queryFactory: TimelineFactory<T> = timelineFactory[factoryQueryType];

if (alertConsumers != null && entityType != null && entityType === EntityType.ALERTS) {
const allFeatureIdsValid = alertConsumers.every((id) => isValidFeatureId(id));
// TODO: Thist won't be hit since alertConsumers = undefined
// TODO: remove in fix here https://github.com/elastic/kibana/pull/107857
const allFeatureIdsValid = null; // alertConsumers.every((id) => isValidFeatureId(id));

if (!allFeatureIdsValid) {
throw new Error('An invalid alerts consumer feature id was provided');
Expand Down