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

[Security Solution][Data Quality Dashboard][Serverless] add start/end time support for latest_results #199248

Merged

Conversation

kapral18
Copy link
Contributor

@kapral18 kapral18 commented Nov 7, 2024

addresses #191053

  • Introduce defaultStartTime and defaultEndTime props across data quality context and panels for fetching latest_results and align them with serverless default time range of last week
  • Update hooks to handle new time parameters and include them in storage results queries.
  • Modify server-side helpers and routes to process and filter indices based on the provided time range.
  • Update related tests to accommodate the new time parameters.

@kapral18 kapral18 self-assigned this Nov 7, 2024
@kapral18 kapral18 requested a review from a team as a code owner November 7, 2024 01:46
@kapral18 kapral18 added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Explore backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Nov 7, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-explore (Team:Threat Hunting:Explore)

@kapral18 kapral18 force-pushed the fix/DQD/191053-fix-incompatible-counts branch from 456a48e to 1a5a72f Compare November 7, 2024 01:49
@kapral18 kapral18 changed the title [Security Solution][Data Quality Dashboard] add default start and end time support [Security Solution][Data Quality Dashboard][Serverless] add start/end time support for latest_results Nov 7, 2024
@kapral18 kapral18 added ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-security Create a Security Serverless Project labels Nov 7, 2024
@kapral18 kapral18 force-pushed the fix/DQD/191053-fix-incompatible-counts branch 2 times, most recently from c5f4423 to 611e05f Compare November 7, 2024 12:01
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add the test, just noticed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +85 to +103
const { startDate, endDate } = request.query;

let resultingIndices: string[] = [];

