Expose structured observation for async jobs - #37
Conversation
cadac09 to
7b5c3f5
Compare
Code reviewFound 1 issue:
The new daz-script-server/src/AsyncRequestManager.cpp Lines 248 to 256 in 7b5c3f5 It's invoked unconditionally from daz-script-server/src/AsyncRequestManager.cpp Lines 318 to 324 in 7b5c3f5 Those methods are called directly from the HTTP handlers with no daz-script-server/src/RequestHandlers.cpp Lines 298 to 303 in 7b5c3f5 So on SDK4 builds, any client polling 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
Looks like there were a few issues that we probably need to look at before merging, but the one posted in the review seems to be the one that is the main blocker for this PR, since it looks like this reintroduces something we saw in #36 (Qt work is ending up on worker threads, this time through obs ingestion instead of enqueuing). |
|
Thanks — agreed, this was a real SDK4 blocker. Fixed in
Validation: 738 client tests + 30 subtests, the exact CI unit command (734 tests), Python compileall, You mentioned a few issues, with this as the main blocker. I only see this one detailed publicly; if there are other unpublished findings, please send them over and I'll address them before merge. |
|
@abrady The next reported issue was this: " AsyncRequestManager uses a single QMutex m_mutex to guard its whole shared state — the map of tracked requests, the pending queue, everything. Every operation that touches async request state takes this same lock: submit(), Took a look and it potentially could cause issues someone uses the mutex under heavy load. I think the reason it gets flagged is because the ingest report is doing chunked disk I/O which is going to be slower than other memory/cpu bound things that use the lock. I'd be okay with deferring fixing it while I investigate it more and can address it in a separate PR. I'll be out of pocket for the next couple of weeks so I want to try and get the tightly scoped and significant issues addressed before I go. |
Summary
reportFilefor inline, file-backed, registered, and batched async scriptsQScriptEngineon an HTTP workerreport_file=support to the synchronous and asynchronous dazpy clientsDependency chain
master/ dazpy2.9.2, including dazpy script-call batching + find_skeleton race fix #39's script-call batching andfind_skeleton()retry.nightly-70tag points at the dazpy script-call batching + find_skeleton race fix #39 merge and does not contain this change.Validation
738 passed, 30 subtests passedacrosstests/test_dazpy.pyandtests/test_dazpy_aio.py734 testsINSTALL_TO_DAZ=OFF; no DLL was installed and Daz was not restartedgit diff --checkand Python compileall passedAn SDK4 SDK is not present in the local build environment. The SDK4 boundary is enforced by the compile-time branch, a debug main-thread assertion around the QtScript parser path, the source ratchets above, and the documented Studio 4 final-only observation contract.
Live acceptance of the rebased DLL is intentionally deferred until the whole dependency stack is available in a published nightly.