Skip to content

Persistence of local runs#627

Merged
kumare3 merged 8 commits intomainfrom
persistence
Feb 9, 2026
Merged

Persistence of local runs#627
kumare3 merged 8 commits intomainfrom
persistence

Conversation

@kumare3
Copy link
Contributor

@kumare3 kumare3 commented Feb 7, 2026

First

flyte create config --local-persistence

Then, this or flyte.run will be recorded. you can also set in
flyte.init(local_persistence=True)

flyte run --local [--tui] 

And now you can checkout and browse all old runs

flyte start tui
Screen.Recording.2026-02-06.at.4.46.00.PM.mov

Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
@machichima
Copy link
Member

Seems like there's no "logs" tab when using flyte start tui, is it intended?
image

Comment on lines 299 to 300
if not admin and not task:
raise click.BadParameter("At least one of --endpoint or --org must be provided.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do not need this check if we only set local? As those are for remote

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is interesting, lets do this as a follow up

@staticmethod
def list_runs_sync() -> list[RunRecord]:
"""List top-level runs (action_name='a0') ordered by start_time DESC."""
with LocalDB._write_lock:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list_runs_sync, list_actions_for_run_sync, and get_action_sync are using SELECT only, I think they do not need write_lock?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great call out (vibing)

db_path = LocalDB._get_db_path()
conn = await aiosqlite.connect(db_path)
await conn.execute(_TASK_CACHE_DDL)
await conn.execute(_RUNS_DDL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe we can add index after this to optimize queries (also in initialize_sync)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which index do we need, i dont see any queries that need an index right now right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add them as we need them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i found one place, for list runs and sorting it by time would help. So i am adding it now

@kumare3
Copy link
Contributor Author

kumare3 commented Feb 9, 2026

Seems like there's no "logs" tab when using flyte start tui, is it intended? image

Yes, we dont store the logs, so you cannot see the logs for older stuff

Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Copy link
Contributor

@wild-endeavor wild-endeavor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this backwards compatible or will we need to clear the local db?

@kumare3 kumare3 merged commit a70a78c into main Feb 9, 2026
17 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.

3 participants