Compare commits
5 Commits
6cba4d24bb
...
0.3.4
Author | SHA1 | Date | |
---|---|---|---|
ce8e93f9d5
|
|||
94021d94c3
|
|||
b3c6f29c0f
|
|||
ce7e5bb4a0
|
|||
aeae98d9eb
|
@@ -5,7 +5,7 @@ on:
|
|||||||
- '*'
|
- '*'
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: woryzen
|
runs-on: hostinger
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@@ -46,6 +46,7 @@ allprojects { subproject ->
|
|||||||
testImplementation catalog.junit.jupiter.api
|
testImplementation catalog.junit.jupiter.api
|
||||||
testImplementation catalog.junit.jupiter.params
|
testImplementation catalog.junit.jupiter.params
|
||||||
testRuntimeOnly catalog.junit.jupiter.engine
|
testRuntimeOnly catalog.junit.jupiter.engine
|
||||||
|
testRuntimeOnly catalog.junit.platform.launcher
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
@@ -2,9 +2,9 @@ org.gradle.configuration-cache=false
|
|||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
|
|
||||||
rbcs.version = 0.3.1
|
rbcs.version = 0.3.4
|
||||||
|
|
||||||
lys.version = 2025.06.10
|
lys.version = 2025.09.30
|
||||||
|
|
||||||
gitea.maven.url = https://gitea.woggioni.net/api/packages/woggioni/maven
|
gitea.maven.url = https://gitea.woggioni.net/api/packages/woggioni/maven
|
||||||
docker.registry.url=gitea.woggioni.net
|
docker.registry.url=gitea.woggioni.net
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
6
gradlew
vendored
6
gradlew
vendored
@@ -114,7 +114,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@@ -205,7 +205,7 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
4
gradlew.bat
vendored
4
gradlew.bat
vendored
@@ -70,11 +70,11 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
@@ -12,6 +12,7 @@ import org.junit.jupiter.params.ParameterizedTest
|
|||||||
import org.junit.jupiter.params.provider.Arguments
|
import org.junit.jupiter.params.provider.Arguments
|
||||||
import org.junit.jupiter.params.provider.ArgumentsProvider
|
import org.junit.jupiter.params.provider.ArgumentsProvider
|
||||||
import org.junit.jupiter.params.provider.ArgumentsSource
|
import org.junit.jupiter.params.provider.ArgumentsSource
|
||||||
|
import org.junit.jupiter.params.support.ParameterDeclarations
|
||||||
|
|
||||||
class RetryTest {
|
class RetryTest {
|
||||||
|
|
||||||
@@ -23,7 +24,10 @@ class RetryTest {
|
|||||||
)
|
)
|
||||||
|
|
||||||
class TestArguments : ArgumentsProvider {
|
class TestArguments : ArgumentsProvider {
|
||||||
override fun provideArguments(context: ExtensionContext): Stream<out Arguments> {
|
override fun provideArguments(
|
||||||
|
parameters: ParameterDeclarations,
|
||||||
|
context: ExtensionContext
|
||||||
|
): Stream<out Arguments> {
|
||||||
return Stream.of(
|
return Stream.of(
|
||||||
TestArgs(
|
TestArgs(
|
||||||
seed = 101325,
|
seed = 101325,
|
||||||
|
@@ -19,6 +19,8 @@ to `memcacheCacheType`.
|
|||||||
|
|
||||||
The plugins currently supports the following configuration attributes:
|
The plugins currently supports the following configuration attributes:
|
||||||
- `max-age`: the amount of time cache entries will be retained on memcache
|
- `max-age`: the amount of time cache entries will be retained on memcache
|
||||||
|
- `key-prefix`: a string that will be prepended to all the keys inserted in memcache,
|
||||||
|
useful in case the caching backend is shared with other applications
|
||||||
- `digest`: digest algorithm to use on the key before submission
|
- `digest`: digest algorithm to use on the key before submission
|
||||||
to memcache (optional, no digest is applied if omitted)
|
to memcache (optional, no digest is applied if omitted)
|
||||||
- `compression`: compression algorithm to apply to cache values before,
|
- `compression`: compression algorithm to apply to cache values before,
|
||||||
@@ -35,6 +37,7 @@ The plugins currently supports the following configuration attributes:
|
|||||||
...
|
...
|
||||||
<cache xs:type="rbcs-memcache:memcacheCacheType"
|
<cache xs:type="rbcs-memcache:memcacheCacheType"
|
||||||
max-age="P7D"
|
max-age="P7D"
|
||||||
|
key-prefix="rbcs-"
|
||||||
digest="SHA-256"
|
digest="SHA-256"
|
||||||
compression-mode="deflate"
|
compression-mode="deflate"
|
||||||
compression-level="6">
|
compression-level="6">
|
||||||
|
@@ -345,7 +345,7 @@ class RemoteBuildCacheServer(private val cfg: Configuration) {
|
|||||||
maxChunkSize = cfg.connection.chunkSize
|
maxChunkSize = cfg.connection.chunkSize
|
||||||
}
|
}
|
||||||
pipeline.addLast(HttpServerCodec(httpDecoderConfig))
|
pipeline.addLast(HttpServerCodec(httpDecoderConfig))
|
||||||
pipeline.addLast(ReadTriggerDuplexHandler.NAME, ReadTriggerDuplexHandler)
|
pipeline.addLast(ReadTriggerDuplexHandler.NAME, ReadTriggerDuplexHandler())
|
||||||
pipeline.addLast(MaxRequestSizeHandler.NAME, MaxRequestSizeHandler(cfg.connection.maxRequestSize))
|
pipeline.addLast(MaxRequestSizeHandler.NAME, MaxRequestSizeHandler(cfg.connection.maxRequestSize))
|
||||||
pipeline.addLast(HttpChunkContentCompressor(1024))
|
pipeline.addLast(HttpChunkContentCompressor(1024))
|
||||||
pipeline.addLast(ChunkedWriteHandler())
|
pipeline.addLast(ChunkedWriteHandler())
|
||||||
|
@@ -1,23 +1,43 @@
|
|||||||
package net.woggioni.rbcs.server.handler
|
package net.woggioni.rbcs.server.handler
|
||||||
|
|
||||||
|
import io.netty.buffer.ByteBufHolder
|
||||||
import io.netty.channel.ChannelDuplexHandler
|
import io.netty.channel.ChannelDuplexHandler
|
||||||
import io.netty.channel.ChannelHandler.Sharable
|
|
||||||
import io.netty.channel.ChannelHandlerContext
|
import io.netty.channel.ChannelHandlerContext
|
||||||
import io.netty.channel.ChannelPromise
|
import io.netty.channel.ChannelPromise
|
||||||
import io.netty.handler.codec.http.LastHttpContent
|
import io.netty.handler.codec.http.LastHttpContent
|
||||||
|
import net.woggioni.rbcs.common.createLogger
|
||||||
|
|
||||||
@Sharable
|
class ReadTriggerDuplexHandler : ChannelDuplexHandler() {
|
||||||
object ReadTriggerDuplexHandler : ChannelDuplexHandler() {
|
companion object {
|
||||||
val NAME = ReadTriggerDuplexHandler::class.java.name
|
val NAME = ReadTriggerDuplexHandler::class.java.name
|
||||||
|
private val log = createLogger<ReadTriggerDuplexHandler>()
|
||||||
|
}
|
||||||
|
|
||||||
|
private var inFlight = 0
|
||||||
|
private val messageBuffer = ArrayDeque<Any>()
|
||||||
|
|
||||||
override fun handlerAdded(ctx: ChannelHandlerContext) {
|
override fun handlerAdded(ctx: ChannelHandlerContext) {
|
||||||
ctx.read()
|
ctx.read()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun channelRead(ctx: ChannelHandlerContext, msg: Any) {
|
override fun channelRead(ctx: ChannelHandlerContext, msg: Any) {
|
||||||
super.channelRead(ctx, msg)
|
if(inFlight > 0) {
|
||||||
if(msg !is LastHttpContent) {
|
messageBuffer.addLast(msg)
|
||||||
|
} else {
|
||||||
|
super.channelRead(ctx, msg)
|
||||||
|
if(msg !is LastHttpContent) {
|
||||||
|
invokeRead(ctx)
|
||||||
|
} else {
|
||||||
|
inFlight += 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun invokeRead(ctx : ChannelHandlerContext) {
|
||||||
|
if(messageBuffer.isEmpty()) {
|
||||||
ctx.read()
|
ctx.read()
|
||||||
|
} else {
|
||||||
|
this.channelRead(ctx, messageBuffer.removeFirst())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,7 +48,18 @@ object ReadTriggerDuplexHandler : ChannelDuplexHandler() {
|
|||||||
) {
|
) {
|
||||||
super.write(ctx, msg, promise)
|
super.write(ctx, msg, promise)
|
||||||
if(msg is LastHttpContent) {
|
if(msg is LastHttpContent) {
|
||||||
ctx.read()
|
inFlight -= 1
|
||||||
|
invokeRead(ctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun channelInactive(ctx: ChannelHandlerContext) {
|
||||||
|
while(messageBuffer.isNotEmpty()) {
|
||||||
|
val msg = messageBuffer.removeFirst()
|
||||||
|
if(msg is ByteBufHolder) {
|
||||||
|
msg.release()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.channelInactive(ctx)
|
||||||
|
}
|
||||||
}
|
}
|
@@ -1,5 +1,16 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
|
// mavenLocal {
|
||||||
|
// content {
|
||||||
|
// includeGroup 'net.woggioni.gradle'
|
||||||
|
// includeGroup 'net.woggioni.gradle.jpms-check'
|
||||||
|
// includeGroup 'net.woggioni.gradle.lombok'
|
||||||
|
// includeGroup 'net.woggioni.gradle.jdeps'
|
||||||
|
// includeGroup 'net.woggioni.gradle.sambal'
|
||||||
|
// includeGroup 'net.woggioni.gradle.graalvm.jlink'
|
||||||
|
// includeGroup 'net.woggioni.gradle.graalvm.native-image'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
maven {
|
maven {
|
||||||
url = getProperty('gitea.maven.url')
|
url = getProperty('gitea.maven.url')
|
||||||
}
|
}
|
||||||
@@ -19,6 +30,8 @@ dependencyResolutionManagement {
|
|||||||
versionCatalogs {
|
versionCatalogs {
|
||||||
catalog {
|
catalog {
|
||||||
from group: 'com.lys', name: 'lys-catalog', version: getProperty('lys.version')
|
from group: 'com.lys', name: 'lys-catalog', version: getProperty('lys.version')
|
||||||
|
// version('my-gradle-plugins', '2025.04.16')
|
||||||
|
// version('junit', '5.12.0')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,3 +46,4 @@ include 'rbcs-client'
|
|||||||
include 'rbcs-server'
|
include 'rbcs-server'
|
||||||
include 'rbcs-servlet'
|
include 'rbcs-servlet'
|
||||||
include 'docker'
|
include 'docker'
|
||||||
|
//include 'bug'
|
Reference in New Issue
Block a user