Skip to content

fix: temp directory refinements#48608

Open
shawkins wants to merge 1 commit intokeycloak:mainfrom
shawkins:iss48566
Open

fix: temp directory refinements#48608
shawkins wants to merge 1 commit intokeycloak:mainfrom
shawkins:iss48566

Conversation

@shawkins
Copy link
Copy Markdown
Contributor

closes: #48566

  • moves temp directory initialization to startup, rather than the KeycloakApplication constructor - so there is nothing happening at buildtime
  • does not attempt to create the directory, as usage of this method performs mkdirs as necessary.
  • adds the path to the gzip warning
  • further clarified the expectation that KeycloakApplications are to provide data directories.

closes: keycloak#48566

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors temporary-directory handling so it is initialized during application startup instead of construction/build-time, and aligns the temp path with each application's data directory setup.

Changes:

  • Moves kc.io.tmpdir initialization from KeycloakApplication construction into startup().
  • Updates Quarkus and RESTEasy test applications to source temp/data paths from their data-directory configuration.
  • Improves gzip cache directory warning output and adjusts testsuite data-dir bootstrapping.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java Changes how the embedded testsuite server derives its data directory.
services/src/test/java/org/keycloak/services/resteasy/ResteasyKeycloakApplication.java Switches the RESTEasy test app to use jboss.server.data.dir as its data dir.
services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java Moves temp-dir initialization to startup and removes the fallback in getTmpDirectory().
services/src/main/java/org/keycloak/encoding/GzipResourceEncodingProviderFactory.java Tweaks gzip cache directory creation and warning logging.
quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/integration/jaxrs/QuarkusKeycloakApplication.java Changes Quarkus data-dir fallback behavior when kc.home.dir is missing.

@shawkins
Copy link
Copy Markdown
Contributor Author

shawkins commented May 7, 2026

Let's wait for #48733 to go in first (which will fix this on main), then reasses the refinements here.

Copy link
Copy Markdown
Contributor

@vmuzikar vmuzikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@vmuzikar vmuzikar added the status/hold PR should not be merged. On hold for later. label May 7, 2026
@vmuzikar
Copy link
Copy Markdown
Contributor

vmuzikar commented May 7, 2026

Adding hold label to wait for #48733.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin console assets 404 in 26.6.x: quay.io/keycloak/keycloak:26.6 ships /opt/keycloak/data/tmp as root:root 0755, blocking gzip cache creation

3 participants