Skip to content

Commit

Permalink
fix more violations 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Feb 23, 2022
1 parent f39639d commit 88010d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/server/lib/essql_strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export const essqlSearchStrategyProvider = (): ISearchStrategy<
format: 'json',
body: {
query,
// @ts-expect-error `params` missing from `QuerySqlRequest` type
params,
field_multi_value_leniency: true,
time_zone: timezone,
fetch_size: count,
// @ts-expect-error `client_id` missing from `QuerySqlRequest` type
client_id: 'canvas',
filter: {
bool: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function createNewIndex({
index,
body: {
// auto_expand_replicas: Allows cluster to not have replicas for this index
settings: { 'index.auto_expand_replicas': '0-1' },
settings: { index: { auto_expand_replicas: '0-1' } },
mappings,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ interface TestResult {
context: TransformHealthAlertContext;
}

type Transform = estypes.Transform & { id: string; description?: string; sync: object };
type Transform = estypes.TransformGetTransformTransformSummary & {
id: string;
description?: string;
sync: object;
};

type TransformWithAlertingRules = Transform & { alerting_rules: TransformHealthAlertRule[] };

Expand Down
7 changes: 2 additions & 5 deletions x-pack/plugins/transform/server/routes/api/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,9 @@ async function deleteTransforms(
transform_id: transformId,
});
const transformConfig = body.transforms[0];
// @ts-expect-error @elastic/elasticsearch doesn't provide typings for Transform
destinationIndex = Array.isArray(transformConfig.dest.index)
? // @ts-expect-error @elastic/elasticsearch doesn't provide typings for Transform
transformConfig.dest.index[0]
: // @ts-expect-error @elastic/elasticsearch doesn't provide typings for Transform
transformConfig.dest.index;
? transformConfig.dest.index[0]
: transformConfig.dest.index;
} catch (getTransformConfigError) {
transformDeleted.error = getTransformConfigError.meta.body.error;
results[transformId] = {
Expand Down

0 comments on commit 88010d2

Please sign in to comment.