Skip to content

Releases: replicate/cog-runtime

v0.3.4

17 Sep 20:02
v0.3.4
078c77f

Choose a tag to compare

Release v0.3.4 with slot release fix

v0.3.3

17 Sep 16:28
5d32bf9

Choose a tag to compare

v0.3.3

v0.3.2

16 Sep 21:23
1384119

Choose a tag to compare

v0.3.2

v0.3.1

16 Sep 17:06
v0.3.1
1e3ff7f

Choose a tag to compare

v0.3.1 of cog-runtime.

v0.2.0-beta3

04 Sep 23:43
575d218

Choose a tag to compare

feat: cleanup timeout for process termination (#207)

Implement configurable cleanup timeout to control how long the system waits
for process cleanup verification before triggering forced shutdown. This
replaces the hardcoded 10-second timeout with a user-configurable value.

Configuration:
- Add --cleanup-timeout CLI flag (default: 10s, env: COG_CLEANUP_TIMEOUT)
- Flow: CLI → Config → Runner for proper field injection

Implementation changes:
- Replace hardcoded timeout with context.WithTimeout() pattern
- Improve check interval from 100ms to 10ms for more responsive detection
- Add injectable verifyFn field to Runner for comprehensive testing
- Update terminology from "ungraceful shutdown" to "forced shutdown"

Testing improvements:
- Migrate time-dependent tests to Go 1.25 synctest for deterministic execution
- Add comprehensive test coverage for timeout scenarios and multiple ForceKill calls
- Use safe high PID values (9999999) and proper mocking to prevent real process operations
- Configure linter to handle synctest patterns correctly

This enables users to customize cleanup wait times based on their specific
workload requirements while maintaining safe defaults.

* Address leaking coglets from test

The test harness now properly cleans up orphaned coglet processes when interrupted:

Key Features:
- Cross-platform compatibility: Works on both macOS (Darwin) and Linux
- Robust process discovery: Uses pgrep -f coglet as primary method, falls back to ps with platform-specific flags
- Safe process killing: Validates we can signal processes before attempting to kill them
- Process group cleanup: Kills both process groups and individual processes
- Safety measures: Never kills ourselves, our parent, or PID 1
- Signal handling: Responds to both SIGINT (ctrl+c) and SIGTERM

Implementation Details:
- killAllChildProcesses() finds and kills coglet processes during cleanup
- findCogletProcesses() tries pgrep first, falls back to ps
- Platform-specific ps flags: -ax on macOS, -e on Linux
- Process ownership validation through signal testing before killing
- Integrated into existing TestMain signal handler

---------
Co-Authored-By: Michael Dwan <m@dwan.io>
Co-authored-by: Morgan Fainberg <code@tempusfrang.it>

v0.2.0-beta2

29 Aug 18:06
cd41c33

Choose a tag to compare

Implement type checker compatible Input() function (#196)

Convert Input from dataclass to function with overloads following Pydantic's
pattern. Maintains exact same syntax for developers while providing full
type checker compatibility.

v0.2.0-beta1

27 Aug 21:08
v0.2.0-beta1
5a780b2

Choose a tag to compare

Release v0.2.0-beta1 with a rework to the BaseModel

v0.1.0-beta13

26 Aug 19:04
add3a36

Choose a tag to compare

Fix pyodide dataclass loading issue + tests! (#194)

* import correct `is_dataclass` function

* add tests to verify the pyodide fix actually fixed it

v0.1.0-beta12

26 Aug 18:09
d6af255

Choose a tag to compare

Add pyodide specific BaseModel (#193)

* pyodide has a curious issue where it does not
recognise BaseModel as a dataclass
* It is defined as a dataclass through its use of
__new__ which standard python accepts
* To get around this, make a new base model for
pyodide which uses __init_subclass__
* Decide which implementation to use depending on
whether we are in pyodide

v0.1.0-beta11

25 Aug 21:10
v0.1.0-beta11
cfd6bff

Choose a tag to compare

Release fixes for structured output