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] Transforms: Limit the data grid result window #196510

Merged
merged 6 commits into from
Oct 18, 2024

Conversation

rbrtj
Copy link
Contributor

@rbrtj rbrtj commented Oct 16, 2024

Summary

Fix for: #196101
Added a limit for grid data, capping it at a max of 10000 documents, as any number above this triggers an error due to ES pagination limitations. Since this is only a preview, displaying all the data in the grid is unnecessary.
After:
Screenshot 2024-10-16 at 11 37 29

Checklist

@rbrtj rbrtj self-assigned this Oct 16, 2024
@rbrtj rbrtj added release_note:fix :ml Team:ML Team label for ML (also use :ml) v8.16.0 backport:version Backport to applied version labels v9.0.0 labels Oct 16, 2024
@rbrtj rbrtj marked this pull request as ready for review October 16, 2024 09:54
@rbrtj rbrtj requested a review from a team as a code owner October 16, 2024 09:54
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

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.

Tested and LGTM

rbrtj and others added 2 commits October 16, 2024 14:21
Co-authored-by: István Zoltán Szabó <[email protected]>
Copy link
Contributor

@szabosteve szabosteve left a comment

Choose a reason for hiding this comment

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

UI text LGTM!

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM overall, left one request

@@ -288,6 +289,11 @@ export const StepDefineForm: FC<StepDefineFormProps> = React.memo((props) => {
};
});

