Part of #343.
Osprey's Pub/Sub publishers build their client eagerly in __init__, so they fail when GCP credentials can't be resolved — breaking the default docker compose up experience and any adopter environment without GCP. Both publisher implementations should instead detect missing credentials and degrade to a noop: log a one-time warning, skip building the client, short-circuit publish()/stop(), and emit a noop metric so the inert state is visible in dashboards.
This issue tracks that work across both worker implementations.
Tasks
Sync worker — PubSubPublisher (#388)
osprey_worker/src/osprey/worker/lib/publisher.py
Async worker — AsyncPubSubPublisher
osprey_async_worker/src/osprey/async_worker/lib/publisher.py (separate class, tied to the experimental asyncio worker #341)
Notes
Part of #343.
Osprey's Pub/Sub publishers build their client eagerly in
__init__, so they fail when GCP credentials can't be resolved — breaking the defaultdocker compose upexperience and any adopter environment without GCP. Both publisher implementations should instead detect missing credentials and degrade to a noop: log a one-time warning, skip building the client, short-circuitpublish()/stop(), and emit a noop metric so the inert state is visible in dashboards.This issue tracks that work across both worker implementations.
Tasks
Sync worker —
PubSubPublisher(#388)osprey_worker/src/osprey/worker/lib/publisher.pygoogle.auth.default()(cached, one probe per process)publish()andstop()in noop modePubSubPublisher.publisher.noopmetric, tagged with project and topicAsync worker —
AsyncPubSubPublisherosprey_async_worker/src/osprey/async_worker/lib/publisher.py(separate class, tied to the experimental asyncio worker #341)publish()and the flush/stop()paths short-circuit cleanly in noop modeNotes
secret_manager.py,bigquery.py,access_audit_log.py) remain tracked under Make Osprey runnable without GCP credentials (tracking) #343 and are out of scope here.