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

[Security Solution][RAC] Fixes updatedAt loading bug #111010

Merged
merged 6 commits into from
Sep 7, 2021

Conversation

dplumlee
Copy link
Contributor

@dplumlee dplumlee commented Sep 2, 2021

Summary

Addresses #110337

Fixes the "Updated at" field on the Alerts and Rule details page to sync with the timeline data. Also makes the fallback value to no longer be UTC 0, instead defaulting to Date.now()

Videos

Coming soon

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@dplumlee dplumlee added bug Fixes for quality problems that affect the customer experience v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team Theme: rac label obsolete v7.15.0 v7.16.0 labels Sep 2, 2021
@dplumlee dplumlee self-assigned this Sep 2, 2021
@dplumlee dplumlee requested a review from a team as a code owner September 2, 2021 16:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@dplumlee dplumlee requested review from michaelolo24 and a team September 2, 2021 16:21
@dplumlee
Copy link
Contributor Author

dplumlee commented Sep 2, 2021

@elasticmachine merge upstream

@dplumlee dplumlee added the auto-backport Deprecated - use backport:version if exact versions are needed label Sep 2, 2021
@@ -331,8 +336,8 @@ const DetectionEnginePageComponent: React.FC<DetectionEngineComponentProps> = ({
</EuiFlexItem>
<EuiFlexItem grow={false}>
{timelinesUi.getLastUpdated({
updatedAt: updatedAt || 0,
showUpdating: loading,
updatedAt: updatedAt || Date.now(),
Copy link
Contributor

@michaelolo24 michaelolo24 Sep 3, 2021

Choose a reason for hiding this comment

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

Tested, and looks good. I wonder if we should do something here like this so it doesn't even show till we have the updatedAt?

{updatedAt && timelinesUi.getLastUpdated({
  updatedAt,
  showUpdating,
})}

It ends up looking like:

withChanges2.mp4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah we could go with that instead, cover that little gap in the little

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes, looks good, just a suggestion about hiding/showing things, but that may be better left to design to make a decision about what they prefer?

Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

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

LGTM,

  • Checked out the branch
  • Ran the branch and compared against a system without the changes to validate the bug and the fix.
  • Looked over the code and searched to see if we had any other strings of the form updatedAt || 0 but did not see it so I think all instances were fixed.
  • Turned on rectangle painting within Chrome and validated that only the label is changed when the timer updates.
  • Checked the network panel to see if additional network calls were being made or something else (for fun). Did not see anything.
  • 👍

@dplumlee dplumlee force-pushed the updated-at-load-bug branch from 0b1a4b1 to 9dfe5fa Compare September 3, 2021 18:23
@dplumlee dplumlee enabled auto-merge (squash) September 3, 2021 18:52
@dplumlee
Copy link
Contributor Author

dplumlee commented Sep 3, 2021

@elasticmachine merge upstream

@peluja1012
Copy link
Contributor

@elasticmachine merge upstream

@michaelolo24
Copy link
Contributor

@elasticmachine merge upstream

@dplumlee
Copy link
Contributor Author

dplumlee commented Sep 7, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
securitySolution 6.5MB 6.5MB +714.0B

History

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

cc @dplumlee

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.15
7.x

The backport PRs will be merged automatically after passing CI.

@dplumlee dplumlee deleted the updated-at-load-bug branch September 7, 2021 19:23
kibanamachine added a commit that referenced this pull request Sep 7, 2021
Co-authored-by: Davis Plumlee <56367316+dplumlee@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Sep 7, 2021
Co-authored-by: Davis Plumlee <56367316+dplumlee@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 8, 2021
…-link-to-kibana-app

* 'master' of github.com:elastic/kibana: (61 commits)
  [Logs UI] Fix alert previews for thresholds of `0` (elastic#111150)
  [Archive Migration][Partial] discover apps-discover (elastic#110437)
  [APM] Set start date of APM ML job to -4 weeks (elastic#111375)
  [ML] APM Latency Correlations: Code consolidation. (elastic#110790)
  [Discover] Fix indices permission for multiline test (elastic#111284)
  [Detection Rules] Add 7.15 rules (elastic#111464)
  [Security Solution][Endpoint][Host Isolation] Hide isolate host option in alert details rather than disabling (elastic#111064)
  React version of angular license view (elastic#111317)
  [APM] Fix link in readme (elastic#111362)
  [Security Solution] add agent field to generator (elastic#111428)
  [Dashboard] Retain Tags on Quicksave (elastic#111015)
  Reorder App Search ingestion methods (elastic#111361)
  Port performance docs to new docs system. (elastic#111063)
  [Security Solution][RAC] Fixes updatedAt loading bug (elastic#111010)
  [sample data] update web log geo.src field to match country code of geo.coordinates (elastic#110885)
  [Security solution] [Endpoint] Fix bad artifact migration (elastic#111294)
  Fix copy typo. (elastic#111203)
  [build] Remove empty optimize directory (elastic#111393)
  [Maps] fix term join not updating when editing right field (elastic#111030)
  [Fleet] Set default settings in component template instead of the index template (elastic#111197)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap
#	x-pack/plugins/reporting/public/management/report_listing.test.tsx
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Sep 8, 2021
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 bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team Theme: rac label obsolete v7.15.0 v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants