Skip to content

Investigate @ts-expect-error related to ES client typings #95241

Open

Description

In #83808, new typings were introduced for the ES client.

There were a few places where @ts-expect-error was added to our plugins. This is likely a problem in our code that should be addressed. If we find it is a problem in the client code, it should be reported to https://github.com/elastic/elastic-client-generator/issues/new/choose.

Known places:

  1. ILM - register_fetch_route.ts
// @ts-expect-error Policy doesn't contain name property
  1. Data streams - register_get_route.ts
// @ts-expect-error PrivilegesFromEs incompatible with ApplicationsPrivileges
  1. Painless Lab - execute.ts
// @ts-expect-error `ExecutePainlessScriptRequest.body` does not allow `string`
  1. Painless Lab - execute.ts
// @ts-expect-error `ExecutePainlessScriptRequest.body` does not allow `string`
  1. Snapshot Restore (once [Snapshot Restore] Migrate to new ES client #95499 is merged)
    See the TODO comments in these files:
  • x-pack/plugins/snapshot_restore/server/routes/api/policy.ts
  • x-pack/plugins/snapshot_restore/server/routes/api/repositories.ts
  • x-pack/plugins/snapshot_restore/server/routes/api/restore.ts
  • x-pack/plugins/snapshot_restore/server/routes/api/policy.ts (Update @elastic/elasticsearch to 8.0.0-canary13 #98266)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Team:Kibana ManagementDev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and morechore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions