Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-1675

[GHI#29761] bug: disabling all default features no longer works

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Before reporting an issue

      [X] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

      Area

      core

      Describe the bug

      The docs suggest you can disable all default features, then opt back in to just the ones you want by passing in default as the value for --features-disabled:

      > You can disable all default features by entering this command:
      > ```
      > bin/kc.[sh|bat] build --features-disabled="default"
      > ```

      However, this does not appear to work. For example, this Dockerfile fails to build:

      ```Dockerfile
      FROM quay.io/keycloak/keycloak:nightly
      ENV KC_FEATURES=admin-api,admin2,authorization,impersonation
      RUN /opt/keycloak/bin/kc.sh build --features-disabled="default"
      ```

      With this error:

      ```
      [+] Building 37.0s (5/5) FINISHED docker:colima
      => [internal] load build definition from Dockerfile 0.0s
      => => transferring dockerfile: 608B 0.0s
      => [internal] load .dockerignore 0.0s
      => => transferring context: 2B 0.0s
      => [internal] load metadata for quay.io/keycloak/keycloak:nightly 1.3s
      => [1/2] FROM quay.io/keycloak/keycloak:nightly@sha256:d5c6e2ce6bafb8ace2cffdc8ad0515f 30.1s
      => => resolve quay.io/keycloak/keycloak:nightly@sha256:d5c6e2ce6bafb8ace2cffdc8ad0515fa 0.0s
      => => sha256:bfaeee6a3aa8c8ee215b9fd755d8afb5107f175cf09e1a517dad1b0abdce7d 550B / 550B 0.6s
      => => sha256:d5c6e2ce6bafb8ace2cffdc8ad0515fa450fefe8b85f06b8170aca1d4c 1.61kB / 1.61kB 0.0s
      => => sha256:d6867bb09bb51a7f104bb8183419a0da33547c18dafe8c69ed15555f95 1.06kB / 1.06kB 0.0s
      => => sha256:a9825ef12222ecae28562de9679c655d915fcd548434d12644eceed689 8.96kB / 8.96kB 0.0s
      => => sha256:60f5ad97ea30c124d4652337680c6cccdac0279d12f8901cf096338a 77.26MB / 77.26MB 4.5s
      => => sha256:ba085a9bc900caedae5e24c19e31e20cfb5d39d66da4f581c6c7a 151.03MB / 151.03MB 28.8s
      => => extracting sha256:60f5ad97ea30c124d4652337680c6cccdac0279d12f8901cf096338a15db615 1.8s
      => => extracting sha256:ba085a9bc900caedae5e24c19e31e20cfb5d39d66da4f581c6c7ab9771801f4 1.2s
      => => extracting sha256:bfaeee6a3aa8c8ee215b9fd755d8afb5107f175cf09e1a517dad1b0abdce7dd 0.0s
      => ERROR [2/2] RUN /opt/keycloak/bin/kc.sh build --features-disabled="default" 5.5s
      ------
      > [2/2] RUN /opt/keycloak/bin/kc.sh build --features-disabled="default":
      5.344 Invalid value for option '--features-disabled': default. Expected values are: account-api, account3, admin-api, admin-fine-grained-authz, admin2, authorization, ciba, client-policies, client-secret-rotation, client-types, declarative-ui, device-flow, docker, dpop, dynamic-scopes, fips, impersonation, js-adapter, kerberos, login2, multi-site, oid4vc-vci, organization, par, passkeys, persistent-user-sessions, preview, recovery-codes, scripts, step-up-authentication, token-exchange, transient-users, update-email, web-authn
      ------
      Dockerfile:4
      --------------------
      2 | FROM quay.io/keycloak/keycloak:nightly
      3 | ENV KC_FEATURES=admin-api,admin2,authorization,impersonation
      4 | >>> RUN /opt/keycloak/bin/kc.sh build --features-disabled="default"
      ```

      Version

      24.0.4

      Regression

      [ ] The issue is a regression

      Expected behavior

      Builds successfully, only enabling the selected features

      Actual behavior

      Fails with error

      How to Reproduce?

      See Dockerfile above - can try building with docker build . in the same directory as saving the contents as Dockerfile.

      Anything else?

      No response

            Unassigned Unassigned
            pvlha Pavel Vlha
            Keycloak Cloud Native
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: