Skip to content

Commit 8c16e6a

Browse files
test(e2e): cover SubmitQueue DLQ reconciliation (#660)
## Summary Intent: - Ensure an unexpected pipeline failure converges through the real dead-letter path instead of stranding a request. Changes: - Drive the dedicated failing conflict analyzer through dependency-analysis dead-lettering. - Verify the DLQ reconciler fails the batch and request and exposes failure context through request history. --- <sub>Generated by the 🪄 [pr-create](https://sg.uberinternal.com/code.uber.internal/uber-code/devexp-agent-marketplace/-/blob/claude-code/plugins/dev/uber-dev/skills/pr-create/SKILL.md) skill in devexp-agent-marketplace</sub> ## Test Plan ## Issues Co-authored-by: sergeyb <sergeyb@uber.com>
1 parent d3d9df7 commit 8c16e6a

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

test/e2e/submitqueue/suite_test.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,45 @@ func (s *E2EIntegrationSuite) TestPingOrchestrator() {
213213
s.log.Logf("Orchestrator ping: %s", resp.Message)
214214
}
215215

216+
// TestConflictAnalyzerFailure_ReconcilesFromDLQ drives an unexpected extension
217+
// failure through the real queue's dead-letter path. The dedicated queue uses
218+
// an analyzer that always errors, so dependency analysis rejects its batch
219+
// message instead of producing a normal terminal outcome. The DLQ reconciler
220+
// must fail both the batch and its request, and preserve the queue's failure
221+
// context on the public request history.
222+
func (s *E2EIntegrationSuite) TestConflictAnalyzerFailure_ReconcilesFromDLQ() {
223+
t := s.T()
224+
const (
225+
queue = "e2e-conflict-error-queue"
226+
batchID = queue + "/batch/1"
227+
)
228+
229+
req := s.land(queue, "github://github.example.com/uber/e2e-conflict-error/pull/1/abcdef0123456789abcdef0123456789abcdef01")
230+
231+
assert.Equal(t, entity.RequestStatusError, s.awaitTerminal(req))
232+
assert.Equal(t, entity.RequestStateError, s.terminalState(req))
233+
assert.Equal(t, entity.BatchStateFailed, s.batchState(queue, batchID))
234+
235+
history, err := s.gatewayClient.GetRequestHistoryByID(s.ctx, &gatewaypb.GetRequestHistoryByIDRequest{
236+
Sqid: req.sqid,
237+
Queue: req.queue,
238+
})
239+
require.NoError(t, err)
240+
241+
var terminal *gatewaypb.HistoryEvent
242+
for _, event := range history.Events {
243+
if event.Type == string(entity.RequestLogTypeStatus) &&
244+
event.Status == string(entity.RequestStatusError) {
245+
terminal = event
246+
}
247+
}
248+
require.NotNil(t, terminal, "request history must contain the reconciled terminal error")
249+
assert.NotEmpty(t, terminal.LastError)
250+
assert.Equal(t, "dependency-analysis", terminal.Metadata["dlq.original_topic"])
251+
assert.Equal(t, "1", terminal.Metadata["dlq.failure_count"])
252+
assert.NotEmpty(t, terminal.Metadata["dlq.failed_at"])
253+
}
254+
216255
// TestLand_HappyPath_ReachesLanded drives a single request through the whole
217256
// pipeline to terminal success on the fully-hermetic e2e-test-queue (no
218257
// conflicts, fake build succeeds, noop runway signals SUCCEEDED for both the

0 commit comments

Comments
 (0)