Uploaded image for project: 'Evergreen'
  1. Evergreen
  2. EVG-6874

More sensible handling of wildcard task dependencies

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: app
    • Labels:

      Description

      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:

      tasks:
        - name: task1
          tags: ["tag1"]
       
        - name: task2
          depends_on:
          - name: task1
            variant: "*"
       
        - name: task3
          depends_on:
          - name: ".tag1"
            variant: "*"
       
      buildvariants:
        - name: variant1
          tasks:
          - name: task1
       
        - name: variant2
          tasks:
          - name: task2
       
        - name: variant3
          tasks:
          - name: task3
      
      

      The result of evergreen evaluate -f example.yml is:

      buildvariants:
      - name: variant1
        tasks:
        - name: task1
      - name: variant2
        tasks:
        - name: task2
      - name: variant3
        tasks:
        - name: task3
      tasks:
      - name: task1
        tags:
        - tag1
      - name: task2
        depends_on:
        - name: task1
          variant: variant1
        - name: task1
          variant: variant2
        - name: task1
          variant: variant3
      - name: task3
        depends_on:
        - name: task1
          variant: variant1
        - name: task1
          variant: variant2
        - name: task1
          variant: variant3
      

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-evg Backlog - Evergreen Team
              Reporter:
              roberto.sanchez Roberto Sanchez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: