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

[Monitoring] Ensure some data is returned #81375

Conversation

chrisronline
Copy link
Contributor

Fixes #81343

I'm not sure what's going on. Between this and #81200, I wonder if something happened to the underlying $http angular service. Perhaps we need to switch to the Kibana core http service.

To reproduce, simply load the Stack Monitoring UI without any monitoring data and click the button to setup with Metricbeat. It should load the Elasticsearch nodes listing page

@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring (Team:Monitoring)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id before after diff
monitoring 1.1MB 1.1MB +7.0B

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

@jasonrhodes
Copy link
Member

My reaction to this change/fix:

blink

Copy link
Member

@jasonrhodes jasonrhodes left a comment

Choose a reason for hiding this comment

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

If this solves the issue for now, let's merge but keep investigating. 👍

@chrisronline chrisronline merged commit d916f18 into elastic:master Oct 21, 2020
@chrisronline chrisronline deleted the monitoring/ensure_nodes_listing_load_in_setupmode branch October 21, 2020 21:57
chrisronline added a commit to chrisronline/kibana that referenced this pull request Oct 21, 2020
chrisronline added a commit to chrisronline/kibana that referenced this pull request Oct 21, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Oct 22, 2020
* master: (63 commits)
  [KP] Fix Headers timeout issue (elastic#81140)
  [ML] Functional tests - stabilize typing with checks service method (elastic#81338)
  tabify - support docs (elastic#80351)
  [Security Solution][Detections] Look-back time logic fix (elastic#81383)
  [Workplace Search] Add top-level tests for Groups (elastic#81215)
  [Fleet] Fix agent action observable for long polling (elastic#81376)
  [Maps] fix feature tooltip remains open when zoom level change hides layer (elastic#81373)
  skip flaky suite (elastic#78689)
  chore(NA): add spec-to-console and plugin-helpers as devOnly dependencies (elastic#81357)
  Ensure some data is returned (elastic#81375)
  Change dumb-init to tini (elastic#81126)
  [Reporting/Tech Debt] Convert PdfMaker class to TypeScript (elastic#81242)
  Use Storybook Controls instead of Knobs (elastic#80705)
  [junit] make sure that report paths are unique (elastic#81255)
  bump elastic/elasticsearch-js version to 7.10.0-rc1 (elastic#81288)
  run ssl tests on CI (elastic#81320)
  Fix alert defaults (elastic#81207)
  [ML] DF Analytics wizard: ensure user can set mml manually or select to use given estimate (elastic#81078)
  Add UI notifier to indicate secret fields and to remember / reenter values (elastic#80657)
  [Monitoring] Use async/await (elastic#81200)
  ...
@chrisronline
Copy link
Contributor Author

Backport:

7.x: 941af1c
7.10: ba7a314

@chrisronline
Copy link
Contributor Author

After doing some digging, this PR broke this behavior. By changing the callback for the this.data watcher to return nothing if there is no data, this functionality broke. This PR is new for 7.10 so fortunately, this bug was never released.

@jasonrhodes
Copy link
Member

So it looks like we are competing with ourselves a bit here, right? If we want to return early when there is no data, but then also we are adding data: {} in this case, it smells like something is off. Is there a better solution here?

@jasonrhodes
Copy link
Member

For example, inside getPageData could we do something like:

  const { cluster_uuid } = $injector.get('globalState');

  if (!cluster_uuid) {
    // return what you want to return in this case
  }

  // continue with the rest of the getNodes logic

@chrisronline
Copy link
Contributor Author

Yup, definitely better ways of doing this. I opened #81505 to see this through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up with monitoring with metricbeat(security)shows a blank screen when user clicks on it
4 participants