Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to reset DB for triggers #739

Open
cbruno10 opened this issue Feb 29, 2024 · 6 comments
Open

Add ability to reset DB for triggers #739

cbruno10 opened this issue Feb 29, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@cbruno10
Copy link
Contributor

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.

@cbruno10 cbruno10 added the enhancement New feature or request label Feb 29, 2024
@judell
Copy link
Contributor

judell commented Mar 1, 2024

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
Copy link
Contributor

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

Copy link

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 github-actions bot added the stale label May 18, 2024
Copy link

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
@vhadianto vhadianto reopened this Jul 8, 2024
@github-actions github-actions bot removed the stale label Jul 9, 2024
Copy link

github-actions bot commented Sep 8, 2024

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 github-actions bot added the stale label Sep 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 8, 2024
@vhadianto vhadianto reopened this Oct 23, 2024
@github-actions github-actions bot removed the stale label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants