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

[Search] [Playground] [Bug] Add playground index validation #201032

Merged
merged 14 commits into from
Nov 25, 2024

Conversation

yansavitski
Copy link
Contributor

@yansavitski yansavitski commented Nov 20, 2024

Fix bug when localStorage has invalid index, then playground chat page opens with empty source.

@yansavitski yansavitski added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:Search labels Nov 20, 2024
@yansavitski yansavitski requested a review from a team as a code owner November 20, 2024 19:52
@joemcelroy
Copy link
Member

thanks for fixing this quickly!


useEffect(() => {
if (isIndicesLoaded) {
setValidIndices(indices.filter((index) => unvalidatedIndices.includes(index)));
Copy link
Member

@joemcelroy joemcelroy Nov 21, 2024

Choose a reason for hiding this comment

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

useQueryIndices gets the top 10 indices, what happens if its not in this list but does exist?

I would do an explicit API call for all the unvalidatedIndices to see if they exist.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@joemcelroy joemcelroy left a comment

Choose a reason for hiding this comment

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

blocking this until comment resolved.

@yansavitski yansavitski enabled auto-merge (squash) November 24, 2024 23:21
@yansavitski yansavitski force-pushed the add-playground-index-validation branch from db822c5 to 7b0a9df Compare November 25, 2024 11:27
@joemcelroy joemcelroy added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels Nov 25, 2024
@yansavitski yansavitski force-pushed the add-playground-index-validation branch from 7b0a9df to 9f61325 Compare November 25, 2024 14:58
@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 25, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #30 / serverless search UI Serverless Playground Overview setup Page with existing indices load start page after removing selected index
  • [job] [logs] FTR Configs #30 / serverless search UI Serverless Playground Overview setup Page with existing indices load start page after removing selected index

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
searchPlayground 270 271 +1

Async chunks

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

id before after diff
searchPlayground 168.7KB 169.8KB +1.1KB

History

@yansavitski yansavitski force-pushed the add-playground-index-validation branch from efb27bd to f132064 Compare November 25, 2024 19:14
@yansavitski yansavitski merged commit d99431e into elastic:main Nov 25, 2024
22 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 201032

Questions ?

Please refer to the Backport tool documentation

@yansavitski
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

yansavitski added a commit to yansavitski/kibana that referenced this pull request Nov 26, 2024
…201032)

Fix bug when localStorage has invalid index, then playground chat page
opens with empty source.

(cherry picked from commit d99431e)

# Conflicts:
#	x-pack/test_serverless/functional/test_suites/search/search_playground/playground_overview.ts
yansavitski added a commit that referenced this pull request Nov 26, 2024
…201032) (#201750)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Search] [Playground] [Bug] Add playground index validation
(#201032)](#201032)

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

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

<!--BACKPORT [{"author":{"name":"Yan
Savitski","email":"yan.savitski@elastic.co"},"sourceCommit":{"committedDate":"2024-11-25T21:06:54Z","message":"[Search]
[Playground] [Bug] Add playground index validation (#201032)\n\nFix bug
when localStorage has invalid index, then playground chat page\r\nopens
with empty
source.","sha":"d99431e51ea976baa69d51d4f7ba30592adecf7e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:prev-minor"],"number":201032,"url":"https://github.com/elastic/kibana/pull/201032","mergeCommit":{"message":"[Search]
[Playground] [Bug] Add playground index validation (#201032)\n\nFix bug
when localStorage has invalid index, then playground chat page\r\nopens
with empty
source.","sha":"d99431e51ea976baa69d51d4f7ba30592adecf7e"}},"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/201032","number":201032,"mergeCommit":{"message":"[Search]
[Playground] [Bug] Add playground index validation (#201032)\n\nFix bug
when localStorage has invalid index, then playground chat page\r\nopens
with empty
source.","sha":"d99431e51ea976baa69d51d4f7ba30592adecf7e"}}]}]
BACKPORT-->
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Nov 26, 2024
…201032)

Fix bug when localStorage has invalid index, then playground chat page
opens with empty source.
@yansavitski yansavitski deleted the add-playground-index-validation branch November 27, 2024 13:35
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…201032)

Fix bug when localStorage has invalid index, then playground chat page
opens with empty source.
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) release_note:skip Skip the PR/issue when compiling release notes Team:Search v8.16.2 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants