Repository navigation
Replies: 2 comments
TriageVerdict: A reproducible bug in the mailer walkthrough's own tests, not in Is this a misuse of humus?No. The run is the walkthrough's own test, of its own cases, against its own mailer, all in
The strongest argument for misuse is that the walkthrough is Is it a feature request?No. It breaks the walkthrough's promises, from #951 and the stories that landed its cases:
A fix needs no change to humus's API. A fix that changed how Is it reproducible?Yes. At e59c40c, with Go 1.27.0 and
The second test runs only the shared cases, as they're written. More of them at once means more queues going away while the mailer publishes. Runs 2 and 4 passed, with 8 and 6 nacked attempts that never came five in a row on one Publisher. Run 1: the events breaker opens, requests are dead-lettered
Run 3:
The broker logged no error or warning in any run. This corrects the report:
Why
The cited test runs six cases, and the window is narrow. In 12 exploratory runs of those six cases, instrumented, on 4 CPUs, The same parallel cases run in the kind job ( #1279 is filed to fix it:
|
|
Fixed by #1282 (#1282), merged as 2ba208d, which closed story #1279. What changed: a shared case now unbinds its queues on The test: Docs: the walkthrough's Testing page now quotes |
Uh oh!
There was an error while loading. Please reload this page.
What happens
TestInit_passes_the_shared_cases_against_RabbitMQ_and_WireMockfailed once in the Mailer walkthrough (testcontainers) job. Two of the cases that run in parallel failed together:SentandSlowProvider. The job passed when it was re-run on the same commit.The test's output:
The
SlowProviderdeliveries are shortened here. All three carry the same message ID, the same baggage and the same body, and differ only inx-mail-attemptand delivery tag.What's known
This hasn't been triaged. What follows comes from the run and the cases' code:
Sentgot an outcome whose routing key ismail.send.Sentpublishes a request with no baggage, then waits for its first outcome.outcomecounts a delivery frommail.eventsormail.deadas an outcome, and skips one frommail.retry. So the deliverySentgot came frommail.eventsormail.dead. The output doesn't say which exchange it came from, and doesn't print its headers.SlowProvider's request was parked onmail.retrythree times before it was sent. Its request's scenario delays the provider by 2s. The three parked copies carryx-mail-attempt2, 3 and 4. Itsmail.sentoutcome came after them, and its checks at lines 182 and 183 passed. Line 184 requires that the request was never parked.SentOnce,Refused,Malformed,UntrustedScenario) and the threeAlonecases passed. Whether the two failures are connected isn't known.example/mailer, and the mailer doesn't import humus's grpc module.example/maileris the same on c474ae3 and onmainat e59c40c. The mailer's cases and app last changed in story(example): rehearse failures in the mailer's shared cases #1078.Not yet known: why
Sent's request came out onmail.send, whySlowProvider's 2s delay made the mailer retry, whether it reproduces locally, and how often it happens.Expected
Sent's first outcome is amail.sentevent.SlowProvider's request is sent without being parked onmail.retry, as the case requires. The test passes on every run.References
SentandSlowProviderinexample/mailer/cases/cases.gowatch,outcome,awaitandoutcomes,parkedTestInit_passes_the_shared_cases_against_RabbitMQ_and_WireMockAll reactions