Skip to content

test: add plugin conformance suite handlers (10-1..10-7) - #559

Open
wangyb-A wants to merge 7 commits into
mainfrom
conformance-plugin-suite
Open

test: add plugin conformance suite handlers (10-1..10-7)#559
wangyb-A wants to merge 7 commits into
mainfrom
conformance-plugin-suite

Conversation

@wangyb-A

@wangyb-A wangyb-A commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What

7 handlers + shared ConformanceLoggingPlugin/FaultyConformancePlugin for the plugin conformance suite in conformance-tests/src/main/java/plugin/, plus template_plugin.yaml.

  • Plugins registered via the real DurableConfig.builder().withPlugins(...) API; all values from real DurableExecutionPlugin hook info records.
  • Each hook emits one structured JSON record{plugin, hook, first|status|n|outcome|op} — via System.out.println (single-line JSON).
  • Every record is stamped with durableExecutionArn (received via onInvocationStart, carried in a volatile field for operation/user-function hooks) so the runner's execution-scoped log retrieval locates plugin records.
  • template_plugin.yaml adopts LoggingConfig: LogFormat: JSON (with the module's log4j2.xml Lambda appender) so SDK-logger lines carry structured fields including durableExecutionArn — same as the other suites' templates.
  • op fields carry the hook-received operation id, asserted against the history-bound ${ID1}.

Validation (live, us-west-2, 2026-07-27): 7/7 PASSED (10-1..10-7)

Notably, 10-3 validates the fix from #558: this suite discovered on Jul 23 that UserFunctionEndInfo.succeeded() was always true for failed step attempts (the step's throwable was swallowed before the plugin boundary, while JS/Python reported the failure correctly); #558 restructured the hook boundary and 10-3 now passes — completing the find → fix → regression-proof loop.

Depends on

Requirements + ExpectedLogs structured-matcher runner: aws/aws-durable-execution-conformance-tests#26 (land first).

@wangyb-A
wangyb-A force-pushed the conformance-plugin-suite branch from f251831 to 1dd85c8 Compare July 27, 2026 21:43
@wangyb-A wangyb-A changed the title Add plugin conformance suite handlers (10-1..10-7) test: add plugin conformance suite handlers (10-1..10-7) Jul 27, 2026
Alex Wang added 7 commits July 27, 2026 23:48
7 handlers + shared ConformanceLoggingPlugin/FaultyConformancePlugin
exercising DurableExecutionPlugin lifecycle hooks via DurableConfig
withPlugins, plus template_plugin.yaml. Validated live: 6/7 PASS;
10-3 OPTIONAL_FAILED surfaces a tracked SDK bug (UserFunctionEndInfo
succeeded=true for failed attempts).
The exact-match ExpectedLogs schema exposed that this handler reused the
general ConformanceLoggingPlugin, emitting 'CONFPLUGIN-A invocation-start
first=true' where the requirement documents 'CONFPLUGIN-A invocation-start'
(as JS/Python emit). Use a minimal purpose-built plugin matching the
requirement byte-for-byte.
One JSON object per hook ({plugin, hook, first|status|n|outcome|op}),
values from the real hook info parameters; replaces packed text lines so
specs assert typed fields directly.
Records carry the execution ARN received via the invocation-start hook
(captured in a volatile field for operation/user-function hooks) so the
runner's execution-scoped CloudWatch JSON filter retrieves them.
Adopt upstream's LoggingConfig LogFormat JSON + log4j2.xml (Lambda
appender with JsonTemplateLayout resolving MDC executionArn into
durableExecutionArn) so SDK-logger lines are execution-scoped
retrievable; drop the obsolete JAVA_TOOL_OPTIONS level hack.
… matrix

Mirrors the Python repo: a discover_suites job runs
conformance-tests/scripts/discover_suites.py (validating each
template_<suite>.yaml has a non-empty src/main/java/<suite>/ package)
and feeds strategy.matrix.suite, so a new suite runs in CI as soon as
its template + handlers ship.
@wangyb-A
wangyb-A force-pushed the conformance-plugin-suite branch from cb685ee to bda11b7 Compare July 27, 2026 23:51
@wangyb-A
wangyb-A marked this pull request as ready for review July 27, 2026 23:53
@wangyb-A
wangyb-A requested a review from a team July 27, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant