hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.06k stars 2.76k forks source link

Not able to delete one off scheduled events via SQL #8969

Open amal-chandran opened 2 years ago

amal-chandran commented 2 years ago

Version Information

Server Version: 2.11.2-cloud.1

Environment

Cloud/OSS

What is the current behavior?

Im trying to delete one-off events from hdb_catalog.hdb_scheduled_events I was able to invoke run_sql and clear the same in local deployment (by using docker-compose) but in hasura cloud the hdb_catalog.hdb_scheduled_events is an empty table (when i accessed it directly using data grip) but the one-off scheduled event list is not empty when i run the delete sql in cloud deployment it is not getting cleared https://hasura.io/docs/latest/scheduled-triggers/clean-up/#option-2-clear-processed-events

What is the expected behavior?

How to reproduce the issue?

  1. Hasura should be deployed with Hasura cloud
  2. Connect to Postgres directly or use SQL tab under the data section
  3. Run: delete from hdb_catalog.hdb_scheduled_events;
  4. Check the one off scheduled tab the events will stay there

Keywords

one off scheduled events

meetzaveri commented 1 year ago

Hey @amal-chandran , thanks for raising the issue.

In Hasura cloud, we internally create and host PG database for metadata. So this hdb_catalog schmea will be created under that database.

As a result, you will not be able to access it with SQL.

BUT, We do provide an API for deleting one-off scheduled events. Please refer to these docs - https://hasura.io/docs/latest/api-reference/metadata-api/scheduled-triggers/#metadata-delete-scheduled-event

I hope this makes sense. Do let us know, cheers!