bluesky-social / jetstream

A simplified JSON event stream for AT Proto
MIT License
235 stars 19 forks source link

Can't set `liveness-ttl` flag using `JETSTREAM_LIVENESS_TTL` environment variable #28

Open tom-sherman opened 5 days ago

tom-sherman commented 5 days ago

Version: https://github.com/bluesky-social/jetstream/pkgs/container/jetstream/307057313?tag=sha-2aacb58

Steps to reproduce:

  1. Set JETSTREAM_LIVENESS_TTL=30s in your environment
  2. Run jetstream against an event stream that doesn't send any events (eg. a PDS running locally)

Expected behaviour:

Jetstream shuts down after 30 seconds.

Actual behaviour:

Jetstream shuts down after 15s and logs the message:

no new events in last 15 seconds, shutting down for docker to restart me

Additional context

This appears to be expected behaviour of urfave/cli. The default value used to be able to be overridden by an env var but that was "fixed" in https://github.com/urfave/cli/pull/1528.

tom-sherman commented 5 days ago

Oh, actually maybe it's not a bug with jetstream actually. the option isn't available on the version of jetstream I'm using but it's the latest container that has been published on ghcr.

Is ghcr not up to date?

tom-sherman commented 5 days ago

I changed to sha-0ab10bd (a version published 20 days ago instead of sha-2aacb58 which was published 3 days ago) and it works fine.