Skip to content

[Sandbox][RunService]Switch database from sqlite to postgresql#7018

Merged
pingsutw merged 3 commits intov2from
swith_from_sqlite_to_postgresql
Mar 13, 2026
Merged

[Sandbox][RunService]Switch database from sqlite to postgresql#7018
pingsutw merged 3 commits intov2from
swith_from_sqlite_to_postgresql

Conversation

@popojk
Copy link
Contributor

@popojk popojk commented Mar 12, 2026

Tracking issue

Closes #7002

Why are the changes needed?

We should switch the database from sqlite to PostgreSQL so that we can use pg notify in RunService

What changes were proposed in this pull request?

  • Update sandbox Helm chart
  • Update DB layer settings

How was this patch tested?

  1. Buid with make sandbox_build and run sandbox with make sandbox_run
  2. Run an example in flyte-sdk python examples/basics/devbox_one.py
  3. Link to local sandbox PostgreSQL with the config:
host: localhost
port: 30001
username: postgres
password: postgres
  1. The actions data successfully written into db Screenshot 2026-03-12 at 2 10 24 PM

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

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

Related PRs

Docs link

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@popojk popojk marked this pull request as ready for review March 12, 2026 06:11
@popojk popojk changed the title switch database from sqlite to postgresql [Sandbox][RunService]Switch database from sqlite to postgresql Mar 12, 2026
@github-actions github-actions bot mentioned this pull request Mar 12, 2026
3 tasks
// GetPostgresDSN produces the DSN (data source name) for opening a postgres db connection.
func GetPostgresDSN(ctx context.Context, pgConfig PostgresConfig) string {
return getPostgresDsn(ctx, pgConfig)
}
Copy link
Contributor Author

@popojk popojk Mar 12, 2026

Choose a reason for hiding this comment

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

Make this function public so that the Run service repo layer will not need to double implement this string construction logic.

Copy link
Member

Choose a reason for hiding this comment

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

Could we make the function at line 51 public instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 86bb050

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
// GetPostgresDSN produces the DSN (data source name) for opening a postgres db connection.
func GetPostgresDSN(ctx context.Context, pgConfig PostgresConfig) string {
return getPostgresDsn(ctx, pgConfig)
}
Copy link
Member

Choose a reason for hiding this comment

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

Could we make the function at line 51 public instead?

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@pingsutw pingsutw merged commit 2716120 into v2 Mar 13, 2026
14 checks passed
@pingsutw pingsutw deleted the swith_from_sqlite_to_postgresql branch March 13, 2026 01:20
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.

2 participants