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 a MISE_TASK_OUTPUT="keep-order' to not mix the task output #2347

Closed
boris-smidt-klarrio opened this issue Jul 3, 2024 · 2 comments · Fixed by #3763
Closed

Add a MISE_TASK_OUTPUT="keep-order' to not mix the task output #2347

boris-smidt-klarrio opened this issue Jul 3, 2024 · 2 comments · Fixed by #3763

Comments

@boris-smidt-klarrio
Copy link
Contributor

boris-smidt-klarrio commented Jul 3, 2024

Mise runs tasks in parallel and as a result the lines are mixed up between the tasks.
This makes it sometimes hard to follow why the task failed.

To solve this a new MISE_TASK_OUTPUT could be made named 'keep-order' inspired by GNU parallel.
When the keep-order is enabled the tasks are still run in parallel but the output of the task is ordered by the task.
It would be a useful feature to use in case of a CI output.

Here is an example of what parallel does, it would also keep the same order in case of a multiple line output:

printf "%s\0" {1..5} | parallel -r0 -n 1 -P 10 sha256sum
sha256sum: 1: No such file or directory
sha256sum: 5: No such file or directory
sha256sum: 2: No such file or directory
sha256sum: 4: No such file or directory
sha256sum: 3: No such file or directory
printf "%s\0" {1..5} | parallel --keep-order -r0 -n 1 -P 10 sha256sum
sha256sum: 1: No such file or directory
sha256sum: 2: No such file or directory
sha256sum: 3: No such file or directory
sha256sum: 4: No such file or directory
sha256sum: 5: No such file or directory

The disadvantage is that nothing appears until the previous task is finished.
An interactive user interface like a spindle could be used to show the current running tasks.

@jdx
Copy link
Owner

jdx commented Jul 3, 2024

great suggestion 👍

jdx added a commit that referenced this issue Dec 21, 2024
jdx added a commit that referenced this issue Dec 21, 2024
jdx added a commit that referenced this issue Dec 21, 2024
jdx added a commit that referenced this issue Dec 21, 2024
jdx added a commit that referenced this issue Dec 21, 2024
jdx added a commit that referenced this issue Dec 21, 2024
@jdx jdx closed this as completed in #3763 Dec 21, 2024
jdx added a commit that referenced this issue Dec 21, 2024
* chore: release 2024.12.16 (#3720)

* feat: add `usage` field to tasks

* feat: added keep-order task output type

Fixes #2347

---------

Co-authored-by: mise-en-dev <release@mise.jdx.dev>
@boris-smidt-klarrio
Copy link
Contributor Author

@jdx Cool thank you for adding this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants