question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

creating permission through the API leaves metadata inconsistent

See original GitHub issue

Adding a permission to a computed field through the API leaves the metadata inconsistent

Since there is no way right now to add a computed filed permission through the console, I’m using the create_select_permission API to add the permission to the table.

Here’s the request to add permission

{
    "type" : "create_select_permission",
    "args" : {
        "table" : "clients",
        "role" : "user",
        "permission" : {
            "columns" : ["description", "id", "logo_url", "name", "website_url"],
            "filter" : {
                "users" : {"id":{"_eq":"X-Hasura-User-Id"}}
            },
            "computed_fields": ["sections"]
        }
    }
}

After this, everything works fine. But when I restart the console, I get the inconsistent metadata error. Then I try to remove the permission through the API and I get this error request

{
    "type" : "drop_select_permission",
    "args" : {
        "table" : "clients",
        "role" : "user"
    }
}

response

{
    "path": "$.args",
    "error": "select permission on \"clients\" for role \"user\" does not exist",
    "code": "permission-denied"
}

In order to get everything work again, I have to manually delete the permission from the DB and then add it again using the API

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rakeshkkycommented, Nov 15, 2019

@tafelito Great to know that. Thank you 🙂. Closing the issue now.

1reaction
tafelitocommented, Nov 14, 2019

@rakeshkky I just updated to beta.10 and it’s working now and I didn’t have to manually add the computed field through the API

Thanks for the quick response!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inconsistent/no data observed for entities in hybrid UI or ...
Symptom. Users observe inconsistent data or no data for entities such as API products, Apps, Developers, Key Value Maps (KVM), and Cache intermittently...
Read more >
Manage Permissions for External Assets - Tableau Help
Access metadata. The permissions used to access metadata through Catalog (or Metadata API) work similarly to permissions for accessing content through Tableau ...
Read more >
Operations Errors - SingleStore Documentation
Find the partition(s) with inconsistent table metadata, and manually run ALTER on the leaf partitions to correct them.
Read more >
Metadata for column %2 is internally inconsistent (%3): database ...
We use cookies and similar technologies to give you a better experience, improve performance, analyze traffic, and to personalize content. By continuing to ......
Read more >
File System Metadata - an overview | ScienceDirect Topics
File system metadata includes the times recorded by the operating system when a ... a few API function calls, and leaves fewer traces...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found