Skip to content

fix(controller): allow exit handler variables in resource template manifests. Fixes #14368 #14465

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mrkschneider
Copy link

@mrkschneider mrkschneider commented May 9, 2025

Fixes #14368

Motivation

Using {{workflow.failures}} within an exit handler in a resource template (workflow of workflows) caused a validation error. The changes allow to use {{workflow.failures}} in this context.

Modifications

For template validation, if the template contains a resource manifest, {{workflow.failures}} is replaced by a temporary placeholder to allow validation to pass. The strategy mirrors what already happens, e.g., when a exit hook is detected in the template.

Verification

Unit test was added. Test workflow from #14368 can now run without problems.

Documentation

Bugfix. Existing documentation suggests that {{workflow.failures}} should work in all contexts where exit handlers are used, including from within a workflow of workflows

@mrkschneider mrkschneider force-pushed the fix-wf-of-wf-exit-handler branch from caa1a4e to cccc42a Compare May 9, 2025 18:41
@mrkschneider mrkschneider force-pushed the fix-wf-of-wf-exit-handler branch from cccc42a to 242a472 Compare May 10, 2025 07:45
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

Successfully merging this pull request may close these issues.

workflow of workflows fails to resolve {{workflow.failures}}
1 participant