Skip to content

Conversation

@tklever
Copy link
Contributor

@tklever tklever commented Aug 23, 2020

Which problem is this PR solving?

  • TraceArchive is a type with all optional parameters, this change allows typescript to more helpfully enforce correct object structures.

Short description of the changes

  • Under the previous type definition for TraceArchive the following are examples of types that would have been valid but do not make a ton of sense (or outright break). {}, {isLoading: true, isError: true}, {isError: true, error: undefined}, {isArchived: true, isError: true, isLoading: true}.
  • These new stricter type definitions free developers from testing edge cases of undesired object structure, typescript simply won't build the app.
  • I tested these changes against the additional tests in Adding tests around existing ArchiveNotifier duck #622, if you want to review that first and rebase these changes on top of it, I can and will.

@codecov
Copy link

codecov bot commented Aug 23, 2020

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.14%. Comparing base (874b3f2) to head (2b3b7db).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #623   +/-   ##
=======================================
  Coverage   98.14%   98.14%           
=======================================
  Files         257      257           
  Lines        8077     8079    +2     
  Branches     2036     2114   +78     
=======================================
+ Hits         7927     7929    +2     
  Misses        150      150           

☔ 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.

@github-actions
Copy link

github-actions bot commented Sep 8, 2025

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You may re-open it if you need more time.

@github-actions github-actions bot added the stale label Sep 8, 2025
@yurishkuro yurishkuro requested a review from a team as a code owner September 8, 2025 03:47
@yurishkuro yurishkuro requested review from joe-elliott and removed request for a team September 8, 2025 03:47
@yurishkuro yurishkuro added changelog:refactoring Internal, non-functional code improvements and removed stale labels Sep 8, 2025
@yurishkuro yurishkuro changed the title tighten TraceArchive type to more strictly enforce correct state Tighten TraceArchive type to more strictly enforce correct state Sep 8, 2025
@yurishkuro yurishkuro merged commit 83cdac4 into jaegertracing:main Sep 8, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:refactoring Internal, non-functional code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants