Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(self-managed-swap-backend): Swap backend for self managed sources #28457

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

phixMe
Copy link
Contributor

@phixMe phixMe commented Feb 7, 2025

Problem

Little cohesion and perf issues for self managed sources make them not look the best together when viewed at once.

Note: Unexpectedly, this made "new" sources appear in my local environment.

This must be merged after PR #28111

image

Previously we relied on the /query endpoint response to list self-managed sources, that query is a bit slow because it brings down the entire cumulative model that can be interacted with.

This solution references the postgres table model and gives us additional column details that we can table render. It's also a bit faster to interact with.

Does this work well for both Cloud and self-hosted?

Yes

Copy link
Contributor

github-actions bot commented Feb 7, 2025

Size Change: +5 B (0%)

Total Size: 1.18 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.18 MB +5 B (0%)

compressed-size-action

@phixMe phixMe marked this pull request as ready for review February 7, 2025 21:04
@phixMe phixMe requested a review from a team February 7, 2025 21:04
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR improves data warehouse table performance by switching from the /query endpoint to direct PostgreSQL access. Here are the key changes:

  • Added tables loader in dataWarehouseTableLogic.tsx to fetch data warehouse tables directly from PostgreSQL
  • Added created_at field to DataWarehouseTable interface in types.ts for timestamp tracking
  • Modified DataWarehouseSelfManagedSourcesTable to display formatted creation timestamps in a new 'Created at' column
  • Added automatic table reloading after create/update operations to keep the UI in sync
  • Implemented afterMount hook to load tables when component initializes

The changes provide better performance while adding creation timestamp visibility for data warehouse tables.

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@phixMe
Copy link
Contributor Author

phixMe commented Feb 7, 2025

I need to cleanup on deletes I noticed looking at this myself.

@phixMe phixMe merged commit 38f064d into master Feb 10, 2025
109 checks passed
@phixMe phixMe deleted the feat(re-map-self-managed) branch February 10, 2025 22:42
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