# A Git directory generator matches apps/*/* and names Applications '{{.path.basename}}'. Both apps/team-a/web and apps/team-b/web exist. What does the ApplicationSet controller do?

Argo CD, Hard (Expert), Troubleshooting & Debugging. https://k8wiz.com/uquiz/a-git-directory-generator-matches-apps-and-names-applications-pathbasename-both-appsteam-aweb-and-appsteam-bweb-exist-what-does

- A. Creates web from the first match and skips the other
- B. Creates neither and reports a duplicate name error
- C. Creates both, adding a hash suffix to the second name
- D. Creates web and lets the second match overwrite it

**Answer:** Creates neither and reports a duplicate name error

**Explanation:** The controller validates generated Applications before applying them and flags names that appear more than once, setting an ErrorOccurred condition with a message that the ApplicationSet contains applications with duplicate name: web. Because both entries share the same name, neither passes validation. Building the name from more than one segment, such as the team and the basename, avoids the collision.
