Skip to content

Commit c34f5d9

Browse files
author
Scott Gerring
committed
Merge branch 'main' into rfc-batch-processor
2 parents 2c20023 + 967cb71 commit c34f5d9

File tree

21 files changed

+143
-93
lines changed

21 files changed

+143
-93
lines changed

.github/auto_assign-issues.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ addAssignees: true
33
# The list of users to assign to new issues.
44
# If empty or not provided, the repository owner is assigned
55
assignees:
6+
- scottgerring
7+
- jeromevdl
8+
- mriccia
69
- msailes
7-
- pankajagrawal16
8-
- stevehouel

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ jobs:
4545
role-to-assume: ${{ secrets.AWS_ROLE_ARN_TO_ASSUME }}
4646
aws-region: ${{ env.AWS_DEFAULT_REGION }}
4747
- name: Run e2e test with Maven
48-
run: mvn -Pe2e -B verify --file powertools-e2e-tests/pom.xml
48+
run: mvn -Pbuild-without-spotbugs -DskipTests install --file pom.xml && mvn -Pe2e -B verify --file powertools-e2e-tests/pom.xml

docs/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: Powertools for AWS Lambda (Java)
88
Powertools for AWS Lambda (Java) is a suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier.
99

1010
???+ tip
11-
Powertools for AWS Lambda is also available for [Python](https://awslabs.github.io/aws-lambda-powertools-python/){target="_blank"}, [TypeScript](https://awslabs.github.io/aws-lambda-powertools-typescript/){target="_blank"}, and [.NET](https://awslabs.github.io/aws-lambda-powertools-dotnet/){target="_blank"}
11+
Powertools for AWS Lambda is also available for [Python](https://docs.powertools.aws.dev/lambda/python/latest/){target="_blank"}, [TypeScript](https://docs.powertools.aws.dev/lambda/typescript/latest/){target="_blank"}, and [.NET](https://docs.powertools.aws.dev/lambda/dotnet/){target="_blank"}
1212

1313

1414
!!! tip "Looking for a quick run through of the core utilities?"
@@ -142,4 +142,4 @@ For more information about the project and available options refer to this [repo
142142
| **POWERTOOLS_LOGGER_SAMPLE_RATE** | Debug log sampling | [Logging](./core/logging) |
143143
| **POWERTOOLS_LOG_LEVEL** | Sets logging level | [Logging](./core/logging) |
144144
| **POWERTOOLS_TRACER_CAPTURE_RESPONSE** | Enables/Disables tracing mode to capture method response | [Tracing](./core/tracing) |
145-
| **POWERTOOLS_TRACER_CAPTURE_ERROR** | Enables/Disables tracing mode to capture method error | [Tracing](./core/tracing) |
145+
| **POWERTOOLS_TRACER_CAPTURE_ERROR** | Enables/Disables tracing mode to capture method error | [Tracing](./core/tracing) |

docs/javascript/extra.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const awsconfig = {
1010
};
1111

1212
const RUNTIME = "java"
13-
const BASE_ORIGIN = "awslabs.github.io"
13+
const BASE_ORIGIN = "docs.powertools.aws.dev"
1414

1515
function enableSearchOnBlurElement() {
1616
if (document.location.hostname != BASE_ORIGIN) return // prevent unnecessary data
@@ -73,4 +73,4 @@ const recordPageView = ({prevLocation, searchPattern}) => {
7373
}, 'AWSKinesisFirehose')
7474
}
7575

76-
init()
76+
init()

examples/powertools-examples-core/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Globals:
1212
Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
1313
Environment:
1414
Variables:
15-
# Powertools for AWS Lambda (Java) env vars: https://awslabs.github.io/aws-lambda-powertools-python/#environment-variables
15+
# Powertools for AWS Lambda (Java) env vars: https://docs.powertools.aws.dev/lambda/java/#environment-variables
1616
POWERTOOLS_LOG_LEVEL: INFO
1717
POWERTOOLS_LOGGER_SAMPLE_RATE: 0.1
1818
POWERTOOLS_LOGGER_LOG_EVENT: true

examples/powertools-examples-sqs/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<dependency>
2626
<groupId>software.amazon.awssdk</groupId>
2727
<artifactId>url-connection-client</artifactId>
28-
<version>2.20.88</version>
28+
<version>2.20.91</version>
2929
</dependency>
3030
<dependency>
3131
<groupId>com.amazonaws</groupId>

examples/powertools-examples-sqs/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Globals:
1111
Tracing: Active
1212
Environment:
1313
Variables:
14-
# Powertools for AWS Lambda (Java) env vars: https://awslabs.github.io/aws-lambda-powertools-python/#environment-variables
14+
# Powertools for AWS Lambda (Java) env vars: https://docs.powertools.aws.dev/lambda/java/#environment-variables
1515
POWERTOOLS_LOG_LEVEL: INFO
1616
POWERTOOLS_LOGGER_SAMPLE_RATE: 0.1
1717
POWERTOOLS_LOGGER_LOG_EVENT: true

pom.xml

+4-10
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<log4j.version>2.20.0</log4j.version>
6262
<jackson.version>2.15.2</jackson.version>
6363
<aspectj.version>1.9.7</aspectj.version>
64-
<aws.sdk.version>2.20.88</aws.sdk.version>
64+
<aws.sdk.version>2.20.91</aws.sdk.version>
6565
<aws.xray.recorder.version>2.14.0</aws.xray.recorder.version>
6666
<payloadoffloading-common.version>2.1.3</payloadoffloading-common.version>
6767
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -72,7 +72,7 @@
7272
<aspectj-maven-plugin.version>1.13.1</aspectj-maven-plugin.version>
7373
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
7474
<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
75-
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
75+
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
7676
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
7777
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
7878
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
@@ -184,7 +184,7 @@
184184
</dependency>
185185
<dependency>
186186
<groupId>org.apache.logging.log4j</groupId>
187-
<artifactId>log4j-slf4j-impl</artifactId>
187+
<artifactId>log4j-slf4j2-impl</artifactId>
188188
<version>${log4j.version}</version>
189189
</dependency>
190190
<dependency>
@@ -294,12 +294,6 @@
294294
<version>1.1.1</version>
295295
<scope>test</scope>
296296
</dependency>
297-
<dependency>
298-
<groupId>ch.qos.logback</groupId>
299-
<artifactId>logback-classic</artifactId>
300-
<version>1.3.8</version>
301-
<scope>test</scope>
302-
</dependency>
303297
<dependency>
304298
<groupId>com.github.tomakehurst</groupId>
305299
<artifactId>wiremock-jre8</artifactId>
@@ -465,7 +459,7 @@
465459
<plugin>
466460
<groupId>com.github.spotbugs</groupId>
467461
<artifactId>spotbugs-maven-plugin</artifactId>
468-
<version>4.7.3.4</version>
462+
<version>4.7.3.5</version>
469463
<executions>
470464
<execution>
471465
<id>test</id>

powertools-cloudformation/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@
9898
<artifactId>wiremock-jre8</artifactId>
9999
<scope>test</scope>
100100
</dependency>
101-
<dependency>
102-
<groupId>ch.qos.logback</groupId>
103-
<artifactId>logback-classic</artifactId>
104-
<scope>test</scope>
105-
</dependency>
106101
</dependencies>
107102

108103
</project>

powertools-cloudformation/src/test/resources/logback.xml

-11
This file was deleted.

powertools-e2e-tests/handlers/parameters/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<build>
3232
<plugins>
3333
<plugin>
34-
<groupId>org.codehaus.mojo</groupId>
34+
<groupId>dev.aspectj</groupId>
3535
<artifactId>aspectj-maven-plugin</artifactId>
3636
<configuration>
3737
<source>${maven.compiler.source}</source>

powertools-e2e-tests/handlers/parameters/src/main/java/software/amazon/lambda/powertools/e2e/Function.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@
22

33
import com.amazonaws.services.lambda.runtime.Context;
44
import com.amazonaws.services.lambda.runtime.RequestHandler;
5-
import org.apache.logging.log4j.LogManager;
6-
import org.apache.logging.log4j.Logger;
75
import software.amazon.lambda.powertools.logging.Logging;
8-
import software.amazon.lambda.powertools.parameters.ParamManager;
9-
import software.amazon.lambda.powertools.parameters.cache.CacheManager;
106
import software.amazon.lambda.powertools.parameters.AppConfigProvider;
7+
import software.amazon.lambda.powertools.parameters.ParamManager;
118

129
public class Function implements RequestHandler<Input, String> {
1310

14-
private static final Logger LOG = LogManager.getLogger(Function.class);
15-
1611
@Logging
1712
public String handleRequest(Input input, Context context) {
1813
AppConfigProvider provider = ParamManager.getAppConfigProvider(input.getEnvironment(), input.getApp());

powertools-e2e-tests/handlers/pom.xml

+96-11
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
<properties>
1313
<lambda.powertools.version>1.15.0</lambda.powertools.version>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15-
<maven.compiler.source>11</maven.compiler.source>
16-
<maven.compiler.target>11</maven.compiler.target>
15+
<maven.compiler.source>1.8</maven.compiler.source>
16+
<maven.compiler.target>1.8</maven.compiler.target>
1717

1818
<lambda.java.core>1.2.2</lambda.java.core>
19-
<lambda.java.events>3.11.0</lambda.java.events>
20-
<maven.shade.version>3.2.4</maven.shade.version>
21-
<aspectj.version>1.13.1</aspectj.version>
22-
<maven.compiler.version>3.10.1</maven.compiler.version>
19+
<lambda.java.events>3.11.2</lambda.java.events>
20+
<maven.shade.version>3.5.0</maven.shade.version>
21+
<aspectj.plugin.version>1.13.1</aspectj.plugin.version>
22+
<maven.compiler.version>3.11.0</maven.compiler.version>
2323
</properties>
2424

2525
<modules>
@@ -104,22 +104,107 @@
104104
</dependency>
105105
</dependencies>
106106
</plugin>
107-
<plugin>
108-
<groupId>dev.aspectj</groupId>
109-
<artifactId>aspectj-maven-plugin</artifactId>
110-
<version>1.13.1</version>
111-
</plugin>
112107
<plugin>
113108
<groupId>org.apache.maven.plugins</groupId>
114109
<artifactId>maven-compiler-plugin</artifactId>
115110
<version>${maven.compiler.version}</version>
116111
<configuration>
117112
<source>${maven.compiler.source}</source>
118113
<target>${maven.compiler.target}</target>
114+
<useIncrementalCompilation>false</useIncrementalCompilation>
119115
</configuration>
120116
</plugin>
121117
</plugins>
122118
</pluginManagement>
123119
</build>
124120

121+
<profiles>
122+
<profile>
123+
<id>jdk8</id>
124+
<activation>
125+
<jdk>(,11)</jdk> <!-- < 11 -->
126+
</activation>
127+
<properties>
128+
<aspectj.version>1.9.7</aspectj.version>
129+
</properties>
130+
<dependencyManagement>
131+
<dependencies>
132+
<dependency>
133+
<groupId>org.aspectj</groupId>
134+
<artifactId>aspectjtools</artifactId>
135+
<version>${aspectj.version}</version>
136+
</dependency>
137+
</dependencies>
138+
</dependencyManagement>
139+
<build>
140+
<pluginManagement>
141+
<plugins>
142+
<plugin>
143+
<groupId>dev.aspectj</groupId>
144+
<artifactId>aspectj-maven-plugin</artifactId>
145+
<version>${aspectj.plugin.version}</version>
146+
<configuration>
147+
<source>${maven.compiler.source}</source>
148+
<target>${maven.compiler.target}</target>
149+
<complianceLevel>${maven.compiler.target}</complianceLevel>
150+
<Xlint>ignore</Xlint>
151+
<encoding>${project.build.sourceEncoding}</encoding>
152+
</configuration>
153+
<executions>
154+
<execution>
155+
<phase>process-sources</phase>
156+
<goals>
157+
<goal>compile</goal>
158+
<goal>test-compile</goal>
159+
</goals>
160+
</execution>
161+
</executions>
162+
<!-- Enforce aspectJ 1.9.7 -->
163+
<dependencies>
164+
<dependency>
165+
<groupId>org.aspectj</groupId>
166+
<artifactId>aspectjtools</artifactId>
167+
<version>${aspectj.version}</version>
168+
</dependency>
169+
</dependencies>
170+
</plugin>
171+
</plugins>
172+
</pluginManagement>
173+
</build>
174+
</profile>
175+
<profile>
176+
<id>jdk11plus</id>
177+
<activation>
178+
<jdk>[11,)</jdk> <!-- >= 11 -->
179+
</activation>
180+
<build>
181+
<pluginManagement>
182+
<plugins>
183+
<plugin>
184+
<groupId>dev.aspectj</groupId>
185+
<artifactId>aspectj-maven-plugin</artifactId>
186+
<version>${aspectj.plugin.version}</version>
187+
<configuration>
188+
<source>${maven.compiler.source}</source>
189+
<target>${maven.compiler.target}</target>
190+
<complianceLevel>${maven.compiler.target}</complianceLevel>
191+
<Xlint>ignore</Xlint>
192+
<encoding>${project.build.sourceEncoding}</encoding>
193+
</configuration>
194+
<executions>
195+
<execution>
196+
<phase>process-sources</phase>
197+
<goals>
198+
<goal>compile</goal>
199+
<goal>test-compile</goal>
200+
</goals>
201+
</execution>
202+
</executions>
203+
</plugin>
204+
</plugins>
205+
</pluginManagement>
206+
</build>
207+
</profile>
208+
</profiles>
209+
125210
</project>

powertools-e2e-tests/pom.xml

+7-9
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,20 @@
1414
<description>Powertools for AWS Lambda (Java)End-To-End Tests</description>
1515

1616
<properties>
17-
<!-- we can use Java 11 for integration tests, not forced to stick to Java 8 -->
18-
<maven.compiler.source>8</maven.compiler.source>
19-
<maven.compiler.target>8</maven.compiler.target>
20-
<constructs.version>10.2.55</constructs.version>
21-
<cdk.version>2.84.0</cdk.version>
17+
<maven.compiler.source>1.8</maven.compiler.source>
18+
<maven.compiler.target>1.8</maven.compiler.target>
19+
<constructs.version>10.2.57</constructs.version>
20+
<cdk.version>2.85.0</cdk.version>
2221

2322
<!-- Don't deploy the e2e tests -->
2423
<maven.deploy.skip>true</maven.deploy.skip>
2524
</properties>
2625

27-
2826
<dependencies>
2927
<dependency>
30-
<groupId>ch.qos.logback</groupId>
31-
<artifactId>logback-classic</artifactId>
32-
<version>1.3.8</version>
28+
<groupId>org.apache.logging.log4j</groupId>
29+
<artifactId>log4j-slf4j2-impl</artifactId>
30+
<scope>test</scope>
3331
</dependency>
3432

3533
<dependency>

powertools-e2e-tests/src/test/java/software/amazon/lambda/powertools/ParametersE2ET.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package software.amazon.lambda.powertools;
22

3-
import com.fasterxml.jackson.databind.ObjectMapper;
43
import org.junit.jupiter.api.*;
54
import software.amazon.lambda.powertools.testutils.AppConfig;
65
import software.amazon.lambda.powertools.testutils.Infrastructure;
76
import software.amazon.lambda.powertools.testutils.lambda.InvocationResult;
87

98
import java.util.HashMap;
109
import java.util.Map;
10+
import java.util.UUID;
1111
import java.util.concurrent.TimeUnit;
1212
import java.util.stream.Collectors;
1313
import java.util.stream.Stream;
@@ -17,19 +17,16 @@
1717

1818
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
1919
public class ParametersE2ET {
20-
21-
22-
private final ObjectMapper objectMapper = new ObjectMapper();
23-
2420
private Infrastructure infrastructure;
2521
private String functionName;
2622
private final AppConfig appConfig;
2723

2824
public ParametersE2ET() {
25+
String appName = UUID.randomUUID().toString();
2926
Map<String,String> params = new HashMap<>();
3027
params.put("key1", "value1");
3128
params.put("key2", "value2");
32-
appConfig = new AppConfig("e2eApp", "e2etest", params);
29+
appConfig = new AppConfig(appName, "e2etest", params);
3330
}
3431
@BeforeAll
3532
@Timeout(value = 5, unit = TimeUnit.MINUTES)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Configuration status="INFO">
3+
<Appenders>
4+
<Console name="Console" target="SYSTEM_OUT">
5+
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" />
6+
</Console>
7+
</Appenders>
8+
<Loggers>
9+
<Logger name="software.amazon.lambda.powertools" level="debug" additivity="false">
10+
<AppenderRef ref="Console"/>
11+
</Logger>
12+
<Root level="info">
13+
<AppenderRef ref="Console" />
14+
</Root>
15+
</Loggers>
16+
</Configuration>

0 commit comments

Comments
 (0)