Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-By…
Browse files Browse the repository at this point in the history
…teAccumulator
  • Loading branch information
lachlan-roberts committed Dec 15, 2020
2 parents 8b3cffb + 25ddd6e commit 41cffa0
Show file tree
Hide file tree
Showing 53 changed files with 214 additions and 467 deletions.
29 changes: 13 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ pipeline {
steps {
container('jetty-build') {
timeout( time: 240, unit: 'MINUTES' ) {
mavenBuild( "jdk8", "clean install", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
mavenBuild( "jdk8", "clean install", "maven3")
// Collect up the jacoco execution results (only on main build)
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
exclusionPattern: '' +
Expand All @@ -32,6 +31,7 @@ pipeline {
execPattern: '**/target/jacoco.exec',
classPattern: '**/target/classes',
sourcePattern: '**/src/main/java'
recordIssues id: "jdk8", name: "Static Analysis jdk8", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]
}
}
}
Expand All @@ -42,8 +42,8 @@ pipeline {
steps {
container( 'jetty-build' ) {
timeout( time: 240, unit: 'MINUTES' ) {
mavenBuild( "jdk11", "clean install -Djacoco.skip=true", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
mavenBuild( "jdk11", "clean install -Djacoco.skip=true -Perrorprone", "maven3")
recordIssues id: "jdk11", name: "Static Analysis jdk11", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser(), errorProne()]
}
}
}
Expand All @@ -54,8 +54,8 @@ pipeline {
steps {
container( 'jetty-build' ) {
timeout( time: 240, unit: 'MINUTES' ) {
mavenBuild( "jdk15", "clean install -Djacoco.skip=true", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
mavenBuild( "jdk15", "clean install -Djacoco.skip=true", "maven3")
recordIssues id: "jdk15", name: "Static Analysis jdk15", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]
}
}
}
Expand All @@ -65,10 +65,11 @@ pipeline {
agent { node { label 'linux' } }
steps {
container( 'jetty-build' ) {
timeout( time: 60, unit: 'MINUTES' ) {
timeout( time: 120, unit: 'MINUTES' ) {
mavenBuild( "jdk11",
"install javadoc:javadoc javadoc:aggregate-jar -DskipTests -Dpmd.skip=true -Dcheckstyle.skip=true",
"maven3", [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']])
"maven3")
recordIssues id: "javadoc", enabledForFailure: true, tools: [javaDoc()]
}
}
}
Expand All @@ -78,9 +79,8 @@ pipeline {
agent { node { label 'linux' } }
steps {
container( 'jetty-build' ) {
timeout( time: 60, unit: 'MINUTES' ) {
mavenBuild( "jdk8", "-Pcompact3 clean install -DskipTests", "maven3",
[[parserName: 'Maven'], [parserName: 'Java']])
timeout( time: 120, unit: 'MINUTES' ) {
mavenBuild( "jdk8", "-Pcompact3 clean install -DskipTests", "maven3")
}
}
}
Expand Down Expand Up @@ -130,24 +130,21 @@ def slackNotif() {
* @param cmdline the command line in "<profiles> <goals> <properties>"`format.
* @param consoleParsers array of console parsers to run
*/
def mavenBuild(jdk, cmdline, mvnName, consoleParsers) {
def mavenBuild(jdk, cmdline, mvnName) {
script {
try {
withEnv(["JAVA_HOME=${ tool "$jdk" }",
"PATH+MAVEN=${env.JAVA_HOME}/bin:${tool "$mvnName"}/bin",
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
configFileProvider(
[configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) {
sh "mvn -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=/tmp/unixsocket"
sh "mvn --no-transfer-progress -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=/tmp/unixsocket"
}
}
}
finally
{
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml', allowEmptyResults: true
if(consoleParsers!=null){
warnings consoleParsers: consoleParsers
}
}
}
}
Expand Down
9 changes: 1 addition & 8 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<properties>
<sonar.skip>true</sonar.skip>
<spotbugs.skip>true</spotbugs.skip>
</properties>

<build>
Expand All @@ -26,14 +27,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<!-- No Point running Findbugs on example projects -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
8 changes: 1 addition & 7 deletions jetty-alpn/jetty-alpn-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<name>Jetty :: ALPN :: Client</name>
<properties>
<bundle-symbolic-name>${project.groupId}.alpn.client</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.alpn.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
Expand Down Expand Up @@ -36,13 +37,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.alpn.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
8 changes: 1 addition & 7 deletions jetty-alpn/jetty-alpn-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<name>Jetty :: ALPN :: Server</name>
<properties>
<bundle-symbolic-name>${project.groupId}.alpn.server</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.alpn.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
Expand All @@ -18,13 +19,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.alpn.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
8 changes: 1 addition & 7 deletions jetty-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<description>Annotation support for deploying servlets in jetty.</description>
<properties>
<bundle-symbolic-name>${project.groupId}.annotations</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.annotations.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
Expand All @@ -24,13 +25,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.annotations.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
8 changes: 1 addition & 7 deletions jetty-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@
<properties>
<bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name>
<jetty.test.policy.loc>target/test-policy</jetty.test.policy.loc>
<spotbugs.onlyAnalyze>org.eclipse.client.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.client.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand Down
8 changes: 1 addition & 7 deletions jetty-continuation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@
<description>Asynchronous API</description>
<properties>
<bundle-symbolic-name>${project.groupId}.continuation</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.continuation.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.continuation.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
12 changes: 1 addition & 11 deletions jetty-deploy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,8 @@
<description>Jetty deployers</description>
<properties>
<bundle-symbolic-name>${project.groupId}.deploy</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.deploy.*</spotbugs.onlyAnalyze>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.deploy.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
Expand Down
9 changes: 1 addition & 8 deletions jetty-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<properties>
<assembly-directory>${basedir}/target/distribution</assembly-directory>
<home-directory>${basedir}/target/home</home-directory>
<spotbugs.skip>true</spotbugs.skip>
</properties>

<build>
Expand Down Expand Up @@ -384,14 +385,6 @@
<skip>true</skip>
</configuration>
</plugin>
<!-- No point performing Findbugs in assembly project -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
9 changes: 1 addition & 8 deletions jetty-home/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<assembly-directory>${basedir}/target/jetty-home</assembly-directory>
<source-assembly-directory>${basedir}/target/jetty-home-sources</source-assembly-directory>
<jetty-setuid-version>1.0.4</jetty-setuid-version>
<spotbugs.skip>true</spotbugs.skip>
</properties>

<build>
Expand Down Expand Up @@ -538,14 +539,6 @@
<skip>true</skip>
</configuration>
</plugin>
<!-- No point performing Findbugs in assembly project -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
8 changes: 1 addition & 7 deletions jetty-http-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<name>Jetty :: Http Service Provider Interface</name>
<properties>
<bundle-symbolic-name>${project.groupId}.http.spi</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.http.spi.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -37,13 +38,6 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.http.spi.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
8 changes: 1 addition & 7 deletions jetty-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<name>Jetty :: Http Utility</name>
<properties>
<bundle-symbolic-name>${project.groupId}.http</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.http.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -58,13 +59,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.http.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ public class HTTP2Client extends ContainerLifeCycle
private int maxFrameLength = Frame.DEFAULT_MAX_LENGTH;
private int maxConcurrentPushedStreams = 32;
private int maxSettingsKeys = SettingsFrame.DEFAULT_MAX_KEYS;
private int maxDynamicTableSize = 4096;
private int maxHeaderBlockFragment = 0;
private FlowControlStrategy.Factory flowControlStrategyFactory = () -> new BufferingFlowControlStrategy(0.5F);

@Override
Expand Down Expand Up @@ -372,6 +374,28 @@ public void setMaxSettingsKeys(int maxSettingsKeys)
this.maxSettingsKeys = maxSettingsKeys;
}

@ManagedAttribute("The HPACK dynamic table maximum size")
public int getMaxDynamicTableSize()
{
return maxDynamicTableSize;
}

public void setMaxDynamicTableSize(int maxDynamicTableSize)
{
this.maxDynamicTableSize = maxDynamicTableSize;
}

@ManagedAttribute("The max size of header block fragments")
public int getMaxHeaderBlockFragment()
{
return maxHeaderBlockFragment;
}

public void setMaxHeaderBlockFragment(int maxHeaderBlockFragment)
{
this.maxHeaderBlockFragment = maxHeaderBlockFragment;
}

public void connect(InetSocketAddress address, Session.Listener listener, Promise<Session> promise)
{
connect(null, address, listener, promise);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Connection newConnection(EndPoint endPoint, Map<String, Object> context)
@SuppressWarnings("unchecked")
Promise<Session> promise = (Promise<Session>)context.get(SESSION_PROMISE_CONTEXT_KEY);

Generator generator = new Generator(byteBufferPool);
Generator generator = new Generator(byteBufferPool, client.getMaxDynamicTableSize(), client.getMaxHeaderBlockFragment());
FlowControlStrategy flowControl = client.getFlowControlStrategyFactory().newFlowControlStrategy();
HTTP2ClientSession session = new HTTP2ClientSession(scheduler, endPoint, generator, listener, flowControl);
session.setMaxRemoteStreams(client.getMaxConcurrentPushedStreams());
Expand Down
12 changes: 1 addition & 11 deletions jetty-io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<name>Jetty :: IO Utility</name>
<properties>
<bundle-symbolic-name>${project.groupId}.io</bundle-symbolic-name>
<spotbugs.onlyAnalyze>org.eclipse.jetty.io.*</spotbugs.onlyAnalyze>
</properties>
<dependencies>
<dependency>
Expand All @@ -23,15 +24,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<onlyAnalyze>org.eclipse.jetty.io.*</onlyAnalyze>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 41cffa0

Please sign in to comment.