<#7601 Bug: Autogenerated (.flytegen prefixed) Wor...
# flyte-github
a
#7601 Bug: Autogenerated (.flytegen prefixed) Workflow/Task Executions lack execution_tags entries Issue created by PhilipKraenzlerMBTI Describe the bug Flyte does not create entries in the execution_tags table for executions that are associated with autogenerated workflows or tasks, specifically those whose names are prefixed with .flytegen. This issue prevents these executions from being discoverable or filterable using execution_tags in the Flyte UI or via direct database queries. This behavior is particularly observed in scenarios where clients create executions by directly referencing tasks, leading to associated workflow entries (or sometimes task entries themselves) being prefixed with .flytegen. While the execution itself is recorded in the executions table, and its associated workflow/task is in the workflows/tasks table, the corresponding execution_tags are missing from the execution_tags table. Expected behavior All Flyte executions, regardless of whether they are associated with autogenerated workflows or tasks (e.g., those prefixed with .flytegen), should have their execution_tags correctly populated in the execution_tags table. This ensures consistent data integrity and allows for comprehensive filtering and searching across all execution types. Additional context to reproduce 1. Identify an affected execution: Run the following query to find executions where the launch_plan, workflow, task, or execution_name contains .flytegen. This query uses LEFT JOIN to ensure all related entities are shown, even if some are NULL. Example Query: flyteadmin=> SELECT e.execution_project, e.execution_domain, e.execution_name, lp.name AS launch_plan_name, w.name AS workflow_name, t.name AS task_name, et.key, -- This will be NULL if no execution_tag entry exists et.value -- This will be NULL if no execution_tag entry exists FROM executions AS e LEFT JOIN launch_plans AS lp ON e.launch_plan_id = lp.id LEFT JOIN workflows AS w ON e.workflow_id = w.id LEFT JOIN tasks AS t ON e.task_id = t.id LEFT JOIN -- Use LEFT JOIN here to show executions even if they don't have tags execution_tags AS et ON e.execution_project = et.execution_project AND e.execution_domain = et.execution_domain AND e.execution_name = et.execution_name WHERE (lp.name LIKE '%.flytegen%' -- Launch plan name contains .flytegen OR w.name LIKE '%.flytegen%' -- Workflow name contains .flytegen OR t.name LIKE '%.flytegen%' -- Task name contains .flytegen OR e.execution_name LIKE '%.flytegen%') -- Execution name itself contains .flytegen AND e.execution_name = 'aq6bgnpd25pvmh9q7txw'; -- Filtering for your specific example execution Query Result: Image 1. Contrast with a regular workflow execution (where tags are present): To demonstrate that execution_tags are correctly populated for non-autogenerated workflows, run the following query. Query Example: SELECT lp.name AS launch_plan_name, w.name AS workflow_name, et.key, et.value FROM executions AS e JOIN launch_plans AS lp ON e.launch_plan_id = lp.id JOIN workflows AS w ON e.workflow_id = w.id JOIN execution_tags AS et ON e.execution_project = et.execution_project AND e.execution_domain = et.execution_domain AND e.execution_name = et.execution_name WHERE w.name NOT LIKE '.flytegen%' -- Exclude workflows starting with .flytegen AND lp.name NOT LIKE '.flytegen%' -- Exclude launch plans starting with .flytegen AND et.key IS NOT NULL -- Ensure that an execution tag key exists LIMIT 15; -- Get a few examples Query Result: Image Tested on flytekit 1.16.15 Philip Kränzler philip.kraenzler@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH, imprint flyteorg/flyte