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

[ML] Rename index pattern references to data view (Part 2) #171820

Merged
merged 8 commits into from
Nov 23, 2023

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Nov 23, 2023

Summary

Follow up to #171627.

  • Renames references to index patterns to data views in function and variable names.
  • References that referred to Elasticsearch index patterns were prefixes with es. (reverted)
  • Some inconsistent naming of schemas for data frame analytics was cleaned up as part of this PR.

Note this doesn't cover the whole ml owned codebase but just code related to data frame analytics.

Checklist

@walterra walterra added :ml release_note:skip Skip the PR/issue when compiling release notes v8.12.0 labels Nov 23, 2023
@walterra walterra self-assigned this Nov 23, 2023
@walterra walterra requested a review from a team as a code owner November 23, 2023 07:58
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@@ -129,6 +129,6 @@ export function timeBasedIndexCheck(dataView: DataView, showNotification = false
* Returns true if the data view index pattern contains a :
* which means it is cross-cluster
*/
export function isCcsIndexPattern(dataViewIndexPattern: string) {
return dataViewIndexPattern.includes(':');
export function isCcsEsIndexPattern(esIndexPattern: string) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it's necessary have the prefix es in these variable names.
With this change, all references to indexPattern will be obvious that it’s referring to the sting which matches indices.
In other places in the kibana codebase they don't use a prefix e.g. https://github.com/elastic/kibana/blob/426a379f311fe76fccfe1fbf260ca0ea1b41f772/src/plugins/data_views/common/data_views/abstract_data_views.ts#L207C8-L207C8

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree to go just with indexPattern for consistency, I reverted the changes in fe60e8d and 958d29c.

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.

LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 3.6MB 3.6MB -268.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
ml 78.7KB 78.7KB -4.0B

History

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

cc @walterra

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Code changes LGTM

@walterra walterra merged commit aae3e5d into elastic:main Nov 23, 2023
26 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 23, 2023
@walterra walterra deleted the ml-rename-index-pattern-2-data-view-2 branch November 23, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting :ml release_note:skip Skip the PR/issue when compiling release notes v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants