From ff0e3c92b9fa1f34be0032f4ce6e7675f960fc71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Richard=20Op=C3=A1lka?=
Date: Mon, 18 Nov 2024 14:02:37 +0100
Subject: [PATCH 1/4] [UNDERTOW-2526] Rename DeploymentInfo methods dealing
with async context timeout containing typo. It is safe to rename them because
this change wasn't backported yet. There is no release containing the typo.
---
.../src/main/java/io/undertow/servlet/api/DeploymentInfo.java | 4 ++--
.../main/java/io/undertow/servlet/spec/AsyncContextImpl.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/servlet/src/main/java/io/undertow/servlet/api/DeploymentInfo.java b/servlet/src/main/java/io/undertow/servlet/api/DeploymentInfo.java
index 77c87a7d33..8b47a531f0 100644
--- a/servlet/src/main/java/io/undertow/servlet/api/DeploymentInfo.java
+++ b/servlet/src/main/java/io/undertow/servlet/api/DeploymentInfo.java
@@ -320,14 +320,14 @@ public DeploymentInfo setDefaultSessionTimeout(final int defaultSessionTimeout)
return this;
}
- public long getDefaultAsyncConextTimeout() {
+ public long getDefaultAsyncContextTimeout() {
return defaultAsyncContextTimeout;
}
/**
* @param defaultAsyncContextTimeout The default async context timeout, in milliseconds
*/
- public DeploymentInfo setDefaultAsyncConextTimeout(final long defaultAsyncContextTimeout) {
+ public DeploymentInfo setDefaultAsyncContextTimeout(final long defaultAsyncContextTimeout) {
this.defaultAsyncContextTimeout = defaultAsyncContextTimeout;
return this;
}
diff --git a/servlet/src/main/java/io/undertow/servlet/spec/AsyncContextImpl.java b/servlet/src/main/java/io/undertow/servlet/spec/AsyncContextImpl.java
index 6ced7381e2..bce517d0a4 100644
--- a/servlet/src/main/java/io/undertow/servlet/spec/AsyncContextImpl.java
+++ b/servlet/src/main/java/io/undertow/servlet/spec/AsyncContextImpl.java
@@ -114,10 +114,10 @@ public void run() {
}
});
//If its chain and non default value is set, use it
- if(previousAsyncContext!=null && previousAsyncContext.getTimeout() != servletRequestContext.getDeployment().getDeploymentInfo().getDefaultAsyncConextTimeout()) {
+ if(previousAsyncContext!=null && previousAsyncContext.getTimeout() != servletRequestContext.getDeployment().getDeploymentInfo().getDefaultAsyncContextTimeout()) {
this.timeout = previousAsyncContext.getTimeout();
} else {
- this.timeout = servletRequestContext.getDeployment().getDeploymentInfo().getDefaultAsyncConextTimeout();
+ this.timeout = servletRequestContext.getDeployment().getDeploymentInfo().getDefaultAsyncContextTimeout();
}
}
From e9c4ed891ba910e557ce8ee1491d57635cfe6a22 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Richard=20Op=C3=A1lka?=
Date: Wed, 4 Dec 2024 12:29:37 +0100
Subject: [PATCH 2/4] [UNDERTOW-2321] Document new commonv pattern in accesslog
handler
---
.../server/handlers/accesslog/AccessLogHandler.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/core/src/main/java/io/undertow/server/handlers/accesslog/AccessLogHandler.java b/core/src/main/java/io/undertow/server/handlers/accesslog/AccessLogHandler.java
index e7693d29af..acce2d0ddc 100644
--- a/core/src/main/java/io/undertow/server/handlers/accesslog/AccessLogHandler.java
+++ b/core/src/main/java/io/undertow/server/handlers/accesslog/AccessLogHandler.java
@@ -72,11 +72,10 @@
* commonly utilized patterns:
*
* - common -
%h %l %u %t "%r" %s %b
- * - combined -
- *
%h %l %u %t "%r" %s %b "%{i,Referer}" "%{i,User-Agent}"
+ * - commonv -
%h %l %u %t "%r" %s %b %T "%I"
+ * - combined -
%h %l %u %t "%r" %s %b "%{i,Referer}" "%{i,User-Agent}"
* - commonobf -
%o %l %u %t "%r" %s %b
- * - combinedobf -
- *
%o %l %u %t "%r" %s %b "%{i,Referer}" "%{i,User-Agent}"
+ * - combinedobf -
%o %l %u %t "%r" %s %b "%{i,Referer}" "%{i,User-Agent}"
*
*
*
From 3406e21d9de613312c362964044d9030b334a61a Mon Sep 17 00:00:00 2001
From: "James R. Perkins"
Date: Tue, 3 Dec 2024 13:47:47 -0800
Subject: [PATCH 3/4] Use the maven.compiler.release property to set the
release version.
Signed-off-by: James R. Perkins
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index cc0adceb55..9924e6beaf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,8 +105,9 @@
5.1.1
1.21
- 11
- 11
+ 11
+ ${maven.compiler.release}
+ ${maven.compiler.release}
true
false
false
@@ -182,7 +183,6 @@
org.apache.maven.plugins
maven-compiler-plugin
- ${version.compiler.plugin}
true
From 4a2941dbbcd7053f9baa6aa0bacc27e22bef28eb Mon Sep 17 00:00:00 2001
From: "James R. Perkins"
Date: Fri, 3 Jan 2025 13:11:57 -0800
Subject: [PATCH 4/4] Upgrade some actions and do some cleanup of the CI
workflow. Disable the javaXX-test-classpath profile as it causes issues with
the io.undertow.servlet.test.dispatcher.DispatcherForwardTestCase test.
Signed-off-by: James R. Perkins
---
.github/workflows/ci.yml | 60 ++++++++++++----------------------------
1 file changed, 18 insertions(+), 42 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fd61ce495e..969cb3ddb5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,34 +8,25 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
+# Only run the latest job
+concurrency:
+ group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
+ cancel-in-progress: true
+
jobs:
build-all:
name: Compile (no tests) with JDK 11
runs-on: ubuntu-latest
steps:
- - uses: n1hility/cancel-previous-runs@v2
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- - uses: actions/cache@v1
- with:
- path: ~/.m2/repository
- key: m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- m2-
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Set up JDK 11
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- - name: Generate settings.xml for Maven Builds
- uses: whelk-io/maven-settings-xml-action@v20
- with:
- repositories: '[{ "id": "jboss", "name": "JBoss", "url": "https://repository.jboss.org/nexus/content/groups/public" }]'
- - name: Print Version
- run: mvn -v
+ cache: 'maven'
- name: Build
- run: mvn -U -B -fae -DskipTests -Dfindbugs clean install
+ run: mvn -V -U -B -fae -DskipTests -Dfindbugs clean install
- name: Tar Maven Repo
shell: bash
run: tar -czf maven-repo.tgz -C ~ .m2/repository
@@ -77,13 +68,10 @@ jobs:
echo '127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4' > %SystemRoot%\System32\drivers\etc\hosts
echo '::1 localhost localhost.localdomain localhost6 localhost6.localdomain6' >> %SystemRoot%\System32\drivers\etc\hosts
shell: cmd
- - uses: n1hility/cancel-previous-runs@v2
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- name: Host information
run: |
hostname || true
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Download Maven Repo
uses: actions/download-artifact@v4
with:
@@ -93,18 +81,13 @@ jobs:
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: ${{ matrix.openjdk_impl }}
java-version: ${{ matrix.jdk }}
- - name: Generate settings.xml for Maven Builds
- uses: whelk-io/maven-settings-xml-action@v20
- with:
- repositories: '[{ "id": "jboss", "name": "JBoss", "url": "https://repository.jboss.org/nexus/content/groups/public" }]'
- - name: Print Version
- run: mvn -v
+ cache: 'maven'
- name: Run Tests
- run: mvn -U -B -fae test -Pproxy '-DfailIfNoTests=false' -pl ${{ matrix.module }}
+ run: mvn -V -U -B -fae test -Pproxy '-DfailIfNoTests=false' -pl ${{ matrix.module }} '-P-java${{ matrix.jdk }}-test-classpath'
- uses: actions/upload-artifact@v4
if: failure()
with:
@@ -130,13 +113,10 @@ jobs:
sudo bash -c "echo '127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4' > /etc/hosts"
sudo bash -c "echo '::1 localhost localhost.localdomain localhost6 localhost6.localdomain6' >> /etc/hosts"
sudo sysctl -w fs.file-max=2097152
- - uses: n1hility/cancel-previous-runs@v2
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- name: Host information
run: |
hostname || true
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Download Maven Repo
uses: actions/download-artifact@v4
with:
@@ -146,17 +126,13 @@ jobs:
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Set up JDK ${{ matrix.java }}
- uses: joschi/setup-jdk@v2
+ uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
- - name: Generate settings.xml for Maven Builds
- uses: whelk-io/maven-settings-xml-action@v20
- with:
- repositories: '[{ "id": "jboss", "name": "JBoss", "url": "https://repository.jboss.org/nexus/content/groups/public" }]'
- - name: Print Version
- run: mvn -v
+ distribution: 'temurin'
+ cache: 'maven'
- name: Run Tests
- run: mvn -U -B -fae test ${{ matrix.proxy }} '-DfailIfNoTests=false' -pl ${{ matrix.module }} -Dtest.ipv6=true
+ run: mvn -V -U -B -fae test ${{ matrix.proxy }} '-DfailIfNoTests=false' -pl ${{ matrix.module }} -Dtest.ipv6=true '-P-java${{ matrix.jdk }}-test-classpath'
- uses: actions/upload-artifact@v4
if: failure()
with: