other quality of life improvements (cleaner exit from watcher script, better logging)
How was this change tested? 🤨
[x] unit tests
[x] run daemon on dev laptop and ctrl+c to exit
[x] deploy to QA
[x] integration test (spec/features/preassembly_speech_to_text_media_spec.rb should suffice, since changes here are limited to speech-to-text code)
[x] queue a job manually using the speech-to-text container's one-off job creation function, with an identifier that isn't an actual druid. this will lead to an error when the done message is processed by the watcher script, because there will be no workflow record server to find when trying to update the status. two more attempts should be made before the job is abandoned. there should be a log message and a honeybadger alert when the job is abandoned.
âš¡ âš If this change has cross service impact, including writes to shared file systems, run integration tests and/or test in [stage|qa] environment, in addition to specs. âš¡
what exit looked before this PR
^C** [Honeybadger] Unable to send error report: API key is missing.
jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/3.2.0/net/protocol.rb:229:in `wait_readable': Interrupt
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/3.2.0/net/protocol.rb:229:in `rbuf_fill'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/3.2.0/net/protocol.rb:199:in `readuntil'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/3.2.0/net/protocol.rb:209:in `readline'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/net-http-0.5.0/lib/net/http/response.rb:158:in `read_status_line'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/net-http-0.5.0/lib/net/http/response.rb:147:in `read_new'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/net-http-0.5.0/lib/net/http.rb:2420:in `block in transport_request'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/net-http-0.5.0/lib/net/http.rb:2411:in `catch'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/net-http-0.5.0/lib/net/http.rb:2411:in `transport_request'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/net-http-0.5.0/lib/net/http.rb:2384:in `request'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/connection_pool.rb:348:in `request'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/handler.rb:80:in `block in transmit'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/handler.rb:134:in `block in session'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/connection_pool.rb:106:in `session_for'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/handler.rb:129:in `session'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/handler.rb:77:in `transmit'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/handler.rb:46:in `block in call'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/handler.rb:206:in `block in span_wrapper'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/aws-sdk-core/telemetry/no_op.rb:29:in `in_span'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/handler.rb:202:in `span_wrapper'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/net_http/handler.rb:45:in `call'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/plugins/content_length.rb:24:in `call'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/seahorse/client/plugins/request_callback.rb:118:in `call'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/aws-sdk-core/json/error_handler.rb:8:in `call'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/aws-sdk-core/plugins/sign.rb:53:in `call'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/aws-sdk-core/plugins/transfer_encoding.rb:27:in `call'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:12:in `call'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/aws-sdk-core/plugins/user_agent.rb:69:in `call'
from jmartin-sul/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.212.0/lib/aws-sdk-core/plugins/retry_errors.rb:365:in `block in call'
...lots more...
what it looks like after this PR:
^CI, [2024-11-14T19:24:06.311182 #36929] INFO -- speech_to_text_watcher: Received signal or interrupt, exiting speech_to_text_watcher
Why was this change made? 🤔
How was this change tested? 🤨
spec/features/preassembly_speech_to_text_media_spec.rb
should suffice, since changes here are limited to speech-to-text code)âš¡ âš If this change has cross service impact, including writes to shared file systems, run integration tests and/or test in [stage|qa] environment, in addition to specs. âš¡
what exit looked before this PR
what it looks like after this PR: