-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Infra UI] Fix live tailing with the graphql api #22008
[Infra UI] Fix live tailing with the graphql api #22008
Conversation
💔 Build Failed |
c3ca6d5
to
98b6797
Compare
💔 Build Failed |
98b6797
to
448573b
Compare
💔 Build Failed |
jenkins, test this |
💔 Build Failed |
448573b
to
ee8b70d
Compare
💔 Build Failed |
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.
I tested this by starting, stopping, and restarting live streaming on several logs. I could trigger Maximum call stack size exceeded
errors but not consistently.
Stack traces from the console:
and from the error page:
Uncaught RangeError: Maximum call stack size exceeded (:1)
Version: 7.0.0-alpha1
Build: 9007199254740991
Error: Uncaught RangeError: Maximum call stack size exceeded (:1)
at window.onerror (http://localhost:5601/bundles/commons.bundle.js:199111:32)
at Object.invokeGuardedCallbackDev (http://localhost:5601/bundles/commons.bundle.js:211853:16)
at Object.invokeGuardedCallback (http://localhost:5601/bundles/commons.bundle.js:211902:29)
at Object.invokeGuardedCallbackAndCatchFirstError (http://localhost:5601/bundles/commons.bundle.js:211916:43)
at executeDispatch (http://localhost:5601/bundles/commons.bundle.js:212181:19)
at executeDispatchesInOrder (http://localhost:5601/bundles/commons.bundle.js:212203:5)
at executeDispatchesAndRelease (http://localhost:5601/bundles/commons.bundle.js:212301:5)
at executeDispatchesAndReleaseTopLevel (http://localhost:5601/bundles/commons.bundle.js:212312:10)
at forEachAccumulated (http://localhost:5601/bundles/commons.bundle.js:212282:8)
at runEventsInBatch (http://localhost:5601/bundles/commons.bundle.js:212443:5)
at runExtractedEventsInBatch (http://localhost:5601/bundles/commons.bundle.js:212452:3)
at handleTopLevel (http://localhost:5601/bundles/commons.bundle.js:215916:5)
at batchedUpdates (http://localhost:5601/bundles/commons.bundle.js:224252:14)
at batchedUpdates (http://localhost:5601/bundles/commons.bundle.js:213654:12)
at dispatchEvent (http://localhost:5601/bundles/commons.bundle.js:215997:5)
at interactiveUpdates (http://localhost:5601/bundles/commons.bundle.js:224307:14)
Uncaught RangeError: Maximum call stack size exceeded (http://localhost:5601/bundles/commons.bundle.js:211955)
Version: 7.0.0-alpha1
Build: 9007199254740991
Error: Uncaught RangeError: Maximum call stack size exceeded (http://localhost:5601/bundles/commons.bundle.js:211955)
at window.onerror (http://localhost:5601/bundles/commons.bundle.js:199111:32)
I was looking at the logs from demo-stack-apache-01
when this happened but can't immediately reproduce.
I also saw those in the browser console, but also not consistently:
warning.js:33 Warning: This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the method `relatedTarget` on a released/nullified synthetic event. This is a no-op function. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.
(They appeared for several (all?) properties on the synthetic event, I only pasted one above.)
Are these known problems?
I came across that too, but it only happened to me with the redux devtools extension active. Something about the way it hooks into the store causes things to go wrong. Does the problem occur for you without the devtools active? |
No, I couldn't reproduce without redux devtools active either. |
Due to the way it was passed to `onClick`, the `stopAutoReload` action creator was passed a React synthetic event. This lead to problems in the redux-devtools-extension, which could not deal with that kind of payload.
@skh I found the reason for the devtools problem and fixed it (an accidental event object passed to the |
💔 Build Failed |
Looks good, I can't reproduce the error anymore! |
Rename slice
target
tologPosition
The slice name
target
was seriously lacking in the desciptiveness department so I renamed it tologPosition
. It contains the desired log position (as selected by the datepicker) as well as the reported log position. The polling state for "live streaming" (see below) is also managed by this slice.Live streaming
This changes the live streaming functionality to poll the log entry and summary graphql endpoints. It is started and stopped using the
startAutoReload
andstopAutoReload
action creators of thelogPosition
slice. These are used by the streaming toggle button besides the date picker to toggle a 5s polling interval:idle
streaming
While streaming is enabled, the log text jumps to the bottom and a loading indicator is displayed, which contains the time since the last polling cycle to indicate the age of the currently displayed data.