acoustic-carpenter-78188
12/11/2025, 1:09 AMWhat is the heartbeat file?
As long as there is an active browser connection, code-server touches ~/.local/share/code-server/heartbeat once a minute.
If you want to shutdown code-server if there hasn't been an active connection after a predetermined amount of time, you can use the --idle-timeout-seconds flag or set an CODE_SERVER_IDLE_TIMEOUT_SECONDS environment variable.
## How was this patch tested?
Trivial change
import flytekit
from flytekit import ImageSpec
from flytekit.interactive import vscode
new_flytekit = "git+https://github.com/flyteorg/flytekit@fea9b277c63d3cf3f143ac78434afa17df776dfa"
image = ImageSpec(
apt_packages=["git"],
packages=["numpy", new_flytekit],
registry="pingsutw",
)
@flytekit.task(container_image=image)
@vscode
def t1():
print("hello")
@flytekit.workflow
def wf1():
t1()
### Setup process
### Screenshots
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
https://bito.ai#summarystart|
### Summary by Bito
• This pull request introduces an environment variable to set an idle timeout for the code-server, replacing the previous reliance on a heartbeat file.
• The change aims to ensure that code-server pods can shut down gracefully after a specified period of inactivity, addressing issues with pods failing to terminate as expected.
• The implementation is straightforward and follows the recommended approach from the code-server documentation.
• Overall, this update introduces a new environment variable for idle timeout configuration, impacting the code-server module.
flyteorg/flytekitacoustic-carpenter-78188
12/11/2025, 2:31 AM