-
Notifications
You must be signed in to change notification settings - Fork 484
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
Pass a function that doesn't return anything to FileUpload component #658
Conversation
Thanks for the fix!
Finishing the migration would be great, but difficult to staff. Could there be a unit test to catch this issue? |
there is a linter error in CI
|
Signed-off-by: Ruben Vargas <[email protected]>
af7be54
to
86e7b54
Compare
Codecov Report
@@ Coverage Diff @@
## master #658 +/- ##
==========================================
+ Coverage 94.15% 94.20% +0.05%
==========================================
Files 227 228 +1
Lines 5906 5923 +17
Branches 1484 1489 +5
==========================================
+ Hits 5561 5580 +19
+ Misses 305 304 -1
+ Partials 40 39 -1
Continue to review full report at Codecov.
|
Agree, it is difficult at this point, I can do a unit test for this case, my concern is if there is any other places where this could be a potential problem. Well, for now I think we are fine with a unit test here. |
yeah, but it didn't catch the issue with return value. |
…aegertracing#658) Signed-off-by: Ruben Vargas <[email protected]> Signed-off-by: vvvprabhakar <[email protected]>
…aegertracing#658) Signed-off-by: Ruben Vargas <[email protected]> Signed-off-by: vvvprabhakar <[email protected]>
…aegertracing#658) Signed-off-by: Ruben Vargas <[email protected]> Signed-off-by: vvvprabhakar <[email protected]>
Signed-off-by: Ruben Vargas [email protected]
Which problem is this PR solving?
Short description of the changes
In this PR: https://github.com/jaegertracing/jaeger-ui/pull/622/files a Redux middleware was updated to return the value of
next(..)
in order to preserve the Promises chain, which I think is correct.The problem is that
Upload.Dragger
and our componentFileUploader
expect a function that returns nothing(...)=>void
and theUpload
component which is used byUpload.Dragger
expect a function that returns nothing or a custom request, not a Promise, returning a Promise breaks the underlingUpload
component.Upload.Dragger
(and our componentFileUploader
) has type definition for their parameters and Typescript is suppose to do some type checks here , but the search page was not migrated to TS.Wondering if may be we should do the migration and enforce the types more to prevent future errors like this one. May be in a subsequent PR.