-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Rendering map_index_template even if the task fails #39065
Comments
@tomrutter perhaps this PR fixes it already. Could you check once it's the same issue you're reporting? |
It's the same issue. I was suggesting something very similar but also with an additional attempt to render the map index before the task execution. I suspect that it's often the case that the map index could be rendered from the task inputs and it would be nice to see the human readable map index during the task run. Does this seem reasobable? |
related : #39092 |
Yes, #38902 will resolve the issue where named mapped instances don't render if the instance fails. I couldn't figure out how to get the mapped instances to render during task execution, but I think it's worthy for there to be an issue open for that. @tomrutter would you be open to closing this one and opening a separate Issue for rendering named mapped instances during task execution? |
Sure. Will do. |
Description
The map_index_template field on a task is used to render a custom name for each individual sub task in a mapped task. It is generated by rendering the task context on the jinja template provided. It is possible to add to this context during the task run and therefore control the mapped index based on the results of the task. As a result, the rendering happens after a task run completes and this has the side effect that it will only render the mapped task for tasks that succeed.
This isn't always the case though, and it would be useful to see the custom map index both during task runs, and for tasks that have failed. I propose that we render the map index twice - once before and once after the task runs. This would mean that the mapped index appears during the task run, and also persists for tasks that have failed.
Use case/motivation
It would be useful to be able to see the custom map index even for tasks that fail, when the context information to do so is available. This helps with tracking down which tasks have failed, as the mapped task index can be used to provide human readable information to distinguish the mapped tasks from one another.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: