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

[Logs UI] Correctly update the expanded log rate table rows #60306

Merged

Conversation

weltenwort
Copy link
Member

Summary

This ensures that the content of the expanded rows in the log rate table reflect the most recent results.

Fixes #60300

Testing

See #60300 for reproduction of the fixed issue.

@weltenwort weltenwort added release_note:fix v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.7.0 labels Mar 16, 2020
@weltenwort weltenwort self-assigned this Mar 16, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@weltenwort weltenwort changed the title Keep just expanded id as state, compute row content [Logs UI] Correctly update the expanded log rate table rows Mar 16, 2020
@weltenwort weltenwort marked this pull request as ready for review March 16, 2020 22:19
@weltenwort weltenwort requested a review from a team as a code owner March 16, 2020 22:19
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.

Looking at this today, good catch 👍

@jasonrhodes
Copy link
Member

In looking at this, I'm not sure if it's working as expected and I'm just missing something, or if there's a bug.

This is when the date picker is set to "Today" (notice the Mar 18 rows in both expanded sets)
Screen Shot 2020-03-18 at 4 35 15 PM

Then, when switching to "Last 24 hours" (notice the first expanded set changes its rows to Mar 17):
Screen Shot 2020-03-18 at 4 35 32 PM

This happens when I switch back and forth between these date ranges. (Today is March 18 as I am doing this test, so I'm expecting the first image and not the second.)

Looks like "Today" sends a request to log_entry_categories with timeRange: {startTime: 1584504000000, endTime: 1584590399999} and "Last 24 hours" sends that request with timeRange: {startTime: 1584477654684, endTime: 1584564054685}

I'm wondering if this has some kind of time zone related bug?

I'm also getting this in the console:

Warning: Failed prop type: The prop `initialSelectedTab.name` is marked as required in `EuiTabbedContent`, but its value is `undefined`.

@jasonrhodes
Copy link
Member

I suppose it's important to also add: the examples are definitely updating when I update the time range :) 👍

@jasonrhodes
Copy link
Member

@elasticmachine merge upstream

@jasonrhodes jasonrhodes self-assigned this Mar 18, 2020
@weltenwort
Copy link
Member Author

Thanks for the review, @jasonrhodes. This PR changes the log rate tab while your screenshots show the log categories tab.

That aside, could you elaborate in which way these timestamps violate your expectations? Both seem to span 24 hours, with one aligned at your local day boundaries (today) while the other is aligned to your local time (now-24h to now).

The error message about the missing tab property in the datepicker seems to be a bug in EUI, which can be observed everywhere in Kibana and has to be resolved upstream. I'll open an issue or PR there.

@weltenwort
Copy link
Member Author

@elasticmachine merge upstream

@jasonrhodes
Copy link
Member

@weltenwort sorry, I'll check Log Rate and report back.

As for the screenshots, if I have results from today, I'd expect them to show up in "Today" and in "Last 24 hours", and I can't easily explain why they wouldn't.

@weltenwort
Copy link
Member Author

if I have results from today, I'd expect them to show up in "Today" and in "Last 24 hours"

"Last 24 hours" also covers parts of yesterday most of the time, so assuming the time of testing was before 16:49:57 on March 18 the first screenshot seems valid. I guess you're surprised that the five samples are not the newest ones in respect to the time range?

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@jasonrhodes
Copy link
Member

I guess you're surprised that the five samples are not the newest ones in respect to the time range?

Yes, exactly. How are those chosen?

@weltenwort
Copy link
Member Author

right now it's ascending by @timestamp

@jasonrhodes
Copy link
Member

Interesting so it's the earliest ones in the given window. I think I expect the most recent ones but I have no idea if I'm representative there. Anyway that's not part of this PR though. :)

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.

Fix for the log rate tab LGTM.

@weltenwort weltenwort merged commit ae0e350 into elastic:master Mar 19, 2020
@weltenwort weltenwort deleted the logs-ui-fix-log-rate-table-row-update branch March 19, 2020 15:43
weltenwort added a commit to weltenwort/kibana that referenced this pull request Mar 19, 2020
…60306)

This ensures that the content of the expanded rows in the log rate table reflect the most recent results.

Fixes elastic#60300
weltenwort added a commit that referenced this pull request Mar 20, 2020
Backports the following commits to 7.x:
 - [Logs UI] Correctly update the expanded log rate table rows (#60306)
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 20, 2020
* master:
  [ML] Use a new ML endpoint to estimate a model memory (elastic#60376)
  [Logs UI] Correctly update the expanded log rate table rows (elastic#60306)
  fixes drag and drop flakiness (elastic#60625)
  Removing isEmptyState from embeddable input (elastic#60511)
  [Cross Cluster Replication] NP Shim (elastic#60121)
  Clear changes when canceling an edit to an alert (elastic#60518)
  Update workflow syntax (elastic#60626)
  Updating project assigner workflows to v2.0.0 of the action and back to default tokens (elastic#60577)
  migrate saved objects management edition view to react/typescript/eui (elastic#59490)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature release_note:fix Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logs UI] Content of expanded rows in log rate are not updated with new data
4 participants