Skip to content

Show recent executions when filtering by start time - #942

Merged
Sovietaced merged 1 commit into
flyteorg:masterfrom
1fanwang:1fanwang/start-time-filter-execution-created-at
Oct 25, 2026
Merged

Sovietaced merged 1 commit into
flyteorg:masterfrom
1fanwang:1fanwang/start-time-filter-execution-created-at

Conversation

@1fanwang

@1fanwang 1fanwang commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Recent executions can disappear when the Start Time filter is active, because the UI filters and sorts on the row timestamp instead of the execution timestamp.

This change switches workflow execution queries to execution_created_at and node execution filters to node_execution_created_at, so the filter matches the timestamp Flyte records for the execution itself.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added. Not needed for this UI-only fix.
  • Any pending items have an associated Issue

Complete description

The Start Time filter was building created_at predicates, and the execution list default sort also used created_at. In Flyte admin, created_at is the database row timestamp, while execution_created_at and node_execution_created_at track the execution closure timestamp users see as the run start time. If those timestamps drift, the Last Hour and Last 24 hours filters can hide runs that started recently.

This patch points workflow execution sorting and filtering at execution_created_at and points node execution filtering at node_execution_created_at.

Tracking Issue

N/A

Follow-up issue

N/A

Testing Done

Seed a real execution, then backdate only the database row timestamp so created_at and execution_created_at diverge.

Reproducer source: simple_wf.py
from flytekit import task, workflow

@task
def echo(x: int) -> int:
    return x

@workflow
def simple(x: int = 1) -> int:
    return echo(x=x)
source /tmp/flytekit-venv/bin/activate
pyflyte -c /Users/stewang/.flyte/config-sandbox.yaml run --remote -p flytesnacks -d development --wait --name start-time-filter-seed /tmp/flyteconsole-seed/simple_wf.py simple --x 7
PGPASSWORD=postgres psql -h localhost -p 30001 -U postgres -d flyte -c "update executions set created_at = now() - interval '3 days' where execution_name='start-time-filter-seed'; select execution_name, created_at, execution_created_at, started_at from executions where execution_name='start-time-filter-seed';"
python3 - <<'PY'
from playwright.sync_api import sync_playwright
cases = [
    ('before', 'http://localhost:30080/console/projects/flytesnacks/domains/development/executions?startTime=lastHour'),
    ('after', 'http://localhost:8080/console/projects/flytesnacks/domains/development/executions?startTime=lastHour'),
]
with sync_playwright() as p:
    browser = p.chromium.launch(executable_path='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', headless=True)
    for label, url in cases:
        page = browser.new_page(viewport={'width': 1440, 'height': 1200})
        page.goto(url, wait_until='networkidle', timeout=120000)
        page.wait_for_timeout(5000)
        body = page.locator('body').inner_text()
        print(f'{label}: visible={"start-time-filter-seed" in body}')
        print(body[:1500])
        page.close()
    browser.close()
PY
Running Execution on Remote.

[✔] Go to http://localhost:30080/console/projects/flytesnacks/domains/development/executions/start-time-filter-seed to see execution in the console.

Execution start-time-filter-seed has succeeded.
     execution_name     |          created_at           |     execution_created_at      |          started_at
------------------------+-------------------------------+-------------------------------+-------------------------------
 start-time-filter-seed | 2026-09-29 18:29:06.791973+00 | 2026-10-02 18:28:00.763419+00 | 2026-10-02 18:28:00.793059+00
(1 row)

before: visible=False
Projects
Executions
Workflows
Tasks
Launch Plans
Login
/
 flytesnacks
/
 development
Executions
Domain Settings
All Executions in the Project
Last 100 Executions in the Project
Most Recent
Status
Version
Start Time
Duration
Only my executions
Show archived executions
STATUS EXECUTION ID WORKFLOW/TASK VERSION LAUNCH PLAN SCHEDULE START TIME DURATION

No executions found.

after: visible=True
Projects
Executions
Workflows
Tasks
Launch Plans
Login
/
 flytesnacks
/
 development
Executions
Domain Settings
All Executions in the Project
Last 100 Executions in the Project
10/2/2026 6:28:00 PM UTC
Most Recent
Status
Version
Start Time
Duration
Only my executions
Show archived executions
STATUS EXECUTION ID WORKFLOW/TASK VERSION LAUNCH PLAN SCHEDULE START TIME DURATION

SUCCEEDED
start-time-filter-seed
simple_wf.simple
LKJ3ejCmFlJt_VViWm5jMQ
simple_wf.simple
—
12m 52s ago
10/2/2026 11:28:00 AM PDT
10/2/2026 6:28:00 PM UTC
28s
View I/O

@Sovietaced
Sovietaced force-pushed the 1fanwang/start-time-filter-execution-created-at branch from 7d7b001 to 46083d2 Compare October 10, 2026 17:50
Signed-off-by: 1fanwang <1fannnw@gmail.com>
@Sovietaced
Sovietaced force-pushed the 1fanwang/start-time-filter-execution-created-at branch from 46083d2 to 2a382f7 Compare October 16, 2026 23:48
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.56%. Comparing base (6afaddd) to head (2a382f7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #942   +/-   ##
=======================================
  Coverage   55.56%   55.56%           
=======================================
  Files         588      588           
  Lines       15444    15444           
  Branches     2835     2835           
=======================================
  Hits         8582     8582           
  Misses       6862     6862           

☔ 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.

@Sovietaced
Sovietaced merged commit 73d8292 into flyteorg:master Oct 25, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants