hasura / hasura/graphql-engine
cannot clear metadata when having source related inconsistency
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: v2.8.0
CLI Version (for CLI related issue): v2.8.0
### Environment
OSS
### What is the expected behaviour?
When using `hasura metadata clear` or Clicking "Reset" metadata on console should clear metadata
### Keywords
metadata, clear_metadata
### What is the current behaviour?
As a user when I have a source-related inconsistency in my metadata, doing a `hasura metadata clear` or using the "Reset" metadata button on the console throws an error
### How to reproduce the issue?
To replicate this bug:
1. Apply some metadata with a bad source (say a wrong db connection string)
2. Now try to clear metadata (via CLI or console).
3. This clearing or reset will fail
4. Go to the console and then via the inconsistent metadata page, drop inconsistent objects. This will go through.
### Screenshots or Screencast

### Please provide any traces or logs that could help here.
N/A
### Any possible solutions?
Both CLI and Console uses [clear_metadata](https://hasura.io/docs/latest/graphql/core/api-reference/metadata-api/manage-metadata/#metadata-clear-metadata) metadata API to implement this functionality. So, probably looking into the implementation details of this API might uncover details of this behaviour.
Contributor guide
Assessment
This issue has not been assessed yet.