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

Console: ALTER VIEW does not update data tab properly #8695

Closed
rongcuid opened this issue Jul 15, 2022 · 2 comments
Closed

Console: ALTER VIEW does not update data tab properly #8695

rongcuid opened this issue Jul 15, 2022 · 2 comments
Labels
c/console Related to console estimate/S k/bug Something isn't working

Comments

@rongcuid
Copy link

Version Information

Server Version: 2.8.0

Environment

Self hosted, docker-compose.yaml:

version: '3.6'
services:
  postgres:
    image: postgres:12
    restart: always
    volumes:
    - db_data:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: postgrespassword
  graphql-engine:
    image: hasura/graphql-engine:v2.8.4.cli-migrations-v3
    #volumes:
    #  - ./hasura/migrations:/hasura-migrations
    #  - ./hasura/metadata:/hasura-metadata
    ports:
    - "8080:8080"
    depends_on:
    - "postgres"
    restart: always
    environment:
      ## postgres database to store Hasura metadata
      HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
      ## this env var can be used to add the above postgres database to Hasura as a data source. this can be removed/updated based on your needs
      PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
      ## enable the console served by server
      HASURA_GRAPHQL_ENABLE_CONSOLE: "false" # set to "false" to disable console
      ## enable debugging mode. It is recommended to disable this in production
      HASURA_GRAPHQL_DEV_MODE: "true"
      HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
      ## uncomment next line to set an admin secret
      # HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
volumes:
  db_data:

What is the current behaviour?

What is the expected behaviour?

When view is renamed, the left side of data tab still holds the old view name

How to reproduce the issue?

  1. Create a view using CREATE VIEW view AS something
  2. Rename the view with ALTER VIEW view RENAME TO view2
  3. Databases view not updated and still shows view. Clicking it shows 404.

Screenshots or Screencast

Please provide any traces or logs that could help here.

Keywords

ALTER VIEW

@rongcuid rongcuid added the k/bug Something isn't working label Jul 15, 2022
@rikinsk rikinsk added the c/console Related to console label Jul 19, 2022
@seanparkross seanparkross changed the title ALTER VIEW does not update data tab properly Console ALTER VIEW does not update data tab properly Aug 25, 2022
@seanparkross seanparkross changed the title Console ALTER VIEW does not update data tab properly Console: ALTER VIEW does not update data tab properly Aug 25, 2022
@vijayprasanna13
Copy link
Member

Though the console does not crash anymore as of v2.28, the variation of the problem still exists. After I run a RENAME command on the view, the nav tree does not update right away. It's only after refreshing the page the new view name is fetched.

Kapture.2023-06-26.at.17.06.35.mp4

@nicoinch
Copy link
Contributor

nicoinch commented Jul 6, 2023

Thanks for reporting! This has been fixed in console: fix tree view not refreshed after SQL execution and will be available in the next release.

@nicoinch nicoinch closed this as completed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console Related to console estimate/S k/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants