Skip to content

Commit 953c377

Browse files
nvasiuFrank Chenzhongkechengithub-actions[bot]
authored
refactor(plugin)!: create one plugin instance per invocation (#782)
* test: add opt-in LMI cloud lifecycle regressions * test: anchor timeout probes to the real runtime deadline * test: use arm64 for the LMI capacity provider * ci: run LMI tests on every main branch update * test: serialize LMI fixtures within existing capacity * test: deploy all five LMI fixtures for one cloud run * fix(test): invoke LMI functions with explicit AWS CLI arguments * fix(test): declare all LMI fixtures and scaling in one stack * test: persist and reuse the LMI test stack across runs * fix(test): make LMI evidence collection deterministic * fix(test): isolate timeout evidence and cleanup * fix(test): wait for stable timeout evidence * fix(test): complete LMI regression isolation * fix(test): finalize LMI suite gating and cleanup * fix(test): close remaining LMI evidence gaps * fix(test): require complete cleanup evidence * fix(test): validate retry cleanup and retain failures * fix(test): pair backend calls and prove LMI recovery occupancy Pair request-local backend call/finally-exit IDs; require original peer task/wrapper occupancy at probe admission; establish a bounded child barrier before nested scheduling. Add counterexample and real-thread fixture tests, and align the fixture parent with the rebased 2.2.1 reactor. Locally reviewed and validated before publication. * Update .github/workflows/lmi-e2e-tests.yml Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * test: reject LMI wrapper returns without matching entries * fix: align LMI fixture parent and formatting with main * test: validate all LMI request activity and correlate cleanup evidence * ci: validate LMI fixtures against Java 17 * test: preserve LMI execution identity and collect silent failures * feat: add invocation-scoped task tracking * refactor: clarify executor task handle naming * refactor: describe executor task roles * refactor: keep invocation lifecycle in execution manager * fix: make invocation admission safe during draining Release admissionLock before checkpoint and poll enqueue calls, and wait for admitted enqueue calls before the final shutdown flush. Allow tasks belonging to already-registered operations while draining. Add deterministic admission and shutdown regressions plus bounded map/parallel coverage in both nesting modes. Local review and all 10 Maven reactor modules passed before publishing. * fix: admit and drain descendants of invocation-owned tasks * test: serialize LMI boundaries and preserve recovery evidence * test: reconcile ambiguous LMI starts and retain only held gates * fix: isolate incompatible OpenTelemetry API linkage failures * Revert "Revert "refactor(plugin)!: create one plugin instance per invocation …" This reverts commit 34c174f. * test: verify installed OpenTelemetry API compatibility * ci: run OTel conformance on validated CodeBuild Java 21 * ci: run OTel conformance on validated CodeBuild Java 21 * ci: trigger OTel compatibility checks for module and harness changes * ci: use read-only resolver for review-comment intake * fix: wake fatal scope observers without ending owner cleanup * fix: bound fatal peer cleanup and contain malformed failure chains * fix: preserve operation-owner cleanup during fatal cancellation * fix: reject user function admission after a peer plugin fatal * fix: retain owner cleanup through bounded plugin failures * fix: accept concrete handler scope return types * fix: preserve execution outcomes across end MDC failures * fix: report worker MDC fatals before end dispatch * test: verify parallel tolerance without racing completion assumptions * fix: bound peer cleanup for selected invocation fatals * fix: observe MDC cleanup failures after handler completion * Preserve standalone body failures and settle detached pollers on abort * Observe invocation outcomes before handler dispatch and guard diagnostics * Flush completed telemetry after OTel factory startup failure * Propagate original factory fatals before additional provider flushing * Pin the Java formatter independently of the Spotless plugin Keep Spotless 3.10.4 while explicitly retaining the established Palantir 2.98.0 formatting rules. The plugin default changed to 2.102.0, which otherwise rewrites existing switch-expression layouts across multiple modules. * Format existing Java sources with the updated default formatter Remove the temporary Palantir version pin and apply Spotless 3.10.4 with its default Palantir 2.102.0 only to files reported by the normal checks. Java non-whitespace content, javac tokens, and ASTs are unchanged. * fix: bind invocation task futures before dispatch * fix: interrupt tasks before cancellation observers * fix: preserve draining work after interruption * fix: arbitrate task cancellation and result publication atomically * test: require settled fixed-pool placement evidence before retry * test: preserve original healthy outcomes and late request failures * test: allow bounded stubborn retry settlement after stop * test: await batch flush retirement before provider reuse * test: validate every case request lifecycle after settlement * test: revalidate original request identities after collection * test: require complete warm wrapper snapshots before acceptance * test: preserve proven warm failures alongside cleanup errors * test: reject changes to the pinned warm request cohort * test: make exporter flush starvation fixture deterministic * fix(plugin): settle skipped operation owners after task exit * test: gate task cancellation on the active drain wait --------- Co-authored-by: Frank Chen <frankchn@dev-dsk-frankchn-2a-ff9871a5.us-west-2.amazon.com> Co-authored-by: Frank Chen <65260095+zhongkechen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent d64973f commit 953c377

278 files changed

Lines changed: 27944 additions & 5826 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/scripts/verify_otel_api_compatibility.py‎

Lines changed: 36 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
# SPDX-License-Identifier: Apache-2.0
4-
"""Exercise real released/candidate core and plugin artifacts with two visible OTel APIs.
4+
"""Exercise the current 3.x core, plugin, and testing artifacts with two visible OTel APIs.
55
66
Dependency resolution and every probe are required: a network, compilation, or case
77
failure returns nonzero. No production dependency versions are modified.
@@ -105,72 +105,59 @@ def run_matrix(args: argparse.Namespace) -> int:
105105
output.mkdir(parents=True, exist_ok=True)
106106
fixture = root / "otel-plugin/src/test/compatibility/b1"
107107
cp = resolve_classpaths(fixture, output, args.maven)
108-
released_core = artifact(cp["1.66.0"], CORE, RELEASED_VERSION)
109-
released_plugin = artifact(cp["1.66.0"], PLUGIN, RELEASED_VERSION)
110-
new_core = args.new_core.resolve() if args.new_core else candidate_jar(root, "sdk", CORE)
111-
new_plugin = args.new_plugin.resolve() if args.new_plugin else candidate_jar(root, "otel-plugin", PLUGIN)
112-
for jar in (new_core, new_plugin):
113-
if not jar.is_file():
114-
raise RuntimeError(f"Candidate artifact missing: {jar}")
115-
candidate_inputs = {"core": jar_facts(new_core), "plugin": jar_facts(new_plugin)}
116-
new_core = snapshot_candidate(new_core, output)
117-
new_plugin = snapshot_candidate(new_plugin, output)
108+
testing_name = CORE + "-testing"
109+
inputs = {
110+
"core": args.new_core.resolve() if args.new_core else candidate_jar(root, "sdk", CORE),
111+
"plugin": args.new_plugin.resolve() if args.new_plugin else candidate_jar(root, "otel-plugin", PLUGIN),
112+
"testing": args.new_testing.resolve() if args.new_testing else candidate_jar(root, "sdk-testing", testing_name),
113+
}
114+
candidate_inputs = {name: jar_facts(path) for name, path in inputs.items()}
115+
selected = {name: snapshot_candidate(path, output) for name, path in inputs.items()}
116+
excluded = {f"{name}-{RELEASED_VERSION}.jar" for name in (CORE, PLUGIN, testing_name)}
117+
dependencies = {version: [path for path in paths if path.name not in excluded]
118+
for version, paths in cp.items()}
118119
classes = output / "classes"
119120
classes.mkdir(exist_ok=True)
120-
execute([args.javac, "--release", "17", "-classpath", os.pathsep.join(map(str, cp["1.66.0"])),
121+
compile_cp = [*selected.values(), *dependencies["1.66.0"]]
122+
execute([args.javac, "--release", "17", "-classpath", os.pathsep.join(map(str, compile_cp)),
121123
"-d", str(classes), str(fixture / "InstalledApiProbe.java")], output / "compile.log")
122124
services = classes / "META-INF/services"
123125
services.mkdir(parents=True, exist_ok=True)
124126
(services / "software.amazon.lambda.durable.plugin.DurableExecutionPluginProvider").write_text(
125127
PROBE + "$HealthyProvider\n")
126128
report: dict[str, object] = {
127-
"released_core": jar_facts(released_core), "released_plugin": jar_facts(released_plugin),
128-
"new_core": jar_facts(new_core), "new_plugin": jar_facts(new_plugin),
129+
"contract": "Current 3.x factory API; cross-major core/plugin mixtures are unsupported.",
129130
"candidate_inputs": candidate_inputs,
131+
"candidate_snapshots": {name: jar_facts(path) for name, path in selected.items()},
130132
"cases": [], "agent_coverage": "This matrix is visible-API skew, not a deployed Java-agent test.",
131133
}
132134
cases: list[dict[str, object]] = report["cases"] # type: ignore[assignment]
133135
failures = 0
134-
pairs = {"old-old": (released_core, released_plugin), "new-old": (new_core, released_plugin),
135-
"old-new": (released_core, new_plugin), "new-new": (new_core, new_plugin)}
136136
for version in API_VERSIONS:
137137
api = artifact(cp[version], "opentelemetry-api", version)
138138
context = artifact(cp[version], "opentelemetry-context", version)
139-
dependencies = [p for p in cp[version] if p.name not in
140-
(f"{CORE}-{RELEASED_VERSION}.jar", f"{PLUGIN}-{RELEASED_VERSION}.jar")]
141-
for label, (core, plugin) in pairs.items():
142-
for view in ("otel-invocation", "otel-execution"):
143-
name = f"{label}-api{version}-{view}"
144-
negative = label == "old-old" and version == "1.49.0"
145-
incompatible_core = label == "old-new"
146-
case: dict[str, object] = {"name": name, "expected_negative_control": negative,
147-
"expected_core_rejection": incompatible_core,
148-
"api": jar_facts(api), "context": jar_facts(context)}
149-
command = [args.java, "-cp", os.pathsep.join(map(str, [classes, core, plugin, *dependencies])),
150-
PROBE, str(core), str(plugin), str(api), str(context), view,
151-
str(negative).lower(), str(version == "1.66.0").lower(),
152-
str(incompatible_core).lower()]
153-
try:
154-
log = output / f"{name}.log"
155-
execute(command, log, env=probe_environment(view), timeout=90)
156-
contents = log.read_text(errors="replace")
157-
if "COMPAT_PASS " not in contents:
158-
raise RuntimeError("Probe did not report successful completion")
159-
if negative and "NEGATIVE_CONTROL_REPRODUCED" not in contents:
160-
raise RuntimeError("Released negative control did not reproduce the reported failure")
161-
if incompatible_core and "CORE_LIFECYCLE_REJECTION_CONFIRMED" not in contents:
162-
raise RuntimeError("Old core must reject the new plugin before invocation startup")
163-
case["passed"] = True
164-
except RuntimeError as error:
165-
failures += 1
166-
case.update(passed=False, error=str(error))
167-
cases.append(case)
168-
(output / "results.json").write_text(json.dumps(report, indent=2) + "\n")
169-
print(f"{'PASS' if case['passed'] else 'FAIL'} {name}", flush=True)
139+
for view in ("otel-invocation", "otel-execution"):
140+
name = f"current3x-api{version}-{view}"
141+
case: dict[str, object] = {"name": name, "api": jar_facts(api), "context": jar_facts(context)}
142+
command = [args.java, "-cp", os.pathsep.join(map(str, [classes, *selected.values(), *dependencies[version]])),
143+
PROBE, str(selected["core"]), str(selected["plugin"]), str(api), str(context), view,
144+
str(version == "1.66.0").lower(), str(selected["testing"])]
145+
try:
146+
log = output / f"{name}.log"
147+
execute(command, log, env=probe_environment(view), timeout=90)
148+
if "COMPAT_PASS " not in log.read_text(errors="replace"):
149+
raise RuntimeError("Probe did not report successful completion")
150+
case["passed"] = True
151+
except RuntimeError as error:
152+
failures += 1
153+
case.update(passed=False, error=str(error))
154+
cases.append(case)
155+
(output / "results.json").write_text(json.dumps(report, indent=2) + "\n")
156+
print(f"{'PASS' if case['passed'] else 'FAIL'} {name}", flush=True)
170157
report["passed"] = failures == 0
171158
report["failure_count"] = failures
172159
(output / "results.json").write_text(json.dumps(report, indent=2) + "\n")
173-
print(f"Installed artifact matrix: {len(cases) - failures}/{len(cases)} passed; {output / 'results.json'}")
160+
print(f"Current 3.x artifact matrix: {len(cases) - failures}/{len(cases)} passed; {output / 'results.json'}")
174161
return 1 if failures else 0
175162

176163

@@ -180,6 +167,7 @@ def main() -> int:
180167
parser.add_argument("--output", type=Path, default=Path("target/otel-api-compatibility"))
181168
parser.add_argument("--new-core", type=Path)
182169
parser.add_argument("--new-plugin", type=Path)
170+
parser.add_argument("--new-testing", type=Path)
183171
parser.add_argument("--maven", default=shutil.which("mvn") or "mvn")
184172
parser.add_argument("--java", default=shutil.which("java") or "java")
185173
parser.add_argument("--javac", default=shutil.which("javac") or "javac")

‎.github/workflows/conformance-tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121

2222
concurrency:
2323
# Runs share fixed per-suite stack names, so serialize the whole workflow
24-
# (queue, don't cancel) to avoid concurrent CloudFormation updates on the
24+
# with multiple pending runs to avoid concurrent CloudFormation updates on the
2525
# same stack -- mirrors e2e-tests.yml.
2626
group: conformance-tests
2727
cancel-in-progress: false

‎.github/workflows/e2e-tests.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
- 'pom.xml'
2525

2626
concurrency:
27+
# Shared stacks require serial deployment; preserve waiting runs from other PRs.
2728
group: e2e-tests
2829
cancel-in-progress: false
2930
queue: max
@@ -149,6 +150,26 @@ jobs:
149150
if [[ "$invariant_violated" == true ]]; then
150151
exit 1
151152
fi
153+
- name: Collect Lambda errors after failed E2E tests
154+
if: failure() && env.E2E_LOG_START_TIME_MS != ''
155+
env:
156+
E2E_STACK_NAME: Java${{ matrix.java }}-JavaSDKCloudBasedIntegrationTestStack
157+
run: |
158+
set -euo pipefail
159+
log_groups=$(aws cloudformation list-stack-resources \
160+
--stack-name "$E2E_STACK_NAME" \
161+
--query "StackResourceSummaries[?ResourceType=='AWS::Logs::LogGroup'].PhysicalResourceId" \
162+
--output text)
163+
for log_group in $log_groups; do
164+
echo "::group::Lambda errors: $log_group"
165+
aws logs filter-log-events \
166+
--log-group-name "$log_group" \
167+
--start-time "$E2E_LOG_START_TIME_MS" \
168+
--filter-pattern '%ERROR|Error|Exception|timed.out|Invalid.suspension|not.active|already.registered%' \
169+
--limit 100 --no-paginate \
170+
--query 'events[].message' --output text
171+
echo "::endgroup::"
172+
done
152173
- name: Publish test case summary
153174
if: always()
154175
env:
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: LMI E2E Tests
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
paths:
8+
- 'lmi-tests/**'
9+
- 'sdk/**'
10+
- 'pom.xml'
11+
- '.github/workflows/lmi-e2e-tests.yml'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
local:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 15
20+
steps:
21+
- uses: actions/checkout@v7
22+
- uses: actions/setup-java@v6
23+
with:
24+
distribution: corretto
25+
# Enforce the SDK's minimum JDK API compatibility for fixture-only changes.
26+
java-version: '17'
27+
cache: maven
28+
- name: Build fixtures and validate evidence assertions
29+
run: |
30+
mvn -B -q -pl lmi-tests -am package
31+
mvn -B -q -pl lmi-tests -am spotless:check
32+
python3 -m unittest discover -s lmi-tests/tests -v
33+
34+
cloud:
35+
if: github.event_name == 'workflow_dispatch'
36+
needs: local
37+
runs-on: ubuntu-latest
38+
timeout-minutes: 95
39+
permissions:
40+
contents: read
41+
id-token: write
42+
# Persistent functions are shared; serialize only deployment and cloud testing.
43+
concurrency:
44+
group: java-lmi-e2e
45+
cancel-in-progress: false
46+
env:
47+
LMI_STACK_NAME: java-lmi-e2e
48+
CAPACITY_PROVIDER_ARN: ${{ secrets.CAPACITY_PROVIDER_ARN }}
49+
TEST_LAMBDA_EXECUTION_ROLE_ARN: ${{ secrets.TEST_LAMBDA_EXECUTION_ROLE_ARN }}
50+
steps:
51+
- uses: actions/checkout@v7
52+
- name: Validate configuration
53+
shell: bash
54+
run: |
55+
set -euo pipefail
56+
test -n "$CAPACITY_PROVIDER_ARN"
57+
test -n "$TEST_LAMBDA_EXECUTION_ROLE_ARN"
58+
region=$(cut -d: -f4 <<< "$CAPACITY_PROVIDER_ARN")
59+
echo "AWS_REGION=$region" >> "$GITHUB_ENV"
60+
- uses: actions/setup-java@v6
61+
with:
62+
distribution: corretto
63+
java-version: '25'
64+
cache: maven
65+
- name: Build commit under test
66+
timeout-minutes: 10
67+
run: mvn -B -q -pl lmi-tests -am package -DskipTests
68+
- name: Configure AWS credentials for deployment
69+
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
70+
with:
71+
role-to-assume: ${{ secrets.TEST_ROLE_ARN }}
72+
role-session-name: java-lmi-e2e-deploy
73+
aws-region: ${{ env.AWS_REGION }}
74+
allowed-account-ids: ${{ secrets.TEST_ACCOUNT_ID }}
75+
- name: Create or update persistent LMI functions
76+
timeout-minutes: 35
77+
run: python3 lmi-tests/cloud_suite.py deploy --stack-name "$LMI_STACK_NAME" --run-id "${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
78+
- name: Refresh AWS credentials for assertions
79+
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
80+
with:
81+
role-to-assume: ${{ secrets.TEST_ROLE_ARN }}
82+
role-session-name: java-lmi-e2e-test
83+
aws-region: ${{ env.AWS_REGION }}
84+
allowed-account-ids: ${{ secrets.TEST_ACCOUNT_ID }}
85+
- name: LMI cloud regression assertions (expected red until issue 726 is fixed)
86+
timeout-minutes: 30
87+
run: python3 -u lmi-tests/cloud_suite.py test --cloud-enabled
88+
- name: Refresh AWS credentials for evidence collection
89+
if: always() && hashFiles('lmi-tests/artifacts/manifest.json') != ''
90+
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
91+
with:
92+
role-to-assume: ${{ secrets.TEST_ROLE_ARN }}
93+
role-session-name: java-lmi-e2e-collect
94+
aws-region: ${{ env.AWS_REGION }}
95+
allowed-account-ids: ${{ secrets.TEST_ACCOUNT_ID }}
96+
- name: Collect histories and lifecycle evidence
97+
if: always()
98+
timeout-minutes: 5
99+
run: |
100+
if test -f lmi-tests/artifacts/manifest.json; then
101+
python3 lmi-tests/cloud_suite.py collect
102+
fi
103+
- name: Publish failure evidence
104+
if: always()
105+
uses: actions/upload-artifact@v7
106+
with:
107+
name: lmi-e2e-${{ github.run_id }}-${{ github.run_attempt }}
108+
retention-days: 7
109+
path: |
110+
lmi-tests/artifacts/
111+
lmi-tests/target/surefire-reports/
112+
sdk/target/surefire-reports/
113+
- name: Summarize outcomes
114+
if: always()
115+
run: |
116+
python3 - <<'PY'
117+
import os, pathlib, xml.etree.ElementTree as ET
118+
p = pathlib.Path('lmi-tests/artifacts/junit.xml')
119+
with open(os.environ['GITHUB_STEP_SUMMARY'], 'a') as out:
120+
out.write('LMI tests assert the fixed behavior in #726; failures are not expected-success results.\n\n')
121+
if p.exists():
122+
for case in ET.parse(p).getroot().findall('testcase'):
123+
failures = list(case)
124+
state = 'PASS' if not failures else failures[0].get('type', 'FAIL')
125+
out.write(f"- {case.get('name')}: {state}\n")
126+
else:
127+
out.write('Cloud assertions did not run. Inspect setup errors in the artifacts.\n')
128+
PY

‎AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ Run `mvn spotless:apply` after Java changes. Then run the narrowest relevant tes
335335
- [Error Handling](docs/advanced/error-handling.md)
336336
- [Logging](docs/advanced/logging.md)
337337
- [Migration from 1.x to 2.x](docs/migration-1.x-to-2.x.md)
338+
- [Migration from 2.x to 3.x](docs/migration-2.x-to-3.x.md)
338339

339340
### Official AWS SDKs
340341

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ See [Deploy Lambda durable functions with Infrastructure as Code](https://docs.a
119119
- [<u>Error Handling</u>](docs/advanced/error-handling.md) - SDK exceptions for handling failures
120120
- [<u>Logging</u>](docs/advanced/logging.md) - How to use DurableLogger
121121
- [<u>Migrating from 1.x to 2.x</u>](docs/migration-1.x-to-2.x.md) - Upgrade guide for breaking changes since `v1.2.1`
122+
- [<u>Migrating from 2.x to 3.x</u>](docs/migration-2.x-to-3.x.md) - Upgrade guide for the factory-only, per-invocation plugin contract
122123
- [<u>Release Process</u>](RELEASE.md) - Prepare and publish Maven releases
123124
- [<u>Testing</u>](docs/advanced/testing.md) - Utilities for local development and cloud-based integration testing
124125

‎conformance-tests-otel/README.md‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ SDK spans. The shared validator determines the canonical trace from SDK spans
3535
and checks the actual user-span parents.
3636

3737
Root handler probes preserve a valid same-trace ambient Lambda parent. Otherwise
38-
the plugin activates its canonical Invocation/Workflow context on the handler
39-
thread and restores it in the same-thread end hook. The plugin requires a core with the
40-
same-thread invocation-hook lifecycle capability; unsupported cores are rejected
41-
during configuration.
42-
Nested callbacks retain their named context or attempt parents. Execution-view
43-
context placeholders can be valid without recording, so probes do not require
44-
`isRecording()`.
38+
the per-invocation plugin activates its canonical Invocation/Workflow context on the handler
39+
thread through its explicit handler scope and restores it on that same thread before End.
40+
Use the matching 3.x core and plugin factory API. Nested callbacks retain their named context
41+
or attempt parents. Execution-view context placeholders can be valid without recording, so
42+
probes do not require `isRecording()`.
4543

4644
Case 23 uses the public step attempt number and checkpointed condition state;
4745
it has no mutable warm-container markers. Its helper and virtual child run

‎conformance-tests-otel/src/main/java/software/amazon/lambda/durable/conformance/otel/OtelConformanceHandler.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import software.amazon.lambda.durable.TypeToken;
1010
import software.amazon.lambda.durable.otel.ExecutionOtelPlugin;
1111
import software.amazon.lambda.durable.otel.InvocationOtelPlugin;
12-
import software.amazon.lambda.durable.plugin.DurableExecutionPlugin;
12+
import software.amazon.lambda.durable.plugin.DurableExecutionPluginFactory;
1313

1414
/**
1515
* Shared base for the OTel conformance suite's handlers. Ported from the otel-invocation/otel-execution examples in
@@ -26,13 +26,13 @@ protected OtelConformanceHandler() {
2626

2727
@Override
2828
protected final DurableConfig createConfiguration() {
29-
return DurableConfig.builder().withPlugins(createPlugin()).build();
29+
return DurableConfig.builder().withPlugins(createPluginFactory()).build();
3030
}
3131

32-
private DurableExecutionPlugin createPlugin() {
32+
private DurableExecutionPluginFactory createPluginFactory() {
3333
return "execution".equals(System.getenv("OTEL_PLUGIN_MODE"))
34-
? new ExecutionOtelPlugin()
35-
: new InvocationOtelPlugin();
34+
? ExecutionOtelPlugin.factory()
35+
: InvocationOtelPlugin.factory();
3636
}
3737

3838
protected final void requireScenario(Map<String, Object> event, String expected) {

‎conformance-tests/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>software.amazon.lambda.durable</groupId>
99
<artifactId>aws-durable-execution-sdk-java-parent</artifactId>
10-
<version>2.3.1-SNAPSHOT</version>
10+
<version>3.0.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>aws-durable-execution-sdk-java-conformance-tests</artifactId>

‎conformance-tests/src/main/java/plugin/PluginAttemptHooksRetry.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class PluginAttemptHooksRetry extends DurableHandler<Object, String> {
2222
@Override
2323
protected DurableConfig createConfiguration() {
2424
return DurableConfig.builder()
25-
.withPlugins(new ConformanceLoggingPlugin("CONFPLUGIN"))
25+
.withPlugins(info -> new ConformanceLoggingPlugin("CONFPLUGIN"))
2626
.build();
2727
}
2828

0 commit comments

Comments
 (0)