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

Feature: --keep-going for task to continue on error #1318

Open
sofusalbertsen opened this issue Aug 30, 2023 · 2 comments
Open

Feature: --keep-going for task to continue on error #1318

sofusalbertsen opened this issue Aug 30, 2023 · 2 comments
Labels
type: feature A new feature or functionality.

Comments

@sofusalbertsen
Copy link

I'm missing the --keep-going feature of make in Task.
From the documentation of make:

--keep-going

Continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other prerequisites of these targets can be processed all the same. See Testing the Compilation of a Program.

The scenario I have at the moment is this:

  • I use task to create infrastructure as code (eksctl based).
  • I have a CI system that spins up an infrastructure on PR's via my task deploy task.
  • If something goes wrong, I would like task to run my task destroy task, disregarding that all the sub tasks might fail (in the case that the task deploy did fail at some point).
    At the moment, the only way I can do this is through https://taskfile.dev/usage/#ignore-errors , but I do not want to set this as a permanent configuration setting, only at runtime.
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Aug 30, 2023
@grumpper
Copy link

Did someone do any work on this?

@sofusalbertsen did you find some workaround for this?

I am currently eating a similar pickle where I must run a task with two other tasks as dependencies and even if one of them fail all execution stops...

@andreynering
Copy link
Member

For some use cases defer can be used as a workaround to ensure something is ran.

@andreynering andreynering added type: feature A new feature or functionality. and removed state: needs triage Waiting to be triaged by a maintainer. labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature or functionality.
Projects
None yet
Development

No branches or pull requests

4 participants