if (startDate && endDate) {
resultingIndices = resultingIndices.concat(
await getRangeFilteredIndices({
client,
authorizedIndexNames,
startDate,
endDate,
logger,
pattern,
})
);
} else {
resultingIndices = authorizedIndexNames;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add the test, just noticed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@kapral18 kapral18 force-pushed the fix/DQD/191053-fix-incompatible-counts branch from bcf9539 to 21273b0 Compare November 7, 2024 12:59
… time support for latest_results

addresses elastic#191053

- Introduce `defaultStartTime` and `defaultEndTime` props across data
quality context and panels for fetching latest_results and align them
with serverless default time range of last week
- Update hooks to handle new time parameters and include them in storage
results queries.
- Modify server-side helpers and routes to process and filter indices
based on the provided time range.
- Update related tests to accommodate the new time parameters.
@kapral18 kapral18 force-pushed the fix/DQD/191053-fix-incompatible-counts branch from 21273b0 to f732192 Compare November 7, 2024 15:56
@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 7, 2024

💚 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
securitySolution 13.4MB 13.4MB +535.0B

History

cc @kapral18

@kapral18 kapral18 enabled auto-merge (squash) November 7, 2024 17:36
@kapral18 kapral18 merged commit 1df04ae into elastic:main Nov 7, 2024
46 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kapral18 kapral18 deleted the fix/DQD/191053-fix-incompatible-counts branch November 7, 2024 19:13
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 7, 2024
… time support for latest_results (elastic#199248)

addresses elastic#191053

- Introduce `defaultStartTime` and `defaultEndTime` props across data
quality context and panels for fetching latest_results and align them
with serverless default time range of last week
- Update hooks to handle new time parameters and include them in storage
results queries.
- Modify server-side helpers and routes to process and filter indices
based on the provided time range.
- Update related tests to accommodate the new time parameters.

(cherry picked from commit 1df04ae)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 Nov 7, 2024
…rt/end time support for latest_results (#199248) (#199385)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution][Data Quality Dashboard][Serverless] add start/end
time support for latest_results
(#199248)](#199248)

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

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

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-07T17:42:31Z","message":"[Security
Solution][Data Quality Dashboard][Serverless] add start/end time support
for latest_results (#199248)\n\naddresses #191053\r\n\r\n- Introduce
`defaultStartTime` and `defaultEndTime` props across data\r\nquality
context and panels for fetching latest_results and align them\r\nwith
serverless default time range of last week\r\n- Update hooks to handle
new time parameters and include them in storage\r\nresults queries.\r\n-
Modify server-side helpers and routes to process and filter
indices\r\nbased on the provided time range.\r\n- Update related tests
to accommodate the new time
parameters.","sha":"1df04aef8d5859507c85a2ad37594075e9054b70","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","Team:Threat
Hunting:Explore","backport:prev-minor","ci:cloud-deploy","ci:project-deploy-security"],"title":"[Security
Solution][Data Quality Dashboard][Serverless] add start/end time support
for
latest_results","number":199248,"url":"https://github.com/elastic/kibana/pull/199248","mergeCommit":{"message":"[Security
Solution][Data Quality Dashboard][Serverless] add start/end time support
for latest_results (#199248)\n\naddresses #191053\r\n\r\n- Introduce
`defaultStartTime` and `defaultEndTime` props across data\r\nquality
context and panels for fetching latest_results and align them\r\nwith
serverless default time range of last week\r\n- Update hooks to handle
new time parameters and include them in storage\r\nresults queries.\r\n-
Modify server-side helpers and routes to process and filter
indices\r\nbased on the provided time range.\r\n- Update related tests
to accommodate the new time
parameters.","sha":"1df04aef8d5859507c85a2ad37594075e9054b70"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199248","number":199248,"mergeCommit":{"message":"[Security
Solution][Data Quality Dashboard][Serverless] add start/end time support
for latest_results (#199248)\n\naddresses #191053\r\n\r\n- Introduce
`defaultStartTime` and `defaultEndTime` props across data\r\nquality
context and panels for fetching latest_results and align them\r\nwith
serverless default time range of last week\r\n- Update hooks to handle
new time parameters and include them in storage\r\nresults queries.\r\n-
Modify server-side helpers and routes to process and filter
indices\r\nbased on the provided time range.\r\n- Update related tests
to accommodate the new time
parameters.","sha":"1df04aef8d5859507c85a2ad37594075e9054b70"}}]}]
BACKPORT-->

Co-authored-by: Karen Grigoryan <[email protected]>
mbondyra pushed a commit to mbondyra/kibana that referenced this pull request Nov 8, 2024
… time support for latest_results (elastic#199248)

addresses elastic#191053

- Introduce `defaultStartTime` and `defaultEndTime` props across data
quality context and panels for fetching latest_results and align them
with serverless default time range of last week
- Update hooks to handle new time parameters and include them in storage
results queries.
- Modify server-side helpers and routes to process and filter indices
based on the provided time range.
- Update related tests to accommodate the new time parameters.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 8, 2024
… time support for latest_results (elastic#199248)

addresses elastic#191053

- Introduce `defaultStartTime` and `defaultEndTime` props across data
quality context and panels for fetching latest_results and align them
with serverless default time range of last week
- Update hooks to handle new time parameters and include them in storage
results queries.
- Modify server-side helpers and routes to process and filter indices
based on the provided time range.
- Update related tests to accommodate the new time parameters.
kapral18 added a commit to kapral18/kibana that referenced this pull request Nov 18, 2024
… time support for latest_results (elastic#199248)

addresses elastic#191053

- Introduce `defaultStartTime` and `defaultEndTime` props across data
quality context and panels for fetching latest_results and align them
with serverless default time range of last week
- Update hooks to handle new time parameters and include them in storage
results queries.
- Modify server-side helpers and routes to process and filter indices
based on the provided time range.
- Update related tests to accommodate the new time parameters.

(cherry picked from commit 1df04ae)
@kapral18
Copy link
Contributor Author

💚 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

kapral18 added a commit that referenced this pull request Nov 18, 2024
…art/end time support for latest_results (#199248) (#200635)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Security Solution][Data Quality Dashboard][Serverless] add start/end
time support for latest_results
(#199248)](#199248)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-07T17:42:31Z","message":"[Security
Solution][Data Quality Dashboard][Serverless] add start/end time support
for latest_results (#199248)\n\naddresses #191053\r\n\r\n- Introduce
`defaultStartTime` and `defaultEndTime` props across data\r\nquality
context and panels for fetching latest_results and align them\r\nwith
serverless default time range of last week\r\n- Update hooks to handle
new time parameters and include them in storage\r\nresults queries.\r\n-
Modify server-side helpers and routes to process and filter
indices\r\nbased on the provided time range.\r\n- Update related tests
to accommodate the new time
parameters.","sha":"1df04aef8d5859507c85a2ad37594075e9054b70","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","Team:Threat
Hunting:Explore","backport:prev-minor","ci:cloud-deploy","ci:project-deploy-security","v8.17.0"],"number":199248,"url":"https://github.com/elastic/kibana/pull/199248","mergeCommit":{"message":"[Security
Solution][Data Quality Dashboard][Serverless] add start/end time support
for latest_results (#199248)\n\naddresses #191053\r\n\r\n- Introduce
`defaultStartTime` and `defaultEndTime` props across data\r\nquality
context and panels for fetching latest_results and align them\r\nwith
serverless default time range of last week\r\n- Update hooks to handle
new time parameters and include them in storage\r\nresults queries.\r\n-
Modify server-side helpers and routes to process and filter
indices\r\nbased on the provided time range.\r\n- Update related tests
to accommodate the new time
parameters.","sha":"1df04aef8d5859507c85a2ad37594075e9054b70"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199248","number":199248,"mergeCommit":{"message":"[Security
Solution][Data Quality Dashboard][Serverless] add start/end time support
for latest_results (#199248)\n\naddresses #191053\r\n\r\n- Introduce
`defaultStartTime` and `defaultEndTime` props across data\r\nquality
context and panels for fetching latest_results and align them\r\nwith
serverless default time range of last week\r\n- Update hooks to handle
new time parameters and include them in storage\r\nresults queries.\r\n-
Modify server-side helpers and routes to process and filter
indices\r\nbased on the provided time range.\r\n- Update related tests
to accommodate the new time
parameters.","sha":"1df04aef8d5859507c85a2ad37594075e9054b70"}},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/199385","number":199385,"state":"MERGED","mergeCommit":{"sha":"de09e3af76d4bd1ce029830bd866e20b46e3aa9e","message":"[8.x]
[Security Solution][Data Quality Dashboard][Serverless] add start/end
time support for latest_results (#199248) (#199385)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`8.x`:\n- [[Security Solution][Data Quality Dashboard][Serverless] add
start/end\ntime support for
latest_results\n(#199248)](https://github.com/elastic/kibana/pull/199248)\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\":\"Karen\nGrigoryan\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-11-07T17:42:31Z\",\"message\":\"[Security\nSolution][Data
Quality Dashboard][Serverless] add start/end time support\nfor
latest_results (#199248)\\n\\naddresses #191053\\r\\n\\r\\n-
Introduce\n`defaultStartTime` and `defaultEndTime` props across
data\\r\\nquality\ncontext and panels for fetching latest_results and
align them\\r\\nwith\nserverless default time range of last week\\r\\n-
Update hooks to handle\nnew time parameters and include them in
storage\\r\\nresults queries.\\r\\n-\nModify server-side helpers and
routes to process and filter\nindices\\r\\nbased on the provided time
range.\\r\\n- Update related tests\nto accommodate the new
time\nparameters.\",\"sha\":\"1df04aef8d5859507c85a2ad37594075e9054b70\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"Team:Threat\nHunting\",\"Team:Threat\nHunting:Explore\",\"backport:prev-minor\",\"ci:cloud-deploy\",\"ci:project-deploy-security\"],\"title\":\"[Security\nSolution][Data
Quality Dashboard][Serverless] add start/end time
support\nfor\nlatest_results\",\"number\":199248,\"url\":\"https://github.com/elastic/kibana/pull/199248\",\"mergeCommit\":{\"message\":\"[Security\nSolution][Data
Quality Dashboard][Serverless] add start/end time support\nfor
latest_results (#199248)\\n\\naddresses #191053\\r\\n\\r\\n-
Introduce\n`defaultStartTime` and `defaultEndTime` props across
data\\r\\nquality\ncontext and panels for fetching latest_results and
align them\\r\\nwith\nserverless default time range of last week\\r\\n-
Update hooks to handle\nnew time parameters and include them in
storage\\r\\nresults queries.\\r\\n-\nModify server-side helpers and
routes to process and filter\nindices\\r\\nbased on the provided time
range.\\r\\n- Update related tests\nto accommodate the new
time\nparameters.\",\"sha\":\"1df04aef8d5859507c85a2ad37594075e9054b70\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/199248\",\"number\":199248,\"mergeCommit\":{\"message\":\"[Security\nSolution][Data
Quality Dashboard][Serverless] add start/end time support\nfor
latest_results (#199248)\\n\\naddresses #191053\\r\\n\\r\\n-
Introduce\n`defaultStartTime` and `defaultEndTime` props across
data\\r\\nquality\ncontext and panels for fetching latest_results and
align them\\r\\nwith\nserverless default time range of last week\\r\\n-
Update hooks to handle\nnew time parameters and include them in
storage\\r\\nresults queries.\\r\\n-\nModify server-side helpers and
routes to process and filter\nindices\\r\\nbased on the provided time
range.\\r\\n- Update related tests\nto accommodate the new
time\nparameters.\",\"sha\":\"1df04aef8d5859507c85a2ad37594075e9054b70\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Karen Grigoryan <[email protected]>"}}]}] BACKPORT-->
@mistic
Copy link
Member

mistic commented Nov 21, 2024

This PR didn't make it into the latest BC of v8.16.1. Updating the labels.

@mistic mistic added v8.16.2 and removed v8.16.1 labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-security Create a Security Serverless Project release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team v8.16.2 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants