Skip to content

Conversation

mdwyer6
Copy link
Contributor

@mdwyer6 mdwyer6 commented May 3, 2025

Which problem is this PR solving?

#2715

Description of the changes

  • Removes unneeded useEffect hook and simplifies logic
  • Converts DependencyGraph/index.jsx to TS because above change had moved typed functions to an untyped file

How was this change tested?

  • Generated dependencies locally with HotRod and validated visually + logged render count to verify DAG component no longer double renders
  • Passes existing tests (some unit tests were updated)

Checklist

@mdwyer6 mdwyer6 requested a review from a team as a code owner May 3, 2025 02:53
@mdwyer6 mdwyer6 requested review from joe-elliott and removed request for a team May 3, 2025 02:53
@mdwyer6 mdwyer6 changed the title Depdag render Fix DependencyGraph dag extra render May 3, 2025
wrapper.instance().handleMatchCountChange(matchCount);
expect(wrapper.state('matchCount')).toBe(matchCount);
});
it('passes computed match count to DAGOptions based on uiFind and dependencies', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted a few tests that no longer made sense after these changes and replaced with this new test

Copy link

codecov bot commented May 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.84%. Comparing base (2683d98) to head (794554c).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2749      +/-   ##
==========================================
- Coverage   96.86%   96.84%   -0.03%     
==========================================
  Files         256      256              
  Lines        7951     7951              
  Branches     2001     2079      +78     
==========================================
- Hits         7702     7700       -2     
- Misses        249      250       +1     
- Partials        0        1       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yurishkuro
Copy link
Member

@hari45678 please review

Copy link
Contributor

Choose a reason for hiding this comment

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

Great work migrating this file to typescript

@hari45678
Copy link
Contributor

The new changes doesn't seem to break any previous functionality

@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label May 4, 2025
@yurishkuro
Copy link
Member

I merged main hoping it will help with coverage, but it didn't. Are the new tsx tests actually running? I didn't find them by name in the CI run log.

@hari45678
Copy link
Contributor

hari45678 commented May 5, 2025

Its weird actually because it shows locally. New tsx tests are indeed running

Locally it shows:
image

Number of tests passed in CI
image

And locally
image

@hari45678
Copy link
Contributor

In CI also
image

@yurishkuro
Copy link
Member

my bad, I see it in CI too

PASS  src/components/DependencyGraph/index.test.js

but then it needs to have more test to increase code coverage, it went down.

@hari45678
Copy link
Contributor

Correct. @mdwyer6 PTAL

@mdwyer6 mdwyer6 requested a review from hari45678 May 7, 2025 22:53
@mdwyer6
Copy link
Contributor Author

mdwyer6 commented May 14, 2025

@hari45678 I've added code coverage

@yurishkuro yurishkuro added this pull request to the merge queue May 17, 2025
Merged via the queue into jaegertracing:main with commit d31f177 May 17, 2025
9 checks passed
vishvamsinh28 pushed a commit to vishvamsinh28/jaeger-ui that referenced this pull request May 19, 2025
## Which problem is this PR solving?
jaegertracing#2715

## Description of the changes
- Removes unneeded useEffect hook and simplifies logic
- Converts DependencyGraph/index.jsx to TS because above change had
moved typed functions to an untyped file

## How was this change tested?
- Generated dependencies locally with HotRod and validated visually +
logged render count to verify DAG component no longer double renders
- Passes existing tests (some unit tests were updated)

## Checklist
- [X] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [X] I have signed all commits
- [X] I have added unit tests for the new functionality
- [X] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Michael Dwyer <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
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.

3 participants