When the wildcard, "*" is used to specify the variant under depends_on, Evergreen unintuitively expands the dependency to include the applicable named task(s) in every build variant, instead of in every build variant where the task is specified. For example, consider this minimal Evergreen configuration:
The result of evergreen evaluate -f example.yml is:
In the configuration, task1 is only specified as belonging to variant1, but the wildcard expansion performed by Evergreen means that the dependency is impossible to satisfy in the present configuration. It seems like the expected behavior should be that the given a task name or tag and a wildcard for the build variant, that the expansion should be described as "the named or tagged task in every build variant matching the wildcard where the task is present explicitly or implicitly."
The current behavior makes it impossible to leverage the wildcard in any case where the specified task is not present in every build variant in the configuration. That does not seem especially useful.
Note that the version of the Evergreen tool I used was 2019-08-27.