Repository navigation
fix(kubernetes): allow extra Keycloak env vars, disable the gzip resource encoder in e2e/dev - #7429
Conversation
…n e2e/dev Add `keycloakExtraEnv`, a list of Kubernetes EnvVar objects appended to the Keycloak container's env. Use it in values_e2e_and_dev.yaml to set KC_SPI_THEME_CACHE_THEMES=false. With theme caching on, Keycloak gzips each theme asset into data/tmp/kc-gzip-cache on its first request. Concurrent first requests for the same asset race (unlocked exists() check, then a non-atomic Files.move with REPLACE_EXISTING), and the loser gets a FileNotFoundException that Keycloak turns into a 404. In CI this breaks the parallel logins at the start of the cli job. With theme caching off Keycloak serves assets directly and never writes the gzip cache. Production values are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGPjaZYeyyUnPSHeDUrvtX
|
This PR may be related to: #5426 (flaky CLI integration test due to Keycloak theme asset serving issue, opened the same day this fix landed). |
…ache in e2e/dev Turning off the gzip provider removes only the racing component; theme and template caching stay on, so CI stays closer to production. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Claude finished @corneliusroemer's task in 23s —— View job ReviewThe change is small and correct, and I have no code issues to flag inline. I read the template by eye; I couldn't run Template (
Schema (
Workaround (
PR description (only needs a wording fix)
Tests and docs: there's nothing to add beyond the schema description. The e2e CI run is the real test of whether the flake goes away. LGTM. |
tombch
left a comment
There was a problem hiding this comment.
Otherwise looks good to me!
maverbiest
left a comment
There was a problem hiding this comment.
This looks great! Would be nice to get merged, I ran into this failure mode couple of times today when running CI :)
|
@maverbiest I updated with @tombch's docs suggestion - as Cornelius is on vacay feel free to merge this if all tests pass :-) |
The integration-test job flaked multiple times on a console
404for a Keycloak theme asset (:8083/resources/<version>/login/loculus/…js) during login, causing the login form to never render. Between 09-23 and 09-27 it hit 5 job-attempts on 4 unrelated branches.This is a race (bug) in Keycloak itself: keycloak/keycloak#53238 which I reported today.
KC_SPI_RESOURCE_ENCODING_GZIP_ENABLED=falseis a narrow workaround for the bug. It only disables gzip encoding of theme files which should not have any impact on test correctness.What changes
A new
keycloakExtraEnvvalue: a list of KubernetesEnvVarobjects appended to the Keycloak container'senv.values_e2e_and_dev.yamluses it to setKC_SPI_RESOURCE_ENCODING_GZIP_ENABLED=false. With the default values the rendered manifests are byte-identical tomain, so production keeps gzip encoding of theme resources.https://claude.ai/code/session_01KGPjaZYeyyUnPSHeDUrvtX
🚀 Preview: Add
previewlabel to enable