这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@soorajshankar
Copy link
Member

@soorajshankar soorajshankar commented May 22, 2020

Improve dependency management experience on the console.

Description

whenever the run_sql query throws an error with dependency-error, the error alert will now have additional option to cascade the continue with the run_sql as follows.
image

Changelog

  • CHANGELOG.md is updated with user-facing content relevant to this PR.

Affected components

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System
  • Tests
  • Other (list it)

Related Issues

close #1593

Solution and Design

  1. Error call back on all the migration API calls are intercepted and passed through the error code check
  2. if the error is dependency_error user will get a prompt.
  3. Users can choose whether to continue with the cascade or not.
  4. on the Continue button click, the user will be able to cascade drop the dependent items as well.

Steps to test and verify

  1. Create a table with multiple columns.
  2. add the columns dependencies to permissions (or any metadata fields).
  3. try deleting the column.

Previous Behaviour

The user gets an error message without any actions.

This PR will

  • Console users will get an error message with an action item asking Do you want to drop the dependent items as well?.
  • When the user clicks the continue button, the user can retry the operation with cascade=true.
  • Add cascade prompt to the untract_table failures due to a dependency error.

The cascade implementation in this PR is for metadata cascade only.

@soorajshankar soorajshankar requested review from beerose and rikinsk May 22, 2020 11:11
@soorajshankar soorajshankar requested review from a team as code owners May 22, 2020 11:11
@netlify
Copy link

netlify bot commented May 22, 2020

Deploy preview for hasura-docs ready!

Built with commit ccb84a7

https://deploy-preview-4846--hasura-docs.netlify.app

@hasura-bot
Copy link
Contributor

Review app for commit d1185f3 deployed to Heroku: https://hge-ci-pull-4846.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4846-d1185f35

@hasura-bot
Copy link
Contributor

Review app for commit 55f0fd0 deployed to Heroku: https://hge-ci-pull-4846.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4846-55f0fd0d

@beerose beerose added the c/console Related to console label May 26, 2020
Copy link
Member

@rikinsk rikinsk left a comment

Choose a reason for hiding this comment

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

@soorajshankar

  • Can we also add the same logic for the untrack_table api.
  • In case of table delete if PG throws an error regarding dependent objects, we can have the same prompt regarding dropping dependent objects and on continue we can run the drop table command with cascade, ie. drop table <name> cascade; edit: This can be done in a separate PR

@beerose beerose assigned soorajshankar and unassigned rikinsk May 31, 2020
@hasura-bot
Copy link
Contributor

Review app for commit 21fab93 deployed to Heroku: https://hge-ci-pull-4846.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4846-21fab933

@soorajshankar soorajshankar requested a review from rikinsk June 3, 2020 08:24
@soorajshankar soorajshankar assigned beerose and rikinsk and unassigned beerose and rikinsk Jun 3, 2020
@soorajshankar
Copy link
Member Author

soorajshankar commented Jun 4, 2020

@soorajshankar

* Can we also add the same logic for the `untrack_table` api.

* In case of table delete if PG throws an error regarding dependent objects, we can have the same prompt regarding dropping dependent objects and on `continue` we can run the drop table command with cascade, ie. `drop table <name> cascade;` _edit: This can be done in a separate PR_

As discussed, untrack_table will also have prompt on dependency error. postgres cascade can be added as another PR.

Copy link
Member

@rikinsk rikinsk left a comment

Choose a reason for hiding this comment

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

UX approved

@rikinsk rikinsk requested a review from tirumaraiselvan June 4, 2020 13:59
@beerose beerose assigned soorajshankar and unassigned beerose Jun 4, 2020
Copy link
Contributor

@beerose beerose left a comment

Choose a reason for hiding this comment

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

@soorajshankar @rikinsk remote schemas relationships are not handled. You can check it out here: https://hge-ci-pull-4846.herokuapp.com/console/ by trying to remove remote schema.

@hasura-bot
Copy link
Contributor

Review app for commit 75aba3a deployed to Heroku: https://hge-ci-pull-4846.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4846-75aba3ab

…o chore/cascade-dependency-on-user-confirmation
@soorajshankar soorajshankar requested a review from beerose June 9, 2020 12:58
@hasura-bot
Copy link
Contributor

Review app for commit 49cd8b9 deployed to Heroku: https://hge-ci-pull-4846.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4846-49cd8b9a

@hasura-bot
Copy link
Contributor

Review app for commit 852226c deployed to Heroku: https://hge-ci-pull-4846.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4846-852226c2

@hasura-bot
Copy link
Contributor

Review app for commit e9859dd deployed to Heroku: https://hge-ci-pull-4846.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4846-e9859dd7

@beerose beerose changed the title Chore/cascade dependency on user confirmation console: provide option to cascade metadata on dependency conflicts on console (close #1593) Jun 9, 2020
@beerose beerose changed the title console: provide option to cascade metadata on dependency conflicts on console (close #1593) console: provide option to cascade metadata on dependency conflicts (close #1593) Jun 9, 2020
@hasura-bot
Copy link
Contributor

Review app for commit 223960b deployed to Heroku: https://hge-ci-pull-4846.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4846-223960b3

@hasura-bot
Copy link
Contributor

Review app for commit ccb84a7 deployed to Heroku: https://hge-ci-pull-4846.herokuapp.com
Docker image for server: hasura/graphql-engine:pull4846-ccb84a7d

@beerose beerose merged commit c8d242d into hasura:master Jun 9, 2020
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-4846.herokuapp.com is deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/console Related to console

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve dependency management experience on console

5 participants