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

SecretEnv not working in Template #1080

Open
2 of 6 tasks
roeizavida opened this issue Jun 2, 2024 · 0 comments
Open
2 of 6 tasks

SecretEnv not working in Template #1080

roeizavida opened this issue Jun 2, 2024 · 0 comments
Labels
type:bug A general bug

Comments

@roeizavida
Copy link

Pre-bug-report checklist

1. This bug can be reproduced using pure Argo YAML

If yes, it is more likely to be an Argo bug unrelated to Hera. Please double check before submitting an issue to Hera.

2. This bug occurs in Hera when...

  • exporting to YAML
  • submitting to Argo
  • running on Argo with the Hera runner
  • other:

Bug report

Describe the bug
When using SecretEnv in a Template, it is not expanded and the resulting entry in env only contains the name.

To Reproduce
Full Hera code to reproduce the bug:

from hera.workflows import (
    Container,
    Env,
    SecretEnv,
    WorkflowTemplate,
)
from hera.workflows.models import Template

whalesay = Container(
    image="docker/whalesay:latest",
    command=["cowsay"],
    env=[
        Env(name="test", value="1"),
        SecretEnv(name="s1", secret_key="s1", secret_name="abc"),
    ],
)
templates = [Template(name="test", container=whalesay)]
wt = WorkflowTemplate(name="test", templates=templates)
print(wt.templates[0].container.env)

Results:

[EnvVar(name='test', value='1', value_from=None), EnvVar(name='s1', value=None, value_from=None)]

Expected behavior
SecretEnv should be expanded into EnvVar that it's value_from property is populated.

Environment

  • Hera Version: 5.15.1
  • Python Version: 3.10.13
  • Argo Version: 3.5.6
@samj1912 samj1912 added the type:bug A general bug label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants