[Security Solution] fixes Data Quality dashboard errors when a basePath is configured#156233
Conversation
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
Files by Code Ownerelastic/security-threat-hunting-explore
|
There was a problem hiding this comment.
Guessing it's to make sure the DataQuality dashboard renders? Either way, do you mind adding a comment for these @andrew-goldstein ? 😄
There was a problem hiding this comment.
| if (isSourcererLoading) { | |
| if (isSourcererLoading || isSignalIndexNameLoading) { |
Why not move both conditions up?
stephmilovic
left a comment
There was a problem hiding this comment.
Looks great, I can finally run with my base path 🎉 just a few minor comments, LGTM. Thanks for the fix!
There was a problem hiding this comment.
nit: If you do end up adding another commit, can you re-label this to successful response from ilm endpoint or something.. This is fine too, just not the most descriptive 😄
There was a problem hiding this comment.
samesies if you end up adding a commit
There was a problem hiding this comment.
Side question. I've seen it debated on a few PR's. Do you consider a benefit to having separate test blocks vs multiple expects in a single test block? Or even just testing the whole result.current object in one test?
There was a problem hiding this comment.
Side question. I've seen it debated on a few PR's. Do you consider a benefit to having separate test blocks vs multiple expects in a single test block? Or even just testing the whole
result.currentobject in one test?
I generally prefer to read and write "one assertion per test". That said, these tests had redundant test setup code. Per our offline discussion, I refactored-out the redundant setup code, and applied this pattern to the other test files in this PR.
michaelolo24
left a comment
There was a problem hiding this comment.
Nice work! Tested locally with and without a basePath, and just for completeness, multiple spaces in each. Everything looks to be working as expected. Thanks for getting this fix in!
…sePath` is configured This PR implements a fix for an [issue](elastic#156231) where the Data Quality dashboard displays errors when a `basePath` is configured, preventing indices from being checked. ### Desk testing - Verify the fix per the reporduction steps in <elastic#156231> - Also verify the page still behaves correctly when Kibana is started with no base path, via: ``` yarn start --no-base-path ``` ### Before / after screenshots **Before:**  _Above: Before the fix, errors occur when a `basePath` is configured_ **After:**  _Above: After the fix, errors do NOT occur_
f891f21 to
8ebf765
Compare
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
…ath` is configured (elastic#156233) ## [Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured This PR implements a fix for an [issue](elastic#156231) where the Data Quality dashboard displays errors when a `basePath` is configured, preventing indices from being checked. ### Desk testing - Verify the fix per the reporduction steps in <elastic#156231> - Also verify the page still behaves correctly when Kibana is started with no base path, via: ``` yarn start --no-base-path ``` ### Before / after screenshots **Before:**  _Above: Before the fix, errors occur when a `basePath` is configured_ **After:**  _Above: After the fix, errors do NOT occur_ (cherry picked from commit 3389a2b)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…`basePath` is configured (#156233) (#156730) # Backport This will backport the following commits from `main` to `8.8`: - [[Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured (#156233)](#156233) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Andrew Macri","email":"andrew.macri@elastic.co"},"sourceCommit":{"committedDate":"2023-05-04T19:24:39Z","message":"[Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured (#156233)\n\n## [Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured\r\n\r\nThis PR implements a fix for an [issue](#156231) where the Data Quality dashboard displays errors when a `basePath` is configured, preventing indices from being checked.\r\n\r\n### Desk testing\r\n\r\n- Verify the fix per the reporduction steps in <https://github.com/elastic/kibana/issues/156231>\r\n- Also verify the page still behaves correctly when Kibana is started with no base path, via:\r\n\r\n```\r\nyarn start --no-base-path\r\n```\r\n\r\n### Before / after screenshots\r\n\r\n**Before:**\r\n\r\n\r\n\r\n_Above: Before the fix, errors occur when a `basePath` is configured_\r\n\r\n**After:**\r\n\r\n\r\n\r\n_Above: After the fix, errors do NOT occur_","sha":"3389a2b35bf65fbb32ab10769997d4a210e95607","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team: SecuritySolution","Team:Threat Hunting:Investigations","v8.8.0","v8.9.0"],"number":156233,"url":"https://github.com/elastic/kibana/pull/156233","mergeCommit":{"message":"[Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured (#156233)\n\n## [Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured\r\n\r\nThis PR implements a fix for an [issue](#156231) where the Data Quality dashboard displays errors when a `basePath` is configured, preventing indices from being checked.\r\n\r\n### Desk testing\r\n\r\n- Verify the fix per the reporduction steps in <https://github.com/elastic/kibana/issues/156231>\r\n- Also verify the page still behaves correctly when Kibana is started with no base path, via:\r\n\r\n```\r\nyarn start --no-base-path\r\n```\r\n\r\n### Before / after screenshots\r\n\r\n**Before:**\r\n\r\n\r\n\r\n_Above: Before the fix, errors occur when a `basePath` is configured_\r\n\r\n**After:**\r\n\r\n\r\n\r\n_Above: After the fix, errors do NOT occur_","sha":"3389a2b35bf65fbb32ab10769997d4a210e95607"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156233","number":156233,"mergeCommit":{"message":"[Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured (#156233)\n\n## [Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured\r\n\r\nThis PR implements a fix for an [issue](#156231) where the Data Quality dashboard displays errors when a `basePath` is configured, preventing indices from being checked.\r\n\r\n### Desk testing\r\n\r\n- Verify the fix per the reporduction steps in <https://github.com/elastic/kibana/issues/156231>\r\n- Also verify the page still behaves correctly when Kibana is started with no base path, via:\r\n\r\n```\r\nyarn start --no-base-path\r\n```\r\n\r\n### Before / after screenshots\r\n\r\n**Before:**\r\n\r\n\r\n\r\n_Above: Before the fix, errors occur when a `basePath` is configured_\r\n\r\n**After:**\r\n\r\n\r\n\r\n_Above: After the fix, errors do NOT occur_","sha":"3389a2b35bf65fbb32ab10769997d4a210e95607"}}]}] BACKPORT--> Co-authored-by: Andrew Macri <andrew.macri@elastic.co>
* main: (153 commits)
[Security Solution] {{state.signals_count}} Object not working (#156472) (#156707)
[Synthetics] refresh data on visualization scrubbing (#156777)
[RAM] Docs for slack improvements (#153885)
[RAM] Alert search bar only KQL (#155947)
[ML] Functional tests - stabilize export job tests (#156586)
[Saved Search] Update saved search schema to allow empty `sort` arrays (#156769)
[ML] Rename `curated` model type to `elastic` (#156684)
[Discover] Enable sharing for text based languages (#156652)
[api-docs] 2023-05-05 Daily api_docs build (#156781)
Upgrade EUI to v77.2.2 (#155208)
[RAM][Maintenance Window][8.8]Fix window maintenance workflow (#156427)
[DOCS] Case file attachments (#156459)
[D4C] additional error handling for 'block' action added + policy editor UI fixes (#156629)
[Enterprise Search] refactor(SearchApplications): rename telemetry ids (#156733)
[Enterprise Search] Add telemetry to ELSER deployment buttons + error (#156545)
[Security Solution] fixes Data Quality dashboard errors when a `basePath` is configured (#156233)
[Logs onboarding] StepsFooter outside of main panel (#156686)
[Security Solution] Add a migration to unmute custom Security Solution rules (#156593)
[Enterprise Search][Behavioral Analytics] Update formulas (#156704)
Add API Events to Endpoint Security Advanced Policy (#156718)
...
[Security Solution] fixes Data Quality dashboard errors when a
basePathis configuredThis PR implements a fix for an issue where the Data Quality dashboard displays errors when a
basePathis configured, preventing indices from being checked.Desk testing
basePathis configured #156231Before / after screenshots
Before:
Above: Before the fix, errors occur when a
basePathis configuredAfter:
Above: After the fix, errors do NOT occur