@@ -361,12 +361,28 @@ Then('the storage class of object {string} must stay {string} for {int} seconds'
361361
362362When ( 'i run sorbetctl to retry failed restore for {string} location' ,
363363 { timeout : 10 * 60 * 1000 } , async function ( this : Zenko , location : string ) {
364- const command = `/ctst/sorbetctl forward list failed --trigger-retry --skip-invalid \
365- --limit 10000 \
366- --kafka-dead-letter-topic=${ this . parameters . KafkaDeadLetterQueueTopic } \
364+ const kafkaArgs = `--kafka-dead-letter-topic=${ this . parameters . KafkaDeadLetterQueueTopic } \
367365 --kafka-object-task-topic=${ this . parameters . KafkaObjectTaskTopic } \
368366 --kafka-gc-request-topic=${ this . parameters . KafkaGCRequestTopic } \
369367 --kafka-brokers ${ this . parameters . KafkaHosts } ` ;
368+
369+ // List all DLQ entries for debugging before retrying
370+ const listCommand = `/ctst/sorbetctl forward list failed --keep-entries \
371+ --limit 10000 ${ kafkaArgs } ` ;
372+ try {
373+ this . logger . info ( 'Listing DLQ entries before retry' , { location } ) ;
374+ const listResult = await util . promisify ( exec ) ( listCommand ) ;
375+ this . logger . info ( 'DLQ entries' , {
376+ stdout : listResult . stdout ,
377+ stderr : listResult . stderr ,
378+ } ) ;
379+ } catch ( err ) {
380+ this . logger . error ( 'Failed to list DLQ entries' , { err } ) ;
381+ }
382+
383+ const command = `/ctst/sorbetctl forward list failed --trigger-retry --skip-invalid \
384+ --yes-really-drop=10000 \
385+ --limit 10000 ${ kafkaArgs } ` ;
370386 try {
371387 this . logger . debug ( 'Running command' , { command, location } ) ;
372388 const result = await util . promisify ( exec ) ( command ) ;
0 commit comments