turbot / flowpipe

Flowpipe is a cloud scripting engine. Automation and workflow to connect your clouds to the people, systems and data that matters.
https://flowpipe.io
GNU Affero General Public License v3.0
353 stars 13 forks source link

Add ability to reset DB for triggers #739

Open cbruno10 opened 6 months ago

cbruno10 commented 6 months ago

Is your feature request related to a problem? Please describe. When testing a trigger, sometimes I want to reset my data without deleting .flowpipe/flowpipe.db.

Describe the solution you'd like Add a command to reset the DB for a trigger (or multiple)

Describe alternatives you've considered Delete .flowpipe/flowpipe.db

Additional context Add any other context or screenshots about the feature request here.

judell commented 6 months ago

The other alternative is to write a query to delete unwanted rows. I have a hunch the local db will be put to many uses, including that one. But yeah, a reset flag would be most appreciated.

e-gineer commented 6 months ago

Proposed format for these commands is:

# list all stored data for a specific trigger (similar format to other list commands)
flowpipe trigger keys query.my_trigger

# filter the list to a given primary key (still shown in list format)
flowpipe trigger keys query.my_trigger --primary-key my_key

# reset all data for a given trigger, basically causing it to completely restart from scratch
flowpipe trigger reset query.my_trigger

# reset data for a specific primary key of a specific trigger, useful in debugging
flowpipe trigger reset query.my_trigger --primary-key my_key

To make the commands above more useful, query triggers should include information about the primary key in their output when executing. This will allow the user to see the output and copy it into the commands - particularly helpful during a development and debug cycle.

Noting that the following commands are also possible but have been deliberately excluded for now. They may be implemented later if user demand exists:

flowpipe trigger keys # not yet
flowpipe trigger reset # not yet
github-actions[bot] commented 4 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 3 months ago

This issue was closed because it has been stalled for 90 days with no activity.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.