acoustic-carpenter-78188
04/29/2026, 10:15 PMnamespaceutils package exists in v1 flytestdlib but is missing from v2. Downstream services that depend on v1 flytestdlib/namespaceutils cannot migrate to v2 without re-implementing or vendoring these utilities. This PR ports the package to v2 to enable a clean migration path.
What changes were proposed in this pull request?
Adds flytestdlib/namespaceutils/ to v2 with the same two functions as the v1 implementation:
• GetNamespaceName(template, org, project, domain string) string — builds a Kubernetes namespace name by substituting {{ org }}, {{ project }}, {{ domain }} placeholders in a template
• GetNameWithNamespacedPrefix(prefix, name string) string — concatenates a prefix and a name
The implementation is identical to the v1 package — just ported to the v2 module path.
How was this patch tested?
The unit tests from v1 were ported alongside the source. Both functions are covered by table-driven tests:
• TestGetNamespaceName
• TestGetNameWithNamespacedPrefix
$ go test ./flytestdlib/namespaceutils/
ok github.com/flyteorg/flyte/v2/flytestdlib/namespaceutils 0.300s
Labels
• added: new package in v2 flytestdlib
Check all the applicable boxes
• All new and existing tests passed.
• All commits are signed-off.
• #6583
• feat(flytestdlib): add namespaceutils package to v2 👈
flyteorg/flyteacoustic-carpenter-78188
05/04/2026, 8:42 PM