[Synthetics] Exp view reload state on missing data#152286
[Synthetics] Exp view reload state on missing data#152286shahzad31 merged 9 commits intoelastic:mainfrom
Conversation
|
@shahzad31 The changes look good, but I'm curious about the problem you're trying to solve. Is it common that someone is looking at this view as data is loaded? I'm wondering if this is something I should be supporting in the data views api. |
@mattkime yes so essentially when user adds monitor via ui, we wait for the data being loaded and when monitors start populating data. we refresh silently and show the data at it comes. |
|
Pinging @elastic/uptime (Team:uptime) |
| return await this.createAndSavedDataView(app, appIndices); | ||
| } | ||
| if (e instanceof DataViewMissingIndices) { | ||
| this.dataViews.clearInstanceCache(); |
There was a problem hiding this comment.
Instead of clearing the cache you could refresh the field list for a given data view - dataViews.refreshFields( dataView)
There was a problem hiding this comment.
that sounds better. let me try that.
There was a problem hiding this comment.
actually that won't work here because in this case we don't know if the it has already tried fetching or not.
So we clear cache, and when the next refersh happens. it won't reuse the cache.
There was a problem hiding this comment.
Can you pass the data view id to clearInstanceCache?
Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Public APIs missing comments
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
awahab07
left a comment
There was a problem hiding this comment.
LGTM.
Tested and works as described.
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com> (cherry picked from commit 525638d)
…152616) # Backport This will backport the following commits from `main` to `8.7`: - [[Synthetics] Exp view reload state on missing data (#152286)](#152286) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2023-03-02T19:33:56Z","message":"[Synthetics] Exp view reload state on missing data (#152286)\n\nCo-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>","sha":"525638d5e73e27bbf3d9f34ec8b0649930c964ec","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:uptime","release_note:skip","auto-backport","ci:cloud-deploy","v8.7.0","v8.8.0"],"number":152286,"url":"https://github.com/elastic/kibana/pull/152286","mergeCommit":{"message":"[Synthetics] Exp view reload state on missing data (#152286)\n\nCo-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>","sha":"525638d5e73e27bbf3d9f34ec8b0649930c964ec"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152286","number":152286,"mergeCommit":{"message":"[Synthetics] Exp view reload state on missing data (#152286)\n\nCo-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>","sha":"525638d5e73e27bbf3d9f34ec8b0649930c964ec"}}]}] BACKPORT-->
Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>
Summary
Exp view reload state on missing data
When there is no data present , earlier it wasn't loading the state auto. this fix will make sure to retry for loading dataview in case of failure.
On auto refresh or user refresh, it will update the state to resolve it. if data is present by the time.
