diff --git a/.github/workflows/check-spotless.yml b/.github/workflows/check-spotless.yml index 9d01286cb..134b21646 100644 --- a/.github/workflows/check-spotless.yml +++ b/.github/workflows/check-spotless.yml @@ -5,19 +5,25 @@ # proper import ordering, and license headers. # Fails the build if any violations are found. # +# Deliberately has no `paths` filter: `mvn spotless:check` runs across every +# Maven module, so filtering by path would skip the job for changes it still +# validates. A module missing from such a filter (e.g. otel-plugin) can merge +# unformatted code and then break this check on unrelated pull requests. +# # Triggers: -# - pull_request +# - pull_request: every PR targeting main +# - push: main, to catch any formatting drift that lands +# - workflow_dispatch: manual run name: Spotless on: + workflow_dispatch: pull_request: branches: - main - paths: - - 'sdk/**' - - 'sdk-testing/**' - - 'sdk-integration-tests/**' - - 'examples/**' + push: + branches: + - main permissions: contents: read diff --git a/otel-plugin/src/test/java/software/amazon/lambda/durable/otel/ExecutionOtelPluginTest.java b/otel-plugin/src/test/java/software/amazon/lambda/durable/otel/ExecutionOtelPluginTest.java index 2dd744550..ed6533e05 100644 --- a/otel-plugin/src/test/java/software/amazon/lambda/durable/otel/ExecutionOtelPluginTest.java +++ b/otel-plugin/src/test/java/software/amazon/lambda/durable/otel/ExecutionOtelPluginTest.java @@ -429,8 +429,17 @@ void operationEnd_withNonSuccessStatusAndNoError_leavesOperationSpanUnset() { plugin.onOperationStart( new OperationInfo("op-cancel", "step-cancel", "STEP", "Step", null, Instant.now(), null, false)); plugin.onOperationEnd(new OperationEndInfo( - "op-cancel", "step-cancel", "STEP", "Step", null, Instant.now(), Instant.now(), "CANCELLED", null, - false, null)); + "op-cancel", + "step-cancel", + "STEP", + "Step", + null, + Instant.now(), + Instant.now(), + "CANCELLED", + null, + false, + null)); plugin.onInvocationEnd(new InvocationEndInfo("req-1", ARN, true, InvocationStatus.SUCCEEDED, null)); var operationSpan = spanByName(spanExporter.getFinishedSpanItems(), "step-cancel"); @@ -443,8 +452,17 @@ void operationEnd_withoutStart_nonSuccessStatusAndNoError_leavesContinuationSpan // TIMED_OUT terminal status must NOT be stamped OK. plugin.onInvocationStart(new InvocationInfo("req-2", ARN, false, Instant.now())); plugin.onOperationEnd(new OperationEndInfo( - "op-cb-timeout", "my-callback", "CALLBACK", "Callback", null, Instant.now(), Instant.now(), - "TIMED_OUT", null, false, null)); + "op-cb-timeout", + "my-callback", + "CALLBACK", + "Callback", + null, + Instant.now(), + Instant.now(), + "TIMED_OUT", + null, + false, + null)); plugin.onInvocationEnd(new InvocationEndInfo("req-2", ARN, false, InvocationStatus.SUCCEEDED, null)); var continuationSpan = spanByName(spanExporter.getFinishedSpanItems(), "my-callback"); diff --git a/otel-plugin/src/test/java/software/amazon/lambda/durable/otel/InvocationOtelPluginTest.java b/otel-plugin/src/test/java/software/amazon/lambda/durable/otel/InvocationOtelPluginTest.java index 7f371ff08..1d9c5eb9d 100644 --- a/otel-plugin/src/test/java/software/amazon/lambda/durable/otel/InvocationOtelPluginTest.java +++ b/otel-plugin/src/test/java/software/amazon/lambda/durable/otel/InvocationOtelPluginTest.java @@ -501,8 +501,17 @@ void operationEnd_withNonSuccessStatusAndNoError_leavesOperationSpanUnset() { plugin.onOperationStart( new OperationInfo("op-cancel", "step-cancel", "STEP", "Step", null, Instant.now(), null, false)); plugin.onOperationEnd(new OperationEndInfo( - "op-cancel", "step-cancel", "STEP", "Step", null, Instant.now(), Instant.now(), "CANCELLED", null, - false, null)); + "op-cancel", + "step-cancel", + "STEP", + "Step", + null, + Instant.now(), + Instant.now(), + "CANCELLED", + null, + false, + null)); plugin.onInvocationEnd(new InvocationEndInfo("req-1", "arn:exec1", true, InvocationStatus.SUCCEEDED, null)); @@ -520,8 +529,17 @@ void operationEnd_withoutMatchingStart_nonSuccessStatusAndNoError_leavesContinua plugin.onInvocationStart(new InvocationInfo("req-1", "arn:exec1", true, Instant.now())); plugin.onOperationEnd(new OperationEndInfo( - "op-cb-timeout", "my-callback", "CALLBACK", "Callback", null, Instant.now(), Instant.now(), - "TIMED_OUT", null, false, null)); + "op-cb-timeout", + "my-callback", + "CALLBACK", + "Callback", + null, + Instant.now(), + Instant.now(), + "TIMED_OUT", + null, + false, + null)); plugin.onInvocationEnd(new InvocationEndInfo("req-1", "arn:exec1", true, InvocationStatus.SUCCEEDED, null));