-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Fixes issue with empty object creation #186821
[ML] Fixes issue with empty object creation #186821
Conversation
Pinging @elastic/ml-ui (:ml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…jgowdyelastic/kibana into fixing-issue-with-empty-object-creation
x-pack/plugins/ml/server/models/results_service/build_anomaly_table_items.js
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Using `Object.create(null)` when creating objects for the anomaly results table. (cherry picked from commit 8e76b0b)
Using `Object.create(null)` when creating objects for the anomaly results table. (cherry picked from commit 8e76b0b)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.14`: - [[ML] Fixing issue with empty object creation (#186821)](#186821) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-06-25T15:23:25Z","message":"[ML] Fixing issue with empty object creation (#186821)\n\nUsing `Object.create(null)` when creating objects for the anomaly\r\nresults table.","sha":"8e76b0b113089c793e4dba77610f90540ec9b8da","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly Detection","v8.15.0","v7.17.23","v8.14.2"],"title":"[ML] Fixing issue with empty object creation","number":186821,"url":"https://github.com/elastic/kibana/pull/186821","mergeCommit":{"message":"[ML] Fixing issue with empty object creation (#186821)\n\nUsing `Object.create(null)` when creating objects for the anomaly\r\nresults table.","sha":"8e76b0b113089c793e4dba77610f90540ec9b8da"}},"sourceBranch":"main","suggestedTargetBranches":["7.17","8.14"],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/186821","number":186821,"mergeCommit":{"message":"[ML] Fixing issue with empty object creation (#186821)\n\nUsing `Object.create(null)` when creating objects for the anomaly\r\nresults table.","sha":"8e76b0b113089c793e4dba77610f90540ec9b8da"}},{"branch":"7.17","label":"v7.17.23","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.14","label":"v8.14.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: James Gowdy <[email protected]>
# Backport This will backport the following commits from `main` to `7.17`: - [[ML] Fixing issue with empty object creation (#186821)](#186821) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-06-25T15:23:25Z","message":"[ML] Fixing issue with empty object creation (#186821)\n\nUsing `Object.create(null)` when creating objects for the anomaly\r\nresults table.","sha":"8e76b0b113089c793e4dba77610f90540ec9b8da","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly Detection","v8.15.0","v7.17.23","v8.14.2"],"title":"[ML] Fixing issue with empty object creation","number":186821,"url":"https://github.com/elastic/kibana/pull/186821","mergeCommit":{"message":"[ML] Fixing issue with empty object creation (#186821)\n\nUsing `Object.create(null)` when creating objects for the anomaly\r\nresults table.","sha":"8e76b0b113089c793e4dba77610f90540ec9b8da"}},"sourceBranch":"main","suggestedTargetBranches":["7.17","8.14"],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/186821","number":186821,"mergeCommit":{"message":"[ML] Fixing issue with empty object creation (#186821)\n\nUsing `Object.create(null)` when creating objects for the anomaly\r\nresults table.","sha":"8e76b0b113089c793e4dba77610f90540ec9b8da"}},{"branch":"7.17","label":"v7.17.23","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.14","label":"v8.14.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: James Gowdy <[email protected]>
@jgowdyelastic how do we test this PR? Thanks! |
…lastic#186900) # Backport This will backport the following commits from `main` to `7.17`: - [[ML] Fixing issue with empty object creation (elastic#186821)](elastic#186821) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-06-25T15:23:25Z","message":"[ML] Fixing issue with empty object creation (elastic#186821)\n\nUsing `Object.create(null)` when creating objects for the anomaly\r\nresults table.","sha":"8e76b0b113089c793e4dba77610f90540ec9b8da","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly Detection","v8.15.0","v7.17.23","v8.14.2"],"title":"[ML] Fixing issue with empty object creation","number":186821,"url":"https://github.com/elastic/kibana/pull/186821","mergeCommit":{"message":"[ML] Fixing issue with empty object creation (elastic#186821)\n\nUsing `Object.create(null)` when creating objects for the anomaly\r\nresults table.","sha":"8e76b0b113089c793e4dba77610f90540ec9b8da"}},"sourceBranch":"main","suggestedTargetBranches":["7.17","8.14"],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/186821","number":186821,"mergeCommit":{"message":"[ML] Fixing issue with empty object creation (elastic#186821)\n\nUsing `Object.create(null)` when creating objects for the anomaly\r\nresults table.","sha":"8e76b0b113089c793e4dba77610f90540ec9b8da"}},{"branch":"7.17","label":"v7.17.23","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.14","label":"v8.14.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: James Gowdy <[email protected]>
Replacing instances of empty object creation with `Object.create(null)` to remove any risk of prototype pollution. Only touching server and common code. Follows on from #186821
Replacing instances of empty object creation with `Object.create(null)` to remove any risk of prototype pollution. Only touching server and common code. Follows on from elastic#186821 (cherry picked from commit 5ea65f9)
Replacing instances of empty object creation with `Object.create(null)` to remove any risk of prototype pollution. Only touching server and common code. Follows on from elastic#186821 (cherry picked from commit 5ea65f9)
# Backport This will backport the following commits from `main` to `8.15`: - [[ML] Improving empty object creation (#191518)](#191518) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-08-28T15:41:34Z","message":"[ML] Improving empty object creation (#191518)\n\nReplacing instances of empty object creation with `Object.create(null)`\r\nto remove any risk of prototype pollution.\r\nOnly touching server and common code.\r\n\r\nFollows on from https://github.com/elastic/kibana/pull/186821","sha":"5ea65f9ed741514c264642b3a5ccb83bf648ff7a","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","v8.16.0","v8.14.4","v7.17.24","v8.15.1"],"title":"[ML] Improving empty object creation","number":191518,"url":"https://github.com/elastic/kibana/pull/191518","mergeCommit":{"message":"[ML] Improving empty object creation (#191518)\n\nReplacing instances of empty object creation with `Object.create(null)`\r\nto remove any risk of prototype pollution.\r\nOnly touching server and common code.\r\n\r\nFollows on from https://github.com/elastic/kibana/pull/186821","sha":"5ea65f9ed741514c264642b3a5ccb83bf648ff7a"}},"sourceBranch":"main","suggestedTargetBranches":["8.14","7.17","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/191518","number":191518,"mergeCommit":{"message":"[ML] Improving empty object creation (#191518)\n\nReplacing instances of empty object creation with `Object.create(null)`\r\nto remove any risk of prototype pollution.\r\nOnly touching server and common code.\r\n\r\nFollows on from https://github.com/elastic/kibana/pull/186821","sha":"5ea65f9ed741514c264642b3a5ccb83bf648ff7a"}},{"branch":"8.14","label":"v8.14.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.17","label":"v7.17.24","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: James Gowdy <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Using
Object.create(null)
when creating objects for the anomaly results table.