-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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: corrected the disconnection behavior to get stream logs Close #1… #17681
fix: corrected the disconnection behavior to get stream logs Close #1… #17681
Conversation
Changed Packages
|
Uffizzi Preview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
A minor note/question regarding the retry that is forever now if I read the code correctly.
Would it be terrible to add some tests to this hook/functionality to gain some confidence for further refactors?
Would love for @benjdlambert to take a look at this as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
A minor note/question regarding the retry that is forever now if I read the code correctly.
Would it be terrible to add some tests to this hook/functionality to gain some confidence for further refactors?
Would love for @benjdlambert to take a look at this as well.
// details here https://github.com/backstage/backstage/issues/15002 | ||
|
||
if (!error.message) { | ||
error.message = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly what is the error type at this point and why does it not have a message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm - I wonder if these are just browser errors and are not available in javascript though. If you stringify the error that you get in the useEventStream
and log it what does it look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an event from the EventSource, so just generic information 🤔
b5c0dc6
to
2015c76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok let's go with this
We could really do with tests for this too, but you don't have to do that in this PR. |
Please make sure to run prettier for the build to pass :) |
2015c76
to
4b39337
Compare
Fixed @jhaals, sorry for this taking so long @benjdlambert I didn't find a test for the useEventStream hook, Do you expect a test for the whole file or a test in another place? |
I think it make sense to add a new test for the |
@angeliski if you rebase this PR against master the build should go green 🤞 |
…ckstage#15002 Signed-off-by: Rogerio Angeliski <angeliski@hotmail.com>
4b39337
to
84a5c77
Compare
Our e2e's are b0rked right now because of another octokit issue. |
Thank you for contributing to Backstage! The changes in this pull request will be part of the |
But merged this anyways 🙏 Thanks @angeliski |
Hey, I just made a Pull Request!
Hey team, I put a fix for #15002
The problem is described at the issue but the basic is:
We receive a disconnection (internet issues) and don't get any feedback (or update) after that. So I did two things:
We cannot connect at the moment, trying again in some seconds... Retrying (3/3 retries)
Failed to fetch
messageI tried to change the error behavior from the observable (resulting in the subscriber disconnection). Still, I got a very messy code, so this is a simple enough solution.
✔️ Checklist
Signed-off-by
line in the message. (more info)