Skip to content

Commit 0c4f4ea

Browse files
author
Nissan Pow
committed
fix: use inline secrets provider for test_secrets
The previous flow used @Secrets(sources=["mf_secrets_test"]) which requires a configured default secrets backend (e.g. AWS Secrets Manager). Switch to the inline provider with explicit type and options dict so the test works on all backends without external secrets infrastructure.
1 parent 3e3eb7e commit 0c4f4ea

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

test/ux/core/flows/basic/hellosecrets.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,23 @@
55
class HelloSecretsFlow(FlowSpec):
66
@step
77
def start(self):
8-
from metaflow import metaflow_version
9-
10-
print(f"In start step and using metaflow: {metaflow_version.get_version()}")
118
print("HelloSecretsFlow is starting.")
129
self.next(self.hello)
1310

14-
@secrets(sources=["mf_secrets_test"])
11+
@secrets(
12+
sources=[
13+
{
14+
"type": "inline",
15+
"id": "test-secret",
16+
"options": {"env_vars": {"MY_SECRET_VALUE": "hellosecrets"}},
17+
}
18+
]
19+
)
1520
@step
1621
def hello(self):
1722
import os
1823

19-
self.secrets = os.environ["mf_secrets_test"]
24+
self.secrets = os.environ["MY_SECRET_VALUE"]
2025
print("Hello secrets: %s" % self.secrets)
2126
self.next(self.end)
2227

0 commit comments

Comments
 (0)