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

fix locally broken unit tests #149811

Merged
merged 4 commits into from
Jan 30, 2023
Merged

Conversation

achyutjhunjhunwala
Copy link
Contributor

@achyutjhunjhunwala achyutjhunjhunwala commented Jan 30, 2023

Summary

Due to an old Pull request, 2 of the Unit Tests started to fail locally. Somehow they won't fail on the CI which made them tough to identify initially.

This PR fixes those broken unit tests.

@achyutjhunjhunwala achyutjhunjhunwala self-assigned this Jan 30, 2023
@achyutjhunjhunwala achyutjhunjhunwala requested a review from a team as a code owner January 30, 2023 10:16
@botelastic botelastic bot added the Team:APM - DEPRECATED Use Team:obs-ux-infra_services. label Jan 30, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

@achyutjhunjhunwala achyutjhunjhunwala added the release_note:skip Skip the PR/issue when compiling release notes label Jan 30, 2023
Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM, but:
It actually took me some time to figure out why a key property is needed here since there's no loop to create this annotation. But I see that this is needed because we wrapped the result of getAnnotations in []. Maybe you cold remove this [getAnnotations()] from here https://github.com/elastic/kibana/blob/main/x-pack/plugins/apm/public/components/shared/charts/timeseries_chart_with_context.tsx#L108, and return an array from the getAnnotations itself. You could also convert to a standard function instead of an arrow function, this will avoid the TimeseriesChart to render unnecessarily because of these two things.

@achyutjhunjhunwala
Copy link
Contributor Author

achyutjhunjhunwala commented Jan 30, 2023

@cauemarcondes Great catch on the performance improvement part. Updated the code

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

Nice job! Were you able to repro locally, or how did you figure this out?

@sorenlouv
Copy link
Member

@cauemarcondes Nice perf improvement 👍

@achyutjhunjhunwala achyutjhunjhunwala enabled auto-merge (squash) January 30, 2023 21:06
@kibana-ci
Copy link
Collaborator

💚 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
apm 3.3MB 3.3MB +22.0B

History

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

cc @achyutjhunjhunwala

@achyutjhunjhunwala achyutjhunjhunwala merged commit 214eb97 into main Jan 30, 2023
@achyutjhunjhunwala achyutjhunjhunwala deleted the locally_broken_unit_tests branch January 30, 2023 22:09
@kibanamachine kibanamachine added v8.7.0 backport:skip This commit does not require backporting labels Jan 30, 2023
kqualters-elastic pushed a commit to kqualters-elastic/kibana that referenced this pull request Feb 6, 2023
## Summary

Due to an old Pull request, 2 of the Unit Tests started to fail locally.
Somehow they won't fail on the CI which made them tough to identify
initially.

This PR fixes those broken unit tests.
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 release_note:skip Skip the PR/issue when compiling release notes Team:APM - DEPRECATED Use Team:obs-ux-infra_services. v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants