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

[Synthetics] Apply faster backoff for non-test-now screenshot results #152874

Merged

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Mar 7, 2023

Summary

Resolves #152754.

It was noted in #152754 that we're getting some negative side effects from the exponential backoff we added to the getter for journey screenshots. When a screenshot is legitimately not available for an older journey (as opposed to not yet fully indexed for a fresh journey), the backoff will cause the screenshot never to render.

Testing

Follow a flow similar to what's illustrated in the GIF below.

  1. Create a monitor with some screenshots that show up.
  2. Delete the screenshot data stream. A good way is to use the Index Management > Data Streams view in Kibana.
  3. Refresh your monitor's detail page when new photos are coming in. It should give up on finding the images very fast, and as they aren't there, you should see the missing image placeholder.
  4. Start creating a new monitor. Make it have multiple steps.
  5. Ensure that you aren't seeing any "infinite" loading states across the screenshot UIs.

20230308110103

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@justinkambic justinkambic added bug Fixes for quality problems that affect the customer experience Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability release_note:skip Skip the PR/issue when compiling release notes v8.7.0 labels Mar 7, 2023
@justinkambic justinkambic self-assigned this Mar 7, 2023
@dominiqueclarke dominiqueclarke self-requested a review March 8, 2023 14:45
Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

LGTM. Screenshots are now working as expected both in test now/run once and on monitor details page, test run details page, and step details page.

@justinkambic justinkambic force-pushed the 152754/update-exponential-backoff-usage branch from 645b0d2 to c1fec9a Compare March 8, 2023 20:49
@justinkambic justinkambic marked this pull request as ready for review March 8, 2023 20:49
@justinkambic justinkambic requested a review from a team as a code owner March 8, 2023 20:49
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@justinkambic justinkambic force-pushed the 152754/update-exponential-backoff-usage branch from c1fec9a to 0805ad0 Compare March 9, 2023 13:40
@dominiqueclarke dominiqueclarke self-requested a review March 9, 2023 14:45
@justinkambic justinkambic force-pushed the 152754/update-exponential-backoff-usage branch from 0805ad0 to 3d2bb9e Compare March 9, 2023 17:36
@justinkambic justinkambic force-pushed the 152754/update-exponential-backoff-usage branch from 0bcae4d to 8b29aec Compare March 16, 2023 20:49
Comment on lines +67 to +75
<EuiSkeletonRectangle
data-test-subj="stepScreenshotPlaceholderLoading"
isLoading={isLoading}
height={height}
width={width}
>
{/* `children` is required by this component, even though we'll replace it. */}
<span />
</EuiSkeletonRectangle>
Copy link
Contributor

Choose a reason for hiding this comment

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

you can't do this for now. since this needs to backported. in 8.7 this doesn't exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not intended for 8.7 anymore 😃

@paulb-elastic
Copy link
Contributor

Moving over to 8.8

@justinkambic justinkambic force-pushed the 152754/update-exponential-backoff-usage branch 2 times, most recently from 814a81d to f75443c Compare March 23, 2023 20:11
@justinkambic justinkambic force-pushed the 152754/update-exponential-backoff-usage branch from 59f2502 to e53a554 Compare March 28, 2023 16:05
@justinkambic justinkambic force-pushed the 152754/update-exponential-backoff-usage branch from 29da0a1 to 42b891a Compare March 28, 2023 18:08
Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

LGTM!

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

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
synthetics 1.2MB 1.2MB +375.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 432 435 +3

Total ESLint disabled count

id before after diff
securitySolution 512 515 +3

History

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

cc @justinkambic

@justinkambic justinkambic merged commit 5af2fd4 into elastic:main Apr 18, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Synthetics] Monitor details - Failed tests - Screenshots do not appear to render
7 participants