The tenant provisioning command cannot answer inside the client's request timeout
Table of Contents
This page is a capture in the inbox bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.
1. What
tenant_provisioning provision-acme-tenant cannot answer inside the timeout
its own client uses. The server completes all eight steps in about 32 seconds
– 21:31:46 to 21:32:19 in the service log, Step 8 included – while the
shell's NATS request timeout is 30 seconds, ores.nats' default_request_timeout.
The client therefore gives up two seconds before the answer arrives, the
recipe reports NATS request timed out and aborts, and whether it passes
depends on machine load: the same command answered in an earlier run and
aborted in the next.
Nothing in the call path can raise that timeout. The generated operation command passes none, the shell exposes no setting for one, and the operation model declares none. Measured, not assumed: the handler's own Step 1 wait is 1500 seconds by design.
2. Why
A single synchronous request cannot carry this operation. The handler is
written for a long run – publish_bundle(..., std::chrono::seconds{1500}) –
and returns only when every step is done, so the client's request timeout is
the real ceiling and it is 50 times smaller than the work the handler is
allowed to do. The two fixes are both design decisions: return an operation or
workflow id immediately and let the caller poll, which is what the bundle
publication this command dispatches already does, or let an operation command
declare a request timeout of its own.
One contributor is separately captured: the base bundle fails at
assets.country_flags, which starts compensation on a 27-step workflow and
adds a second or two to a run that is already at the boundary.
3. References
- The measurement and the corrected record: the V04 row of Bring ores.iam to the clean standard.
projects/ores.nats/include/ores.nats/service/timeouts.hpp–default_request_timeout = std::chrono::seconds(30).projects/ores.iam/core/include/ores.iam.core/messaging/tenant_provisioning_handler.hpp–provision_acme, its eight steps and the 1500-second wait.- The generated command:
projects/ores.shell/iam/src/app/commands/iam/tenant_provisioning_operations_commands.cpp.
4. See also
- The assets image publish function selects columns its table does not have – the failure that tips this run over its boundary.