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

Exit mergeChildrenCriticalPath early for an empty critical path #1974

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

maxgaponov
Copy link
Contributor

@maxgaponov maxgaponov commented Nov 13, 2023

Which problem is this PR solving?

Description of the changes

  • mergeChildrenCriticalPath shortcuts for an empty critical path

How was this change tested?

  • Existing tests

Checklist

Signed-off-by: Maksim Gaponov <gaponovmaxev@gmail.com>
@maxgaponov maxgaponov requested a review from a team as a code owner November 13, 2023 17:47
@maxgaponov maxgaponov requested review from pavolloffay and removed request for a team November 13, 2023 17:47
yurishkuro
yurishkuro previously approved these changes Nov 13, 2023
@yurishkuro yurishkuro changed the title mergeChildrenCriticalPath shortcuts for an empty critical path Exit mergeChildrenCriticalPath early for an empty critical path Nov 13, 2023
@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label Nov 13, 2023
@yurishkuro yurishkuro enabled auto-merge (squash) November 13, 2023 17:51
@@ -163,6 +163,9 @@ function mergeChildrenCriticalPath(
spanID: string,
criticalPath: criticalPathSection[]
): criticalPathSection[] {
if (criticalPath.length == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

linter complains
166:27 error Expected '===' and instead saw '=='

Copy link
Member

Choose a reason for hiding this comment

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

couldn't this be just if (!criticalPath) ?

Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...ePage/TraceTimelineViewer/VirtualizedTraceView.tsx 97.12% <50.00%> (-0.55%) ⬇️

📢 Thoughts on this report? Let us know!

Signed-off-by: Maksim Gaponov <gaponovmaxev@gmail.com>
auto-merge was automatically disabled November 13, 2023 18:07

Head branch was pushed to by a user without write access

@maxgaponov
Copy link
Contributor Author

Do we need a test here to satisfy codecov?

@yurishkuro
Copy link
Member

tests are always welcome, but from the outside of this function it seems it would be impossible to distinguish, since fully executing the logic still returns the same [], just slower.

@yurishkuro yurishkuro merged commit 7d9a325 into jaegertracing:main Nov 13, 2023
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants