<#6733 Fix: Avoid merging pod template twice if te...
# flyte-github
a
#6733 Fix: Avoid merging pod template twice if template container name matches task container name Pull request opened by fg91 ## Why are the changes needed? Users can configure pod templates that are applied to all task pods. Currently, if the pod template has a container called
"primary"
or
"default"
and the task container uses the same name, the merging occurs twice leading to environment variables being duplicated. This PR fixes this. ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. https://bito.ai#summarystart| ### Summary by Bito • Enhances the merging logic for pod templates to prevent duplication of environment variables when container names match, specifically for 'primary' or 'default'. • Addresses an issue where merging could occur multiple times under these conditions. • New tests have been introduced to ensure the correct behavior of the merging process, thereby improving the overall reliability of pod template handling. • Overall, this pull request touches on the merging logic for pod templates and introduces new tests to ensure reliability. flyteorg/flyte