Skip to content
Discussion options

You must be logged in to vote

Hey Dan! Apologies for the delayed response. This happens because of the order in which Hera registers templates and usages of those templates. I’ll walk through your examples 1 by 1

container = get_container()
with Workflow(name="my-workflow", entrypoint="entrypoint") as my_workflow:
    with Steps(name="entrypoint") as my_steps:
        container(name="foo")

works because Hera adds the template associated with your container call to your workflow when you invoke the callable container (source)

with Workflow(name="my-workflow", entrypoint="entrypoint") as my_workflow:
    container = get_container()
    with Steps(name="entrypoint") as my_steps:
        container(name="foo")

works becaus…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@daturkel
Comment options

@flaviuvadan
Comment options

Answer selected by elliotgunton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants