hasura / hasura/graphql-engine

Console Data/manage tab crashes after tracking any MySQL (GDC) table — "getTableInfo is not a function" (Self-Hosted EE)

Open
#10,870 2 comments 0 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.41.0 (root-cause code is unchanged through v2.50.0 — see below)
CLI Version (for CLI related issue): 2.36.1

### Environment

EE (Self-Hosted Enterprise Edition, trial license)
Data connector agent: `hasura/graphql-data-connector:v2.41.0` (MySQL), running as a sidecar; engine reaches it at `http://localhost:8081/api/v1/mysql`.

### What is the current behaviour?

After tracking **any** table from a **MySQL (GDC / data connector)** source, the Console's Data manager (`/console/data/manage`) crashes on load with the error boundary "Something went wrong" and:

`TypeError: .getTableInfo is not a function` (inside an `Array.forEach`).

Because the crash happens while the Data manager builds the sources/tables tree **on page load**, it takes down the **entire Data tab for ALL sources** (Postgres included), not just the MySQL source. Untracking the MySQL table (`_untrack_table`) or dropping the source (`_drop_source`) restores the console immediately.

Everything else works: the GraphQL API, queries against the tracked MySQL table, and other console routes (e.g. `/console/api/api-explorer`) are all fine. Only the Data manager UI is affected.

### What is the expected behaviour?

Tracking a MySQL/GDC table should not crash the Data manager. GDC sources should be handled by the GDC introspection path instead of the legacy native-driver schema loader, and/or the legacy call to the optional `getTableInfo` should be guarded.

### How to reproduce the issue?

1. Self-hosted engine (EE license) with the `hasura/graphql-data-connector` agent connected as a MySQL data connector.
2. Connect a MySQL source via the Console.
3. Track any table on that source (via Console or `_track_table`).
4. Open or reload `/console/data/manage` → the whole Data tab crashes ("Something went wrong").

### Screenshots or Screencast

### Please provide any traces or logs that could help here.

Browser console stack trace:

TypeError: .getTableInfo is not a function
at .../pro-console/assets/channel/versioned/v2.41.0/main..js (Array.forEach)

Root cause (traced in the OSS console source):
- File: `frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataActions.js`
- Function `getDatabaseTableTypeInfoForAllSources` does:
`schemaRequests.forEach(({ sourceType = 'postgres', sourceName, tables }) => { if (!tables.length) return; const sql = services[sourceType].getTableInfo(tables); ... })`
- `services[sourceType]` only implements **native** drivers (postgres, mssql, bigquery, cockroach, citus — each defines `getTableInfo`). MySQL is a **GDC** source and has no `getTableInfo` here (the interface in `dataSources/index.ts` even types it as optional: `getTableInfo?`).
- The call is **unguarded** and GDC/data-connector sources are **not filtered out** before the loop, so any tracked GDC table makes the loop throw and the error boundary takes down the whole Data manager.
- This exact code is still present and unguarded on `master` and at tag `v2.50.0`.

### Any possible solutions/workarounds you're aware of?

Fix ideas:
- Guard the call: `if (!services[sourceType]?.getTableInfo) return;` (or `?.`-call it), and/or
- Route data-connector sources to the GDC introspection path (`features/DataSource/gdc/introspection`, which already implements `GetTableInfo` via `runMetadataQuery`) instead of the legacy `services[sourceType].getTableInfo`.

Workaround (keeps the tracked table, restores the console):
- Operate the MySQL source via the metadata API / CLI (GitOps) and avoid the Data tab; use `/console/api/api-explorer` for GraphiQL.
- To recover a crashed console: `_untrack_table` (removes only the table) or `_drop_source` (removes the source).

### Keywords

getTableInfo, data connector, GDC, MySQL, MariaDB, console crash, Data manage, manage-database, self-hosted, EE, "is not a function"

Contributor guide

Open the contributing guide

Research direction

Start in frontend/libs/console/legacy-ce/src/lib/components/Services/Data/DataActions.js, especially getDatabaseTableTypeInfoForAllSources, and inspect the optional getTableInfo definition in dataSources/index.ts. Compare that legacy path with features/DataSource/gdc/introspection, which uses runMetadataQuery. Done means tracking a MySQL/GDC table no longer crashes /console/data/manage and the Data manager remains usable for other sources.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, typescript
Domain
databases, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.