From a787496c21ee323baf8e3de7ed7435a0bf95e35a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 26 Aug 2026 23:57:22 +0000 Subject: [PATCH] feat: serve run and log search from any instance, not just the indexer Adds concurrency_locks.owner_addr, where the indexer advertises a base URL other instances can reach it on, so searching no longer requires the ingress to pin /api/srch/* to the indexer pod (WIN-1968). Bumps the EE ref for windmill-ee-private#feat-indexer-search-proxy. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01V2vNYVA1Jc9rrfqCPN6eKg --- ...b062ea40a286151810c3e89d931f352daaf95.json | 16 +++++++++++ ...741e2a4823ac287cb94b17c42277c67513b53.json | 28 +++++++++++++++++++ ...8eae8db9cc8b5de08003b469f1fae72398921.json | 16 +++++++++++ backend/ee-repo-ref.txt | 2 +- ...826214734_indexer_lock_owner_addr.down.sql | 1 + ...60826214734_indexer_lock_owner_addr.up.sql | 4 +++ 6 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 backend/.sqlx/query-15b0f7ca74a6f769ff7281651b5b062ea40a286151810c3e89d931f352daaf95.json create mode 100644 backend/.sqlx/query-1ff3d43899a63d5f56450d8edfc741e2a4823ac287cb94b17c42277c67513b53.json create mode 100644 backend/.sqlx/query-a500d9496c643c0107a77e9debc8eae8db9cc8b5de08003b469f1fae72398921.json create mode 100644 backend/migrations/20260826214734_indexer_lock_owner_addr.down.sql create mode 100644 backend/migrations/20260826214734_indexer_lock_owner_addr.up.sql diff --git a/backend/.sqlx/query-15b0f7ca74a6f769ff7281651b5b062ea40a286151810c3e89d931f352daaf95.json b/backend/.sqlx/query-15b0f7ca74a6f769ff7281651b5b062ea40a286151810c3e89d931f352daaf95.json new file mode 100644 index 0000000000..87e34b1c3e --- /dev/null +++ b/backend/.sqlx/query-15b0f7ca74a6f769ff7281651b5b062ea40a286151810c3e89d931f352daaf95.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "INSERT INTO concurrency_locks (id, last_locked_at, owner, owner_addr)\n VALUES ($1, now(), $2, $3)\n ON CONFLICT (id)\n DO UPDATE SET\n last_locked_at = now(),\n owner = EXCLUDED.owner,\n owner_addr = EXCLUDED.owner_addr", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Varchar", + "Varchar", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "15b0f7ca74a6f769ff7281651b5b062ea40a286151810c3e89d931f352daaf95" +} diff --git a/backend/.sqlx/query-1ff3d43899a63d5f56450d8edfc741e2a4823ac287cb94b17c42277c67513b53.json b/backend/.sqlx/query-1ff3d43899a63d5f56450d8edfc741e2a4823ac287cb94b17c42277c67513b53.json new file mode 100644 index 0000000000..0d03a3e9a1 --- /dev/null +++ b/backend/.sqlx/query-1ff3d43899a63d5f56450d8edfc741e2a4823ac287cb94b17c42277c67513b53.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT last_locked_at, owner_addr FROM concurrency_locks WHERE id = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_locked_at", + "type_info": "Timestamp" + }, + { + "ordinal": 1, + "name": "owner_addr", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + true + ] + }, + "hash": "1ff3d43899a63d5f56450d8edfc741e2a4823ac287cb94b17c42277c67513b53" +} diff --git a/backend/.sqlx/query-a500d9496c643c0107a77e9debc8eae8db9cc8b5de08003b469f1fae72398921.json b/backend/.sqlx/query-a500d9496c643c0107a77e9debc8eae8db9cc8b5de08003b469f1fae72398921.json new file mode 100644 index 0000000000..08af968fd6 --- /dev/null +++ b/backend/.sqlx/query-a500d9496c643c0107a77e9debc8eae8db9cc8b5de08003b469f1fae72398921.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE concurrency_locks SET\n last_locked_at = now(),\n owner_addr = $3\n WHERE id = $1 AND owner = $2", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "a500d9496c643c0107a77e9debc8eae8db9cc8b5de08003b469f1fae72398921" +} diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 8f96f52924..db91998ef1 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -d6aef91c0f7ba556befbf4addeb7674d4a9dd819 \ No newline at end of file +8943367fd141b96fe86a2632f2f94885140ae345 \ No newline at end of file diff --git a/backend/migrations/20260826214734_indexer_lock_owner_addr.down.sql b/backend/migrations/20260826214734_indexer_lock_owner_addr.down.sql new file mode 100644 index 0000000000..71c4588949 --- /dev/null +++ b/backend/migrations/20260826214734_indexer_lock_owner_addr.down.sql @@ -0,0 +1 @@ +ALTER TABLE concurrency_locks DROP COLUMN IF EXISTS owner_addr; diff --git a/backend/migrations/20260826214734_indexer_lock_owner_addr.up.sql b/backend/migrations/20260826214734_indexer_lock_owner_addr.up.sql new file mode 100644 index 0000000000..18ba7f9eba --- /dev/null +++ b/backend/migrations/20260826214734_indexer_lock_owner_addr.up.sql @@ -0,0 +1,4 @@ +-- The indexer records the base URL other instances can reach it on, so a server +-- instance without an in-memory index reader can forward search requests to it +-- instead of requiring the ingress to pin /api/srch/* to the indexer pod. +ALTER TABLE concurrency_locks ADD COLUMN IF NOT EXISTS owner_addr VARCHAR;