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

Introspect command does not pick up table column renames #10699

Open
edwardoverthere opened this issue Mar 4, 2025 · 3 comments
Open

Introspect command does not pick up table column renames #10699

edwardoverthere opened this issue Mar 4, 2025 · 3 comments
Labels
k/v3-bug Bug affecting Hasura v3 (DDN)

Comments

@edwardoverthere
Copy link

Component

This issue pertains to:
CLI -> c/v3-cli
Postgres (for issues that clearly relates to Postgres SQL execution) -> c/v3-ndc-postgres

What is the current behaviour?

  1. Rename a column in your table in pgsql
  2. Run ddn connector introspect sivvy_neon
  3. Run model add, command add, relationship add commands.

Observe that renamed column name is still listed as previous column name.

As a result running supergraph build local or build create will throw an error similar to this:

ERR Code=opendds-validation Message="invalid metadata: error building schema: invalid metadata: unknown target column name status for field status in object type InsertProvidersObject (in subgraph app)"

What is the expected behaviour?

Expected behavior would be that columns that are renamed are picked up in the introspect command, and updated throughout following commands.

How to reproduce the issue?

  1. Spinup a hasura ddn -> pgsql connector
  2. Generate a table, generate some columns
  3. Run through introspect command
  4. Rename a column in the table
  5. Run introspect command again
  6. Notice issue

Screenshots or Screencast

N/A

Please provide any traces or logs that could help here.

Error log provided above.

Any possible solutions/workarounds you're aware of?

Manually updating the renamed column in the .hml files in metadata seems to bypass this issue.

Keywords

'rename', 'pgsql rename column'

@edwardoverthere edwardoverthere added the k/v3-bug Bug affecting Hasura v3 (DDN) label Mar 4, 2025
@edwardoverthere
Copy link
Author

Noting that in the connector metadata, the renamed column does show up - however in the app metadata in the .html files - column is still named the same.

@edwardoverthere
Copy link
Author

After more inspection, the renamed column DOES show in in app metadata, however the original column still exists. The original column name is whats causing the issues.

@seanparkross
Copy link
Contributor

I have notified the team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/v3-bug Bug affecting Hasura v3 (DDN)
Projects
None yet
Development

No branches or pull requests

2 participants