Skip to content

Commit

Permalink
Fix failed prebuild reruns (gitpod-io#19472)
Browse files Browse the repository at this point in the history
* Fix failed prebuild reruns

* Clean up effect deps

* Dispose of hanging streams

Co-authored-by: mustard <[email protected]>

---------

Co-authored-by: mustard <[email protected]>
  • Loading branch information
filiptronicek and mustard-mh authored Feb 27, 2024
1 parent af0213b commit 6638c5d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,15 @@ export const PrebuildDetailPage: FC = () => {
const triggeredString = useMemo(() => formatDate(triggeredDate), [triggeredDate]);

useEffect(() => {
watchPrebuild(prebuildId, (prebuild) => {
setLogNotFound(false);
const disposable = watchPrebuild(prebuildId, (prebuild) => {
setCurrentPrebuild(prebuild);
});
}, [prebuildId, setCurrentPrebuild]);

return () => {
disposable.dispose();
};
}, [prebuildId]);

useEffect(() => {
logEmitter.on("error", (err: Error) => {
Expand Down

0 comments on commit 6638c5d

Please sign in to comment.