Llm reindex services - #1168
Open
ruwinirathnamalala wants to merge 3 commits into
Open
Conversation
Pull from buerokratt/V3.3.3
…into llm-reinex-service
15 tasks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



#1164
Overview
Implements a manual LLM re-index flow for services, mirroring the existing endpoint re-index flow, and fixes the service activation flow so it correctly triggers LLM enrichment with proper status tracking. Changes span a Liquibase database migration, a new Resql SQL query, and Ruuter DSL flows.
Liquibase Migrations (
DSL/Liquibase/)20260907120000_add-llm-index-status-to-servicesllm_index_statuscolumn to theservicestable, reusing thellm_index_statusenum type (SUCCESS,IN_PROGRESS,FAILED) already introduced forendpointsIncludes rollback script.
Resql (
DSL/Resql/services/POST/services/)update_service_llm_sync_status.sql(new)Updates a service's
llm_index_statusbyservice_id.Ruuter (
DSL/Ruuter/services/POST/services/)reindex-service.yml(new)Public entry point for manual re-index (
POST /services/services/reindex-service):serviceIdand validates it exists and isactivebefore proceeding400ifserviceIdis missing404if the service doesn't exist400"Service is not active, LLM indexing skipped" if the service isn'tactivename,description,examples,entities,type,state,isCommon) toservice-index-llm, avoiding a redundant DB fetch inside itFAILEDand returns500service-index-llm.yml(new)Internal indexing flow (
POST /services/services/service-index-llm), called by bothreindex-serviceandstatus.yml(service activation):IN_PROGRESS[#LLM_RUUTER_PUBLIC]/services/enrichwith the mapped payload (service_id,name,description,examples,entities,ruuter_type,current_state,is_common)SUCCESSorFAILEDbased on the enrich responsestatus.yml(modified)The existing "activate service → enrich in LLM" call was pointed at the wrong URL and used a stale field-naming contract, so LLM enrichment silently failed on every activation:
call_llm_enrich→ renamed tocall_llm_index, now calls[#SERVICE_RUUTER]/services/service-index-llm(routing through the new tracked flow) instead of hitting[#LLM_RUUTER_PUBLIC]/services/enrichdirectly — activation now gets the same status tracking as manual re-indexservice_id→serviceId,ruuter_type→type,current_state→state,is_common→isCommoncookieheader, required by the internal call's auth guard