From 28ce14ffe74adbd43b9ff1fb992ff2efc76b6334 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 24 Oct 2026 23:02:56 +0200 Subject: [PATCH] style(web-app-keycloak,web-app-openproject): apply autoformat to the no-verify commits quality-high's autoformat pass rewrote three files that 9301220d05, 49aa920034 and c78d5f906c committed without the hooks. ruff drops three `noqa: E402` markers as unused (RUF100): E402 does not fire on an import that follows sys.path.insert. The formatter wraps the long KEYCLOAK_RBAC_GROUP_LOGIC_DIGEST line and the OpenProject admin runner's `sh -c` line; the double-quoted scalar and the `>-` block both fold the break back into a space, and a parse against HEAD gives equal values. On merge: feature/store-i18n 2bcf59109e carries the same four Keycloak hunks byte for byte; they merge without a conflict. Co-Authored-By: Claude Opus 5.5 (1M context) --- roles/web-app-keycloak/vars/main.yml | 3 ++- roles/web-app-openproject/tasks/04_admin.yml | 3 ++- .../python/roles/web-app-keycloak/files/test_email_verified.py | 2 +- .../python/roles/web-app-keycloak/files/test_keycloak_admin.py | 2 +- .../python/roles/web-app-keycloak/files/test_rbac_reconcile.py | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/roles/web-app-keycloak/vars/main.yml b/roles/web-app-keycloak/vars/main.yml index 16ea4bdc45..fb1cb9c339 100644 --- a/roles/web-app-keycloak/vars/main.yml +++ b/roles/web-app-keycloak/vars/main.yml @@ -18,7 +18,8 @@ KEYCLOAK_RBAC_ALL_APP_IDS: "{{ lookup('deployment').groups | rbac_app_ids }}" KEYCLOAK_RBAC_RUN_APP_IDS: "{{ lookup('deployment').running | rbac_app_ids }}" KEYCLOAK_RBAC_WORKERS: "{{ [RESOURCE_HOST_CPUS | int // 2, 1] | max }}" -KEYCLOAK_RBAC_GROUP_LOGIC_DIGEST: "{{ lookup('file', lookup('path_absolute', 'roles/svc-db-openldap/filter_plugins/build_ldap_role_entries.py')) | hash('sha256') }}" +KEYCLOAK_RBAC_GROUP_LOGIC_DIGEST: "{{ lookup('file', lookup('path_absolute', 'roles/svc-db-openldap/filter_plugins/build_ldap_role_entries.py')) | hash('sha256') + }}" KEYCLOAK_PER_APP_LDAP_ROLES_MAPPER_PAYLOADS_FILE: "/tmp/kc_per_app_mapper_payloads.txt" KEYCLOAK_PER_APP_LDAP_ROLES_MAPPER_TEMPLATE: >- {{ diff --git a/roles/web-app-openproject/tasks/04_admin.yml b/roles/web-app-openproject/tasks/04_admin.yml index 798c22e1a9..7d6849ab29 100644 --- a/roles/web-app-openproject/tasks/04_admin.yml +++ b/roles/web-app-openproject/tasks/04_admin.yml @@ -14,7 +14,8 @@ -e {{ ('OPENPROJECT_ADMIN_EMAIL=' ~ OPENPROJECT_ADMINISTRATOR_EMAIL) | quote }} {% if OPENPROJECT_HEADER_SSO_ENABLED | bool %}-e {{ ('OPENPROJECT_LDAP_NAME=' ~ OPENPROJECT_LDAP.name) | quote }}{% endif %} {{ OPENPROJECT_WEB_LOCAL_CID | quote }} - sh -c 'IFS= read -r OPENPROJECT_ADMIN_PASSWORD; IFS= read -r OPENPROJECT_RAILS_SETTINGS; export OPENPROJECT_ADMIN_PASSWORD OPENPROJECT_RAILS_SETTINGS; exec "$@"' sh bash -lc 'cd /app && bundle exec rails runner -' + sh -c 'IFS= read -r OPENPROJECT_ADMIN_PASSWORD; IFS= read -r OPENPROJECT_RAILS_SETTINGS; export OPENPROJECT_ADMIN_PASSWORD OPENPROJECT_RAILS_SETTINGS; exec + "$@"' sh bash -lc 'cd /app && bundle exec rails runner -' stdin: |- {{ OPENPROJECT_ADMINISTRATOR_PASSWORD }} {{ OPENPROJECT_RAILS_SETTINGS | to_json }} diff --git a/tests/unit/python/roles/web-app-keycloak/files/test_email_verified.py b/tests/unit/python/roles/web-app-keycloak/files/test_email_verified.py index 0cd86d74dc..f65275f163 100644 --- a/tests/unit/python/roles/web-app-keycloak/files/test_email_verified.py +++ b/tests/unit/python/roles/web-app-keycloak/files/test_email_verified.py @@ -10,7 +10,7 @@ from . import PROJECT_ROOT sys.path.insert(0, str(PROJECT_ROOT / "roles/web-app-keycloak/files/python")) -import email_verified as m # noqa: E402 +import email_verified as m class FakeKeycloak: diff --git a/tests/unit/python/roles/web-app-keycloak/files/test_keycloak_admin.py b/tests/unit/python/roles/web-app-keycloak/files/test_keycloak_admin.py index bfe6aeed0e..0ddc3bb301 100644 --- a/tests/unit/python/roles/web-app-keycloak/files/test_keycloak_admin.py +++ b/tests/unit/python/roles/web-app-keycloak/files/test_keycloak_admin.py @@ -11,7 +11,7 @@ from . import PROJECT_ROOT sys.path.insert(0, str(PROJECT_ROOT / "roles/web-app-keycloak/files/python")) -import keycloak_admin as m # noqa: E402 +import keycloak_admin as m class TestContainerCredentials(unittest.TestCase): diff --git a/tests/unit/python/roles/web-app-keycloak/files/test_rbac_reconcile.py b/tests/unit/python/roles/web-app-keycloak/files/test_rbac_reconcile.py index 90bd28bba5..d6b4545fbe 100644 --- a/tests/unit/python/roles/web-app-keycloak/files/test_rbac_reconcile.py +++ b/tests/unit/python/roles/web-app-keycloak/files/test_rbac_reconcile.py @@ -9,7 +9,7 @@ from . import PROJECT_ROOT sys.path.insert(0, str(PROJECT_ROOT / "roles/web-app-keycloak/files/python")) -import rbac_reconcile as m # noqa: E402 +import rbac_reconcile as m LDAP = "ldap-1"