Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package software.amazon.lambda.durable.conformance.otel;

import java.util.Map;
import software.amazon.lambda.durable.DurableContext;
import software.amazon.lambda.durable.config.RunInChildContextConfig;

/** Virtual child-context scenario for OTel requirement otel-invocation-20. */
public final class Otel20VirtualContext extends OtelConformanceHandler<String> {

@Override
public String handleRequest(Map<String, Object> event, DurableContext context) {
requireScenario(event, "virtual-context");
return context.runInChildContext(
"otel-virtual-context",
String.class,
child -> "virtual-complete",
RunInChildContextConfig.builder().isVirtual(true).build());
}
}
24 changes: 24 additions & 0 deletions conformance-tests-otel/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,17 @@ Resources:
CodeUri: .
Handler: software.amazon.lambda.durable.conformance.otel.Otel19ExecutionFailure
Role: !Ref LambdaExecutionRoleArn

Otel20VirtualContext:
Type: AWS::Serverless::Function
TestingMetadata:
TestDescription:
- otel-invocation-20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex AI review

[P2] Advance the conformance suite pin

Normal PR/push runs still pass the fixed 0f0b5b... ref from .github/workflows/otel-conformance-tests.yml. Merging the prerequisite requirement does not update that SHA, so otel-*-20 will not be selected and this change receives no behavioral coverage. Update the workflow's uses and fallback conformance_test_ref SHAs to the merged commit containing requirement 20.

Properties:
CodeUri: .
Handler: software.amazon.lambda.durable.conformance.otel.Otel20VirtualContext
Role: !Ref LambdaExecutionRoleArn

OtelExecution1Success:
Type: AWS::Serverless::Function
TestingMetadata:
Expand Down Expand Up @@ -576,3 +587,16 @@ Resources:
Environment:
Variables:
OTEL_PLUGIN_MODE: execution

OtelExecution20VirtualContext:
Type: AWS::Serverless::Function
TestingMetadata:
TestDescription:
- otel-execution-20
Properties:
CodeUri: .
Handler: software.amazon.lambda.durable.conformance.otel.Otel20VirtualContext
Role: !Ref LambdaExecutionRoleArn
Environment:
Variables:
OTEL_PLUGIN_MODE: execution
Loading