Skip to content

Commit 1fc4119

Browse files
log dlq values
1 parent 2282667 commit 1fc4119

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

tests/ctst/steps/azureArchive.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,12 +361,28 @@ Then('the storage class of object {string} must stay {string} for {int} seconds'
361361

362362
When('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

Comments
 (0)