mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #1050] Enhancement: Breakpoints #610
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#610
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ben-albrecht on GitHub (Mar 16, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1050
Describe feature
I am not sure if this falls within the scope of the project, is already possible through other means, or is not feasible, but I wanted to capture the general sentiment in a feature request:
It would be really useful to have a way to connect to a workflow with an interactive shell at a designated breakpoint for debugging purposes. For example, a workflow fails at step
N, so I set a breakpoint at stepN-1, and runactwhich will follow the workflow until reaching stepN-1and then drop me into an interactive shell at that step.@lejtemxviw commented on GitHub (Jul 7, 2022):
If I understood how act works right (:-p), it starts a container when it tries to run your workflow, and it leaves the container up when executions encounters an error. However, I think it does run the clean up steps on workflow exit. Would it be enough for this if there was an option that got act to just quit on encountering an error, without running the cleanup steps, and still leaving the container up? Or pause with a "Hit enter to continue...." prompt, so that one can ssh into the still-running container separately, then come back and hit enter to let it finish running the cleanup steps?
@ben-albrecht commented on GitHub (Jul 9, 2022):
I am not familiar enough with act to know what the cleanup steps are doing, but that sounds like a possible way to approach this. Being able to access the container and any artifacts left behind after the error happened would be helpful.
@catthehacker commented on GitHub (Jul 10, 2022):
That's already the default behaviour
@ben-albrecht commented on GitHub (Jul 11, 2022):
Oh cool, I suspected this might already be possible. @catthehacker (or anyone else) -- would you mind giving a basic example of how one would do this or point me to an example doc?
We can probably close the issue with that information provided here, in case anyone else stumbles across this issue looking for the same feature.
@catthehacker commented on GitHub (Jul 11, 2022):
docker exec -ti <container> /bin/bash@dheerajbhaskar commented on GitHub (Jun 11, 2023):
I found this after a lot of trial and error:
How to stop the workflow at a particular step (especially when it's not failing. For say REPL style development of workflow)
act -r.docker exec -it <container> /bin/bashNOTE: Remember that with the
-roption, act re-uses the container. Github does not re-use containers. So, be sure to test your workflows without the-roption.