Skip to content

Commit

Permalink
use any for estypes.QueryContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Apr 13, 2021
1 parent db7a7f8 commit 2d5f94b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface FullIndexInfo {
// saved objects which are no longer used. These saved objects will still be
// kept in the outdated index for backup purposes, but won't be availble in
// the upgraded index.
export const excludeUnusedTypesQuery: estypes.QueryContainer = {
export const excludeUnusedTypesQuery = {
bool: {
must_not: [
// https://github.com/elastic/kibana/issues/91869
Expand Down
4 changes: 2 additions & 2 deletions src/core/server/saved_objects/migrationsv2/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export const reindex = (
* are no longer used. These saved objects will still be kept in the outdated
* index for backup purposes, but won't be available in the upgraded index.
*/
unusedTypesQuery: Option.Option<estypes.QueryContainer>
unusedTypesQuery: Option.Option<any>
): TaskEither.TaskEither<RetryableEsClientError, ReindexResponse> => () => {
return client
.reindex({
Expand All @@ -457,7 +457,7 @@ export const reindex = (
// Set reindex batch size
size: BATCH_SIZE,
// Exclude saved object types
query: Option.fold<estypes.QueryContainer, estypes.QueryContainer | undefined>(
query: Option.fold<any, any | undefined>(
() => undefined,
(query) => query
)(unusedTypesQuery),
Expand Down
3 changes: 1 addition & 2 deletions src/core/server/saved_objects/migrationsv2/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import * as Option from 'fp-ts/lib/Option';
import { estypes } from '@elastic/elasticsearch';
import { ControlState } from './state_action_machine';
import { AliasAction } from './actions';
import { IndexMapping } from '../mappings';
Expand Down Expand Up @@ -79,7 +78,7 @@ export interface BaseState extends ControlState {
* are no longer used. These saved objects will still be kept in the outdated
* index for backup purposes, but won't be available in the upgraded index.
*/
readonly unusedTypesQuery: Option.Option<estypes.QueryContainer>;
readonly unusedTypesQuery: Option.Option<any>;
}

export type InitState = BaseState & {
Expand Down

0 comments on commit 2d5f94b

Please sign in to comment.