Oliver
02/24/2024, 6:34 PMQuery
action has a Select
parameter of the corresponding enum type, whereas in the Scan
action the Select
parameter is just a string. I suppose that's an oversight, since the same set of values can be used for both actions. Are there any concerns in changing the type in Scan
also to the Select
enum (even if this would be an incompatible change)?Oliver
02/24/2024, 7:03 PMCount
and ScannedCount
elements are always returned. So why are they optional in the corresponding classes QueryResponse
and ScanResponse
? (Background: I would like to add a count
convenience function to the DynamoDbIndexMapper
.)Tamara
02/27/2024, 3:37 PMCosmin Marginean
02/29/2024, 12:28 PMEnvironment
from a .yaml
in the classpath, but I see there's only Environment.fromYaml(file: File)
and classpath support can only be used for .properties
files.
Is there a way to do this that I might be missing?Andrew O'Hara
02/29/2024, 6:57 PMjetty11
fallback saved me again. I have hundreds of thousands of IOT devices hitting a config server, and for some reason, they didn't like something in the jetty12 response (even with an ELB in the way) and began DDOSing us with their retries. No idea why the devices didn't like the jetty 12 response, but based on what I know of the manufacturer, I'm inclined to believe it's more of a device problem then a jetty problem 🙃.Dmitry Kandalov
03/01/2024, 11:24 AMroutes()
which chooses the first matching handler? Or is it the wrong thing to do anyway?
For the context I’m profiling a simple http4k app (with get/set endpoints) and can see that OrRouter
takes about 5% of time. Wondering if there is an easy way to make it ~0% 😅Dmitry Kandalov
03/01/2024, 1:18 PMOAuthPersistence
? I can see there is FakeOAuthPersistence
and InsecureCookieBasedOAuthPersistence
but it’s not too clear to me what a real implementation should do blob smile Or FakeOAuthPersistence
and CustomOAuthPersistence
are good enough?Cosmin Marginean
03/01/2024, 3:45 PMMarco Garofalo
03/04/2024, 9:01 AMMarco Garofalo
03/07/2024, 2:07 PMMrNiamh
03/09/2024, 4:03 PMAdrian Witaszak
03/14/2024, 8:19 PMAPIGatewayV2HTTPEvent
in the FnHandler
but getting Reflection errorzed
03/15/2024, 9:45 AM“-XX:+UseParallelGC -XX:ActiveProcessorCount=2 -XX:MaxRAMPercentage=65.0 -XX:MinRAMPercentage=60.0”
• Http4k: 5.14.0.0
• Server: Undertow (but also netty)
• ~30 requests / second
• AWS, Kubernetes:
◦ requests: { memory: 1720Mi, cpu: 500m }
◦ limits: { memory: 1720Mi, cpu: 2000m }
Observations:
• When overall CPU usage starts to increase, minor GC usage completely stopped.
• Self-healing effect (over ~12 hours).
• Response time increases massively in the “explosion” phase (currently we have a timeout of 10s on client side).elect
03/16/2024, 7:26 AMelect
03/18/2024, 10:42 AM-d '{"ref":"refs/heads/featureA","sha":"aa218f56b14c9653891f9e74264a383fa43fefbd"}'
Andrew O'Hara
03/21/2024, 4:02 PMandyg
03/21/2024, 6:48 PMAndrew O'Hara
03/21/2024, 8:07 PMhttp4k-testing-chaos
to test a retry loop. Basically I want to make it so the first request fails and then succeeds every time after. But what seems to happen is the Behaviour
(yay for British and Canadian English overlap!) gets called once during the first request, and twice during the second request. So I can't properly test the number of times my server is called. Am I doing this wrong? Or is there a http4k-testing-chaos
bug?
@Test
fun foo() {
val server = object: ChaoticHttpHandler() {
override val app: HttpHandler = { Response(Status.OK).body("foo") }
}
var requestCount = 0
server.misbehave(object: Behaviour() {
override fun invoke(next: HttpHandler): HttpHandler = {
requestCount += 1
if (requestCount == 1) {
Response(Status.INTERNAL_SERVER_ERROR)
} else {
next(it)
}
}
})
var attempts = 0
do {
attempts += 1
val response = server(Request(Method.GET, ""))
} while(!response.status.successful)
attempts shouldBe 2
requestCount shouldBe 2
}
The attempts
test passes, but requestCount
is actually 3Tamara
03/22/2024, 4:21 PMMarco Garofalo
03/25/2024, 11:05 AMAndrew O'Hara
03/26/2024, 1:47 PMJohannes Wirde
03/29/2024, 9:39 PMError: Main method not found in class com.example.HelloWorldKt, please define the main method as:
public static void main(String[] args)
... and that is yucky Java stuff... What should I put in my fun main()
function?Dmitry Kandalov
04/03/2024, 4:23 PMLogAllExceptionsFilter
needs to log the current user which is added by AuthenticationFilter
, then how do you make sure exceptions thrown by AuthenticationFilter
are handled properly? I mean if AuthenticationFilter
comes first, its exceptions are not handled by LogAllExceptionsFilter
. If LogAllExceptionsFilter
comes first, it won’t have the current user.Andrew O'Hara
04/04/2024, 2:54 PMfastInternet
and slowInternet
into my application, but I dislike this approach, and desire even greater flexibility. I know that resilience4j has the time limiter, but I'm unsure if it would gracefully cleanup the connections as well as the HTTP client implementation would.Johannes Wirde
04/13/2024, 7:30 AMhere▾
here▾
Johannes Wirde
04/14/2024, 7:34 AMJohannes Wirde
04/14/2024, 2:01 PM