From 15a6000356467607c424ad3a2e5c79588b2a94c6 Mon Sep 17 00:00:00 2001
From: Pierre Delpy 
Date: Fri, 10 Oct 2025 13:51:50 +0200
Subject: [PATCH 1/3] hotfix: make itcc lens 1 work again with legacy CQL
---
 itcc/docker-compose.yml       | 3 ++-
 itcc/modules/lens-compose.yml | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/itcc/docker-compose.yml b/itcc/docker-compose.yml
index 18adb6f..3caf5fe 100644
--- a/itcc/docker-compose.yml
+++ b/itcc/docker-compose.yml
@@ -22,7 +22,7 @@ services:
       - "traefik.http.routers.blaze_itcc.tls=true"
 
   focus:
-    image: docker.verbis.dkfz.de/cache/samply/focus:${FOCUS_TAG}
+    image: docker.verbis.dkfz.de/cache/samply/focus:${FOCUS_TAG}-dktk
     container_name: bridgehead-focus
     environment:
       API_KEY: ${FOCUS_BEAM_SECRET_SHORT}
@@ -34,6 +34,7 @@ services:
       EPSILON: 0.28
       QUERIES_TO_CACHE: '/queries_to_cache.conf'
       ENDPOINT_TYPE: ${FOCUS_ENDPOINT_TYPE:-blaze}
+      CQL_PROJECTS_ENABLED: ${CQL_PROJECT}
     volumes:
       - /srv/docker/bridgehead/itcc/queries_to_cache.conf:/queries_to_cache.conf:ro
     depends_on:
diff --git a/itcc/modules/lens-compose.yml b/itcc/modules/lens-compose.yml
index d9ec6e2..f3a71e6 100644
--- a/itcc/modules/lens-compose.yml
+++ b/itcc/modules/lens-compose.yml
@@ -17,6 +17,7 @@ services:
       BEAM_PROXY_ID: ${SITE_ID}
       BEAM_BROKER_ID: ${BROKER_ID}
       BEAM_APP_ID: "focus"
+      PROJECT_METADATA: ${CQL_PROJECT}
     depends_on:
       - "beam-proxy"
     labels:
From 4a0f2e609d8bc59fed2635dd72b7307e73ed8912 Mon Sep 17 00:00:00 2001
From: Pierre Delpy 
Date: Mon, 13 Oct 2025 08:27:35 +0200
Subject: [PATCH 2/3] "fixed itcc param"
---
 itcc/docker-compose.yml       | 2 +-
 itcc/modules/lens-compose.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/itcc/docker-compose.yml b/itcc/docker-compose.yml
index 3caf5fe..9825ae2 100644
--- a/itcc/docker-compose.yml
+++ b/itcc/docker-compose.yml
@@ -34,7 +34,7 @@ services:
       EPSILON: 0.28
       QUERIES_TO_CACHE: '/queries_to_cache.conf'
       ENDPOINT_TYPE: ${FOCUS_ENDPOINT_TYPE:-blaze}
-      CQL_PROJECTS_ENABLED: ${CQL_PROJECT}
+      CQL_PROJECTS_ENABLED: "itcc"
     volumes:
       - /srv/docker/bridgehead/itcc/queries_to_cache.conf:/queries_to_cache.conf:ro
     depends_on:
diff --git a/itcc/modules/lens-compose.yml b/itcc/modules/lens-compose.yml
index f3a71e6..d19c372 100644
--- a/itcc/modules/lens-compose.yml
+++ b/itcc/modules/lens-compose.yml
@@ -17,7 +17,7 @@ services:
       BEAM_PROXY_ID: ${SITE_ID}
       BEAM_BROKER_ID: ${BROKER_ID}
       BEAM_APP_ID: "focus"
-      PROJECT_METADATA: ${CQL_PROJECT}
+      PROJECT_METADATA: "itcc"
     depends_on:
       - "beam-proxy"
     labels:
From 3c5b8a70b1fed4b6c45aa6583723a5410673d222 Mon Sep 17 00:00:00 2001
From: Pierre Delpy 
Date: Tue, 14 Oct 2025 08:28:56 +0200
Subject: [PATCH 3/3] deactivate secret sync (which never worked for itcc/cce)
---
 lib/functions.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/functions.sh b/lib/functions.sh
index 379e122..733d37d 100644
--- a/lib/functions.sh
+++ b/lib/functions.sh
@@ -337,6 +337,9 @@ function sync_secrets() {
 }
 
 function secret_sync_gitlab_token() {
+    if [[ "$PROJECT" != "dktk" && "$PROJECT" != "bbmri" ]]; then
+        return
+    fi
     # Map the origin of the git repository /etc/bridgehead to the prefix recognized by Secret Sync
     local gitlab
     case "$(git -C /etc/bridgehead remote get-url origin)" in
@@ -394,7 +397,7 @@ function secret_sync_gitlab_token() {
     else
         log "WARN" "Secret Sync failed"
         # Remove the git credential helper
-        git -C /etc/bridgehead config --unset credential.helper
+        git -C /etc/bridgehead config --unset credential.helpera
     fi
 
     # In the past the git credential helper was also set for /srv/docker/bridgehead but never used.