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

ignore_fail doen't work with sequence tasks #252

Closed
ownik opened this issue Nov 1, 2024 · 2 comments
Closed

ignore_fail doen't work with sequence tasks #252

ownik opened this issue Nov 1, 2024 · 2 comments

Comments

@ownik
Copy link

ownik commented Nov 1, 2024

Hello! This is the sample of pyproject.toml

[tool.poetry]
name = "poe_test"
version = "0.1"
description = ""
authors = ["John Smith <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"

[tool.poetry.group.dev.dependencies]
poethepoet = "^0.29.0"

[tool.poe.tasks]
task1 = "echo Task1"
task2_1 = "echo Task2_1"
task2_2 = "bash -c 'exit 1'"
task2_3 = "echo Task2_3"
task2 = ["task2_1", "task2_2", "task2_3"]
task3 = "echo Task3"
task4 = "echo Task4"
all.sequence = ["task1", "task2", "task3", "task4"]
all.ignore_fail = "return_non_zero"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

I run commands

poetry install --no-root
poetry run poe all

And i got this output

Poe => echo Task1
Task1
Poe => echo Task2_1
Task2_1
Poe => bash -c 'exit 1'
Poe => echo Task2_3
Task2_3
Error: Subtasks task2_2 returned non-zero exit status

Seems like a bug, why task3 and task4 aren't starting in this case? I set ignore_fail = "return_non_zero" for the task all.
If task1/task3/task4 would failed, the rest of the tasks will be started, but if task2 failed the next tasks aren't starting.

Poetry v1.8.4
poethepoet v0.29.0
Python3 v3.12.3
Ubuntu 24.04

@nat-n
Copy link
Owner

nat-n commented Nov 6, 2024

Hi @ownik, thanks for the feedback. I hadn't thought about that edge case... it does seem like a bug.

I suppose the ideal behavior would be that when task2 fails, it prints a warning to indicate this and aborts task2 (as is the case already), but then it should catch the error and continue with the next subtask of all.

I'll see what I can do about it.

@nat-n
Copy link
Owner

nat-n commented Nov 9, 2024

This issue is fixed in v0.30.0 🚀

@nat-n nat-n closed this as completed Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants