hasura / hasura/graphql-engine

cannot clear metadata when having source related inconsistency

Open
#8,610 5 comments 1 reaction 1 assignee Assigned to @manasag View on GitHub
k/bug t/product-platform
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

![image](https://user-images.githubusercontent.com/8335904/174763464-0e64006e-7f39-4a32-b5cc-1c604b979a77.png)

### 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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.