Repository navigation
test: add LMI cloud lifecycle and concurrency regressions - #728
zhongkechen wants to merge 32 commits into
Conversation
Per-test analysis of LMI run 35794439406Scope: workflow run, attempt 2, PR head Evidence reviewed: job results and the Overall: 13 tests — 3 PASS, 6 assertion FAILURES, 4 collection ERRORS. Build, deployment/readback, final evidence collection, resource deletion, and artifact publication succeeded. The workflow failed in the cloud assertions step. What the configurations mean
Links to the corresponding problems in #726
The links below distinguish direct reproduction, downstream effects of earlier failures, and the contract a test intended to check but did not reach. A collection error is not automatically another SDK defect. Passing cases
Non-passing casesSeverity rates potential customer impact in the affected workload; it is not a production-incident classification or a measured customer incidence rate. The tests establish failure mechanisms, not how many customers use the triggering patterns. A High rating for a related SDK issue does not turn a collection error or coverage gap into another confirmed product defect.
|
83a38c0 to
ff7d473
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| for current_fixture in manifest["functions"]: | ||
| cloud.refresh(current_fixture) |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_ga5pssipf2klpgyanljcalpycl
P2 — Revalidate cases after collecting additional evidence
This refresh runs after execute_case() performs its final lifecycle audit. If it discovers checkpoint/poll activity after an earlier request's wrapper return, it merely caches that evidence; the case retains PASS. Subsequent iterations and collect() also never revalidate completed cases. Retain each case's invocation range and re-audit affected cases after the final refresh before accepting their results. Add a driver test that delivers the violating backend-call records during this refresh.
| history = cloud.history(victim) | ||
| events = cloud.events_for(victim) | ||
| assert_replay(events, history, victim["marker"]) |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_dbswwyuldnjprpdvirdkmoem7g
P2 — Recheck replay assertions after cleanup collects logs
If a duplicate BODY record from replay arrives during cleanup, this assertion has already passed. Balanced task boundaries allow cleanup to succeed, and assert_case_request_lifecycles() accepts the duplicate body when it occurred before wrapper return. The suite can therefore pass despite rerunning checkpointed user code. Preserve the replay marker/history and rerun assert_replay() against the final collected trace, including warm replay cases. Add a delayed duplicate-body regression.
| require(snapshots[-1]["threads"] <= snapshots[0]["threads"] + 16, | ||
| "Thread growth exceeded bounded cache tolerance (+16)") |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_dtc3qzxfcmprfubu64mxcbpget
P2 — Order warm snapshots by JVM sequence
events_for() preserves first-observed insertion order, so these endpoints need not be chronological. If the final replay's successful-return snapshot arrives before its earlier PENDING snapshot, snapshots[-1] selects the earlier thread count. A final count of 50 can consequently pass against a baseline of 20 when the delayed PENDING snapshot also reports 20. Sort the same-JVM snapshots by sequence before comparing endpoints, and test reversed delivery of the final replay's snapshots.
Codex AI reviewThree P2 findings in Reviewed commit |
This adds real Lambda Managed Instances (LMI) regression coverage for the invocation lifecycle and executor problems in #726. The fixtures assert the required behavior: wrapper responses follow root/task cleanup, deadlines bound invocation-owned work, and concurrent executions make progress without interfering with each other. The cloud regressions are expected to fail until the corresponding SDK fixes land.
Pull requests run local fixture and evidence validation on Java 17 without cloud credentials, enforcing the SDK's minimum JDK API compatibility even for fixture-only changes. Real cloud execution is manual-dispatch only.
Issue Link, if available
Closes #727. Regression coverage for #726; this PR does not fix or close #726.
Description
PENDINGrequest, and wait for an admitted healthy peer's heartbeat inside that exact interval; reordered logs, later invocations and replacement JVMs cannot supply its evidence.java-lmi-e2estack, fixed-name functions, log groups and private staging/control bucket using an existing dedicatedCAPACITY_PROVIDER_ARN. Each function has one 2 GiB / 1 vCPU environment and uses$LATEST.PUBLISHED. Verify the content-addressed jar, runtime deployment identity, scaling and durable configuration; wait for earlier executions before updating. Retain infrastructure and code artifacts after success or failure, with per-run control objects expiring after one day.Fixed-pool retries require affirmative barrier-entry evidence that the two roots landed in different JVMs, followed by terminal FAILED states and runtime quiescence. Delayed or missing barrier logs cannot trigger a retry, and escape evidence from every attempted cohort is checked again before accepting a result. The eight-second JVM progress assertion and fixed-pool observation windows are unchanged.
Healthy peers and anchors must report SUCCEEDED and normal lifecycle ordering on their originally admitted request; eventual durable retry success cannot replace that outcome. Timeout peers and replay/in-flight anchors collect their full evidence before acceptance. Physical cleanup can settle a late root exit without erasing its earlier ordering failure. After release, stop, and quiescence attempts, the driver audits every case invocation Future, including discarded placement attempts: reconciliation still drains accepted executions, but failed, cancelled, or unsettled driver requests remain collection errors. Primary SDK assertions and cleanup failures remain separately reported.
Post-stop cleanup also allows an already running stubborn retry its configured bounded hold (at most 120 seconds), followed by the existing 30-second collection margin and 20-second quiet period. Ordinary cleanup stays at 50 seconds; original invocation deadline + 5s, recovery, and progress acceptance remain unchanged.
Before an otherwise successful case can pass, every launched request is validated against the existing lifecycle contract after cleanup has completed. This includes recovery probes, discarded placement attempts, and retries. Only the already-supported stubborn victim permits residual task exit; primary and cleanup failures are preserved.
The initially pinned healthy admission, timeout-victim request, and warm JVM selections are immutable. Final collection revalidates each selection using its existing predicate; healthy requests must also retain their original SUCCEEDED outcome. Changed evidence fails acceptance without repinning earlier timing or occupancy evidence. The original timeout task identity and each warm environment are rechecked against the complete trace using their existing ordering and environment predicates. Admitted fixed/nested cohorts are revalidated once against final membership, barrier and progress evidence, so a later retry cannot replace an original participant.
See
lmi-tests/README.mdfor prerequisites, budgets, commands and infrastructure ownership. Production SDK behavior and public APIs are unchanged.Demo/Screenshots
Not applicable. Cloud diagnostics and JUnit results are uploaded as workflow artifacts.
Testing
Current head
37a044979633ec56c06b411c5840136540f85f3fcontains upstream main67bad28cd9ef1b0808bed193f8a15be75ce457edthrough parentedeb5075; the follow-up changes only the Python evidence driver, its tests, and README. The PR remains test-only relative to that main; the core lifecycle fixes remain separate.python3 -B -m unittest discover -s lmi-tests/tests -v— 179/179 passed, including the real local CLI transport contract and retained lifecycle/recovery controls. The ten fixed-placement controls fail against the pre-correctionedeb5075driver and pass after the correction. Further counterexamples reproduce original healthy-request failure hidden by a successful retry, healthy root exit after wrapper return, and late request failures hidden by successful cleanup on4f1b7662; the new assertions reject them while preserving healthy and delayed-but-correct evidence controls.8c05b960driver; the ordinary-budget control remains green.160169fcdriver and now fail acceptance.8c9292d5driver; unchanged request identities, delayed same-request evidence, and the single-JVM warm/replay sequence remain valid.edeb5075:mvn -o -B clean verifyon Java 17 passed all ten reactor modules: 2,972 tests passed, 34 conditional/cloud tests skipped, zero failures or errors. This includes the LMI fixture build and Java tests.edeb5075fullmvn -o -B spotless:checkpassed; no Java files changed in this follow-up. Currentgit diff --checkpassed.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.