Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @elastic/elasticsearch to v8.2.0-canary.2 #128633

Merged
merged 11 commits into from
Apr 4, 2022

Conversation

pgayvallet
Copy link
Contributor

@pgayvallet pgayvallet commented Mar 28, 2022

Summary

Bump @elastic/elasticsearch to version v8.2.0-canary.2 and adapt associated TS failures and violations

@pgayvallet pgayvallet added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes v8.2.0 labels Mar 28, 2022
@pgayvallet pgayvallet added the backport:skip This commit does not require backporting label Mar 28, 2022
@pgayvallet pgayvallet marked this pull request as ready for review March 30, 2022 10:16
@pgayvallet pgayvallet requested review from a team as code owners March 30, 2022 10:16
@pgayvallet pgayvallet requested a review from a team March 30, 2022 10:16
@pgayvallet pgayvallet requested review from a team as code owners March 30, 2022 10:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@@ -111,6 +111,7 @@ export function modelsProvider(client: IScopedClusterClient, mlClient: MlClient)
* Provides the ML nodes overview with allocated models.
*/
async getNodesOverview(): Promise<NodesOverviewResponse> {
// @ts-expect-error typo in type definition: MlGetMemoryStatsResponse.cluser_name
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will be fixed in the next canary version

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

Core changes LGTM

Comment on lines +231 to 232
// @ts-expect-error 'properties' does not exist on type 'MappingMatchOnlyTextProperty'
isECS: !!indexMappings[name]?.mappings?.properties?.ecs?.properties?.version?.type,
Copy link
Member

Choose a reason for hiding this comment

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

😢

Copy link
Contributor Author

@pgayvallet pgayvallet Mar 30, 2022

Choose a reason for hiding this comment

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

Yes, even if this is a proper type fix (not all mapping types accepts a properties property) this is actually a 'terrible' change for us.

TBH I blame TS a bit about this behavior:

type A = { foo: string; }
type B = { bar: string; }
type Composite = A | B;

const test: Composite = { foo: 'hello' };
// error 'foo' does not exist on type B
test.foo

I would love to have a way for TS to consider typeof test.foo as being string | undefined, but undeclared and undefined are two very distinct concepts for typescript...

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Deployment management changes LGTM - only 1 change in fetch_indices.ts

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

ML changes LGTM

Copy link
Contributor

@scottybollinger scottybollinger left a comment

Choose a reason for hiding this comment

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

Enterprise Search changes LGTM

Copy link
Member

@efegurkan efegurkan left a comment

Choose a reason for hiding this comment

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

enterprise search changes LGTM

Copy link
Contributor

@klacabane klacabane left a comment

Choose a reason for hiding this comment

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

Infra changes LGTM

Copy link
Contributor

@dhurley14 dhurley14 left a comment

Choose a reason for hiding this comment

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

security solution changes LGTM.

Copy link
Contributor

@dhurley14 dhurley14 left a comment

Choose a reason for hiding this comment

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

security solution changes LGTM.

@pgayvallet
Copy link
Contributor Author

@elasticmachine merge upstream

@pgayvallet pgayvallet added v8.3.0 v8.2.0 auto-backport Deprecated - use backport:version if exact versions are needed and removed v8.2.0 backport:skip This commit does not require backporting labels Apr 1, 2022
@pgayvallet pgayvallet force-pushed the kbn-xxx-ES-8.2.0-canary.2 branch from 2162407 to 55bba66 Compare April 4, 2022 06:03
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Default CI Group #12 / alerting api integration spaces only Alerting builtin alertTypes es_query alert runs correctly: use epoch millis - threshold on hit count < > for searchSource search type

Metrics [docs]

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
kibana 313 310 -3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pgayvallet pgayvallet merged commit 158c617 into elastic:main Apr 4, 2022
kibanamachine pushed a commit that referenced this pull request Apr 4, 2022
* Update @elastic/elasticsearch to v8.2.0-canary.2

* fix core violation

* add optional properties to our type

* update generated doc

* add another ts-ignore

* remove unused ts-expect-error

* add ts-expect-error for type typo

* add ts-expect-error infra code

* fix more errors

(cherry picked from commit 158c617)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 4, 2022
* Update @elastic/elasticsearch to v8.2.0-canary.2

* fix core violation

* add optional properties to our type

* update generated doc

* add another ts-ignore

* remove unused ts-expect-error

* add ts-expect-error for type typo

* add ts-expect-error infra code

* fix more errors

(cherry picked from commit 158c617)

Co-authored-by: Pierre Gayvallet <pierre.gayvallet@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.2.0 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.