Scramjet Transform Hub (STH) is a runtime supervisor that can run data processing programs called Sequences and manage local resources on any Linux server, Docker on small edge servers, and even large-scale Kubernetes clusters in the cloud or datacenters. It connects to Scramjet Spaces in Scramjet Cloud Platform.
Fix the logging levels on reconnect from the runner
Unhook streams before reconnecting an instance
Why?
Currently a reconnect causes a double call to hookupStreams which pipes multiple streams to the input. This unhooks the streams on reconnect, so there are no extra listeners and we're not causing a refleak.
This only happens when a sequence stream errors out.
Additionally stream connect and reconnect errors are muted while connecting and logging happens only on disconnection.
Reproduce:
Create an instance that sends an error on output (out.emit("error", new Error()))
Observe the chain of reconnects
Review checks:
These aspects need to be checked by the reviewer:
[ ] Verify and confirm operation (please post a screenshot)
What?
Why?
Currently a reconnect causes a double call to
hookupStreams
which pipes multiple streams to the input. This unhooks the streams on reconnect, so there are no extra listeners and we're not causing a refleak.This only happens when a sequence stream errors out.
Additionally stream connect and reconnect errors are muted while connecting and logging happens only on disconnection.
Reproduce:
out.emit("error", new Error())
)Review checks:
These aspects need to be checked by the reviewer: