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

[cli-dev-mode] get values from completed state subjects #107428

Merged
merged 2 commits into from
Aug 3, 2021

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Aug 2, 2021

Fixes #107358

When running yarn start --no-watch the optimizer completes its isReady$() observable after the optimizer is done running and won't run again. This breaks the firstAllTrue() helper that is trying to determine the point where all the BehaviorSubject<true>s have a current value of true because completed behavior subjects don't produce any values, they return Rx.EMPTY.

To fix this we check to see if the subject .isStopped, and return a Rx.of(source.getValue()) instead, which provides the current value and then completes, allowing Rx.combineLatest() to do its job.

Additionally, this PR throws an error if a similar condition is detected in the future to prevent the red-herring where the CLI logged Kibana server is not ready so requests have been paused even though that subject's value was true.

@spalger spalger added Team:Operations Team label for Operations Team v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.14.0 v7.15.0 labels Aug 2, 2021
@spalger
Copy link
Contributor Author

spalger commented Aug 2, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@spalger spalger marked this pull request as ready for review August 2, 2021 21:13
@spalger spalger requested a review from a team as a code owner August 2, 2021 21:13
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@spalger spalger added the auto-backport Deprecated - use backport:version if exact versions are needed label Aug 3, 2021
@spalger spalger merged commit 3d8a2cf into elastic:master Aug 3, 2021
@spalger spalger deleted the fix/dev-with-no-watch branch August 3, 2021 15:37
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 3, 2021
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 3, 2021
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.14
7.x

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Aug 3, 2021
…07544)

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Aug 3, 2021
…07545)

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
streamich pushed a commit to vadimkibana/kibana that referenced this pull request Aug 8, 2021
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.14.0 v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The --no-watch flag doesn't work as expected
4 participants