perf: Optimize workflow name dropdowns with /names API#1013
Draft
akhilpathivada wants to merge 1 commit intoconductor-oss:mainfrom
Draft
perf: Optimize workflow name dropdowns with /names API#1013akhilpathivada wants to merge 1 commit intoconductor-oss:mainfrom
akhilpathivada wants to merge 1 commit intoconductor-oss:mainfrom
Conversation
7cc0f0d to
7dfab79
Compare
Signed-off-by: akhilpathivada <akhil.pathivada.21@gmail.com>
7dfab79 to
131de6d
Compare
This was referenced Apr 14, 2026
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.
Resolves #1014
Summary
GET /metadata/workflow/namesendpoint that returns distinct workflow names viaSELECT DISTINCT name— avoids loadingjson_datacolumn and JSON deserialization entirelyuseWorkflowNames,useWorkflowNamesAndVersions) to call lightweight endpoints directly instead of deriving fromuseWorkflowDefs()which loads all full definitions/namesloads the name dropdown and/names-and-versionsis fetched in parallel for the version dropdown. Both return only lightweight metadata — no full definition bodies are loaded until the user picks a specific version viaGET /metadata/workflow/{name}?version=N/namesiscalled — the version summaries are never fetched at all
Changes
Backend
MetadataDAO: Addeddefault getWorkflowNames()method — backward-compatible fallback for persistence modules that don't override itPostgresMetadataDAO: Optimized override usingSELECT DISTINCT name FROM meta_workflow_def ORDER BY name— index-only scan, zero deserializationMetadataService/MetadataServiceImpl: AddedgetWorkflowNames()delegationMetadataResource: NewGET /metadata/workflow/namesREST endpointUI
useWorkflowNames(): Now calls/metadata/workflow/namesdirectlyuseWorkflowNamesAndVersions(): Now calls/metadata/workflow/names-and-versionsdirectlyuseWorkflowDefs()→GET /metadata/workflowwhich loaded all full
WorkflowDefobjectsTests
MetadataServiceTest: Unit test forgetWorkflowNames()PostgresMetadataDAOTest: Integration test for the optimized DAO methodMetadataResourceTest: REST endpoint test/metadata/workflow/namesBackward Compatibility
MetadataDAO.getWorkflowNames()is adefaultmethod — existing DAO implementations (Redis, MySQL, etc.) continue to work without changesFuture Scope
GET /metadata/workflow/{name}/versions) to fetch version details lazily only when a user selects a specific workflow, instead of loading all workflows' version summaries upfront via/names-and-versionsTest Plan
./gradlew spotlessApplypasses./gradlew testpasses (core, rest, postgres-persistence)/definitions/workflow)