const rowCountInfoLabel = i18n.translate('xpack.transform.stepDefineForm.rowCountInfoLabel', {
Copy link
Contributor

Choose a reason for hiding this comment

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

For react components FormattedMessage component is preferred according to Kibana's guidelines

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in: #7c3e699

@rbrtj rbrtj enabled auto-merge (squash) October 18, 2024 08:12
@rbrtj rbrtj merged commit 592225d into elastic:main Oct 18, 2024
21 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16

https://github.com/elastic/kibana/actions/runs/11401409820

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/ml-data-grid 5 6 +1

Async chunks

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

id before after diff
ml 4.5MB 4.5MB +112.0B
transform 477.5KB 477.9KB +470.0B
total +582.0B

History

cc @rbrtj

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 18, 2024
## Summary

Fix for: [elastic#196101](elastic#196101)
Added a limit for grid data, capping it at a max of `10000` documents,
as any number above this triggers an error due to ES pagination
limitations. Since this is only a preview, displaying all the data in
the grid is unnecessary.
After:
![Screenshot 2024-10-16 at 11 37
29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)

---------

Co-authored-by: István Zoltán Szabó <[email protected]>
(cherry picked from commit 592225d)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16

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 Oct 18, 2024
…196829)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[ML] Transforms: Limit the data grid result window
(#196510)](#196510)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-18T09:45:10Z","message":"[ML]
Transforms: Limit the data grid result window (#196510)\n\n##
Summary\r\n\r\nFix for:
[#196101](https://github.com/elastic/kibana/issues/196101)\r\nAdded a
limit for grid data, capping it at a max of `10000` documents,\r\nas any
number above this triggers an error due to ES pagination\r\nlimitations.
Since this is only a preview, displaying all the data in\r\nthe grid is
unnecessary.\r\nAfter:\r\n![Screenshot 2024-10-16 at 11
37\r\n29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n\r\n---------\r\n\r\nCo-authored-by:
István Zoltán Szabó
<[email protected]>","sha":"592225dfb6ffefa2717b49479491231dec12ecf2","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","v9.0.0","Team:ML","v8.16.0","backport:version"],"title":"[ML]
Transforms: Limit the data grid result
window","number":196510,"url":"https://github.com/elastic/kibana/pull/196510","mergeCommit":{"message":"[ML]
Transforms: Limit the data grid result window (#196510)\n\n##
Summary\r\n\r\nFix for:
[#196101](https://github.com/elastic/kibana/issues/196101)\r\nAdded a
limit for grid data, capping it at a max of `10000` documents,\r\nas any
number above this triggers an error due to ES pagination\r\nlimitations.
Since this is only a preview, displaying all the data in\r\nthe grid is
unnecessary.\r\nAfter:\r\n![Screenshot 2024-10-16 at 11
37\r\n29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n\r\n---------\r\n\r\nCo-authored-by:
István Zoltán Szabó
<[email protected]>","sha":"592225dfb6ffefa2717b49479491231dec12ecf2"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196510","number":196510,"mergeCommit":{"message":"[ML]
Transforms: Limit the data grid result window (#196510)\n\n##
Summary\r\n\r\nFix for:
[#196101](https://github.com/elastic/kibana/issues/196101)\r\nAdded a
limit for grid data, capping it at a max of `10000` documents,\r\nas any
number above this triggers an error due to ES pagination\r\nlimitations.
Since this is only a preview, displaying all the data in\r\nthe grid is
unnecessary.\r\nAfter:\r\n![Screenshot 2024-10-16 at 11
37\r\n29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n\r\n---------\r\n\r\nCo-authored-by:
István Zoltán Szabó
<[email protected]>","sha":"592225dfb6ffefa2717b49479491231dec12ecf2"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <[email protected]>
@jbudz
Copy link
Member

jbudz commented Oct 18, 2024

@rbrtj there's a version gap with this backport. Can you check if this should also be backported to 8.x/8.17?

@rbrtj rbrtj added v8.17.0 backport:version Backport to applied version labels and removed backport:version Backport to applied version labels labels Oct 21, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11436086950

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 21, 2024
## Summary

Fix for: [elastic#196101](elastic#196101)
Added a limit for grid data, capping it at a max of `10000` documents,
as any number above this triggers an error due to ES pagination
limitations. Since this is only a preview, displaying all the data in
the grid is unnecessary.
After:
![Screenshot 2024-10-16 at 11 37
29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)

---------

Co-authored-by: István Zoltán Szabó <[email protected]>
(cherry picked from commit 592225d)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 Cherrypick failed because the selected commit (592225d) is empty. It looks like the commit was already backported in #196829
8.x

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 196510

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 21, 2024
…197002)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Transforms: Limit the data grid result window
(#196510)](#196510)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-18T09:45:10Z","message":"[ML]
Transforms: Limit the data grid result window (#196510)\n\n##
Summary\r\n\r\nFix for:
[#196101](https://github.com/elastic/kibana/issues/196101)\r\nAdded a
limit for grid data, capping it at a max of `10000` documents,\r\nas any
number above this triggers an error due to ES pagination\r\nlimitations.
Since this is only a preview, displaying all the data in\r\nthe grid is
unnecessary.\r\nAfter:\r\n![Screenshot 2024-10-16 at 11
37\r\n29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n\r\n---------\r\n\r\nCo-authored-by:
István Zoltán Szabó
<[email protected]>","sha":"592225dfb6ffefa2717b49479491231dec12ecf2","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","v9.0.0","Team:ML","v8.16.0","backport:version","v8.17.0"],"title":"[ML]
Transforms: Limit the data grid result
window","number":196510,"url":"https://github.com/elastic/kibana/pull/196510","mergeCommit":{"message":"[ML]
Transforms: Limit the data grid result window (#196510)\n\n##
Summary\r\n\r\nFix for:
[#196101](https://github.com/elastic/kibana/issues/196101)\r\nAdded a
limit for grid data, capping it at a max of `10000` documents,\r\nas any
number above this triggers an error due to ES pagination\r\nlimitations.
Since this is only a preview, displaying all the data in\r\nthe grid is
unnecessary.\r\nAfter:\r\n![Screenshot 2024-10-16 at 11
37\r\n29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n\r\n---------\r\n\r\nCo-authored-by:
István Zoltán Szabó
<[email protected]>","sha":"592225dfb6ffefa2717b49479491231dec12ecf2"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196510","number":196510,"mergeCommit":{"message":"[ML]
Transforms: Limit the data grid result window (#196510)\n\n##
Summary\r\n\r\nFix for:
[#196101](https://github.com/elastic/kibana/issues/196101)\r\nAdded a
limit for grid data, capping it at a max of `10000` documents,\r\nas any
number above this triggers an error due to ES pagination\r\nlimitations.
Since this is only a preview, displaying all the data in\r\nthe grid is
unnecessary.\r\nAfter:\r\n![Screenshot 2024-10-16 at 11
37\r\n29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n\r\n---------\r\n\r\nCo-authored-by:
István Zoltán Szabó
<[email protected]>","sha":"592225dfb6ffefa2717b49479491231dec12ecf2"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/196829","number":196829,"state":"MERGED","mergeCommit":{"sha":"21a3625dd5933dcdc87195f5cb3bfa450a5287c9","message":"[8.16]
[ML] Transforms: Limit the data grid result window (#196510)
(#196829)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.16`:\n- [[ML] Transforms: Limit the data grid result
window\n(#196510)](https://github.com/elastic/kibana/pull/196510)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Robert\nJaszczurek\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-10-18T09:45:10Z\",\"message\":\"[ML]\nTransforms:
Limit the data grid result window
(#196510)\\n\\n##\nSummary\\r\\n\\r\\nFix
for:\n[#196101](https://github.com/elastic/kibana/issues/196101)\\r\\nAdded
a\nlimit for grid data, capping it at a max of `10000`
documents,\\r\\nas any\nnumber above this triggers an error due to ES
pagination\\r\\nlimitations.\nSince this is only a preview, displaying
all the data in\\r\\nthe grid
is\nunnecessary.\\r\\nAfter:\\r\\n![Screenshot 2024-10-16 at
11\n37\\r\\n29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)\\r\\n\\r\\n\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\n-
[ ] Any text added follows
[EUI's\nwriting\\r\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\r\\nsentence
case text and
includes\n[i18n\\r\\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nIstván
Zoltán
Szabó\n<[email protected]>\",\"sha\":\"592225dfb6ffefa2717b49479491231dec12ecf2\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:fix\",\":ml\",\"v9.0.0\",\"Team:ML\",\"v8.16.0\",\"backport:version\"],\"title\":\"[ML]\nTransforms:
Limit the data grid
result\nwindow\",\"number\":196510,\"url\":\"https://github.com/elastic/kibana/pull/196510\",\"mergeCommit\":{\"message\":\"[ML]\nTransforms:
Limit the data grid result window
(#196510)\\n\\n##\nSummary\\r\\n\\r\\nFix
for:\n[#196101](https://github.com/elastic/kibana/issues/196101)\\r\\nAdded
a\nlimit for grid data, capping it at a max of `10000`
documents,\\r\\nas any\nnumber above this triggers an error due to ES
pagination\\r\\nlimitations.\nSince this is only a preview, displaying
all the data in\\r\\nthe grid
is\nunnecessary.\\r\\nAfter:\\r\\n![Screenshot 2024-10-16 at
11\n37\\r\\n29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)\\r\\n\\r\\n\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\n-
[ ] Any text added follows
[EUI's\nwriting\\r\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\r\\nsentence
case text and
includes\n[i18n\\r\\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nIstván
Zoltán
Szabó\n<[email protected]>\",\"sha\":\"592225dfb6ffefa2717b49479491231dec12ecf2\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.16\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/196510\",\"number\":196510,\"mergeCommit\":{\"message\":\"[ML]\nTransforms:
Limit the data grid result window
(#196510)\\n\\n##\nSummary\\r\\n\\r\\nFix
for:\n[#196101](https://github.com/elastic/kibana/issues/196101)\\r\\nAdded
a\nlimit for grid data, capping it at a max of `10000`
documents,\\r\\nas any\nnumber above this triggers an error due to ES
pagination\\r\\nlimitations.\nSince this is only a preview, displaying
all the data in\\r\\nthe grid
is\nunnecessary.\\r\\nAfter:\\r\\n![Screenshot 2024-10-16 at
11\n37\\r\\n29](https://github.com/user-attachments/assets/f73c8169-3be7-4a27-9169-c4161b22c214)\\r\\n\\r\\n\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\n-
[ ] Any text added follows
[EUI's\nwriting\\r\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\r\\nsentence
case text and
includes\n[i18n\\r\\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nIstván
Zoltán
Szabó\n<[email protected]>\",\"sha\":\"592225dfb6ffefa2717b49479491231dec12ecf2\"}},{\"branch\":\"8.16\",\"label\":\"v8.16.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by:
Robert Jaszczurek
<[email protected]>"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels :ml release_note:fix Team:ML Team label for ML (also use :ml) v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants