fix: tighten server manager exception handling#871
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
| if expected_base != server_base: | ||
| return True | ||
| except Exception: | ||
| except (OSError, json.JSONDecodeError, AttributeError, KeyError, TypeError, ValueError): |
| if result.stdout.strip(): | ||
| time.sleep(0.5) | ||
| except Exception: | ||
| except (OSError, subprocess.TimeoutExpired, ValueError): |
| os.kill(pid, signal.SIGTERM) | ||
| time.sleep(0.5) | ||
| except Exception: | ||
| except (OSError, subprocess.TimeoutExpired): |
| os.kill(pid, signal.SIGKILL) | ||
| time.sleep(0.2) | ||
| except Exception: | ||
| except OSError: |
| try: | ||
| self.lock_path.unlink() | ||
| except: | ||
| except OSError: |
PR Review: PASS (NOT VERIFIED)What This DoesTightens Python server-manager exception handling for clearer lifecycle failure behavior. Blast RadiusPython SDK server manager and docs artifacts; no exchange runtime change. Consumer VerificationBefore (base branch): After (PR branch): Test Results
FindingsNo blocking findings. PMXT Pipeline Check
Semver Impactpatch -- bug fix/internal compatibility change unless SDK consumers rely on newly added APIs RiskThe branch was built, core-tested, and authenticated-smoke-tested through the sidecar. Full live-exchange before/after behavior remains unverified for this daily batch; credentialed venue calls and venue API drift should be treated as residual risk unless covered by tests in this PR. |
PR Review Update: NOT VERIFIEDI attempted the requested post-PR verification, but this PR is not merged. Blocking result
Evidence
No approval/label was added; no merge was performed. |
PR Review Update: NOT VERIFIEDFollow-up verification still did not succeed, so I did not merge this PR. Blocking result
Evidence
No approval/label was added; no merge was performed. |
PR Review Update: VERIFIEDThis PR is now VERIFIED through the consumer path and has no blocking findings remaining. Evidence
Note: Python-specific pytest execution was not used for merge gating in this runner because the local cron environment lacks a committed/generated Proceeding with the user-approved squash merge for this target PR only. |
Covers everything between 2.48.6 and HEAD plus the hosted-trading-mode work on this branch — Added (7 bullets: hosted trading mode end-to-end, Escrow namespace, hosted error hierarchy, 2 e2e drivers, 87 new dispatch + error-mapping tests, feed listing surface), Changed (9 bullets: SDK 2.18.0 version bumps, new model fields, drift parity sweep, dep refreshes), Fixed (12 bullets covering both the hosted-mode bugs caught by the live $5 buy + sell and the unrelated fixes that landed on main since 2.48.6 — #871 #870 #873 #874 #875 #876 #877 #879 #663 #872 + the three this branch adds), Docs (2 bullets).
Summary\n- Replace bare / overly broad exception handlers in the Python server manager with narrower, expected failure modes.\n- Preserve the existing behavior of treating unreadable lockfiles and transient process errors as non-fatal, while avoiding silent masking of programming errors.\n\n## Tests\n- python3 -m compileall sdks/python/pmxt\n\nFixes #813\nFixes #814\nFixes #815\nFixes #816\nFixes #817\nFixes #818\nFixes #819\nFixes #820\nFixes #821