Skip to content

fix(flyteadmin): populate ErrorKind/ErrorCode columns for accept-time execution failures#7496

Open
1fanwang wants to merge 1 commit into
flyteorg:masterfrom
1fanwang:fix/flyteadmin-error-columns-on-create
Open

fix(flyteadmin): populate ErrorKind/ErrorCode columns for accept-time execution failures#7496
1fanwang wants to merge 1 commit into
flyteorg:masterfrom
1fanwang:fix/flyteadmin-error-columns-on-create

Conversation

@1fanwang

@1fanwang 1fanwang commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Why are the changes needed?

FlyteAdmin records an execution's error kind and code in dedicated, indexed columns so operators can query and alert on failures without unpacking each execution's serialized closure. These columns are filled in for failures reported through the propeller event stream, but not for executions that fail at creation time (for example, validation failures rejected before the workflow ever starts). Those executions are stored as FAILED with the error only inside the closure blob, so any query or alert that filters on the error-kind column silently misses them.

What changes were proposed in this pull request?

Populate the error-kind and error-code columns when an execution is created in a failed state, matching what already happens for event-driven failures. Successful executions leave the columns empty as before.

How was this patch tested?

Extended TestCreateExecutionModel: the success case asserts both columns are empty; the unknown / invalid-argument / internal error cases assert the columns match the failure's kind and code.

Reproduce:

go test ./pkg/repositories/transformers/ -run TestCreateExecutionModel

Before:

--- FAIL: TestCreateExecutionModel/failed_with_unknown_error
    Expected value not to be nil.
FAIL    github.com/flyteorg/flyte/flyteadmin/pkg/repositories/transformers

After:

ok      github.com/flyteorg/flyte/flyteadmin/pkg/repositories/transformers

Labels

fixed

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

… execution failures

Signed-off-by: 1fanwang <1fannnw@gmail.com>
@github-actions github-actions Bot added the flyte label Jun 10, 2026
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.04%. Comparing base (a4b5be7) to head (46fee6c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7496   +/-   ##
=======================================
  Coverage   57.03%   57.04%           
=======================================
  Files         931      931           
  Lines       58387    58395    +8     
=======================================
+ Hits        33301    33311   +10     
+ Misses      22025    22023    -2     
  Partials     3061     3061           
Flag Coverage Δ
unittests-datacatalog 53.51% <ø> (ø)
unittests-flyteadmin 53.17% <100.00%> (+0.02%) ⬆️
unittests-flytecopilot 43.06% <ø> (ø)
unittests-flytectl 64.14% <ø> (+0.04%) ⬆️
unittests-flyteidl 75.71% <ø> (ø)
unittests-flyteplugins 60.35% <ø> (ø)
unittests-flytepropeller 53.79% <ø> (ø)
unittests-flytestdlib 62.76% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant