DefaultTaskExecutionPlanTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Stop using "task" to refer to nodes in the execution plan

    • -981
    • +0
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 23 more files in changeset.
Schedule artifact transforms early (#5657)

Schedule artifact transforms early when possible

Before this change artifact transforms were executed as late as possible, typically when snapshotting the task's input that would consume them. With this change artifact transforms are scheduled like tasks whenever possible, and are executed as soon as all their dependencies are built.

The execution engine now understands three different kinds of "work":

- tasks in the current build (this is the most typical type of work)

- tasks from another included build referenced from the current build

- artifact transforms discovered via task inputs

There are two kinds of artifact transforms that are not executed alongside tasks after this change:

- transforms that never appear in a task's (or another transform's) inputs

- transforms that transform file dependencies

These cases are handled as before, i.e. the transforms are executed when they are consumed.

Some types have been introduced to cover the new concepts of work and transforms wrt building the graph of work. Several existing types are still have "task" in their names even though they now work with more than just tasks. These should be renamed/refactored in follow-up PRs.

  1. … 66 more files in changeset.
Expose file collection dependencies declared in included builds to consumers in other builds in the composite.

Rework task graph assembly so that tasks that cross build boundaries as a dependency of another task no longer need to be wrapped in a `TaskReference` and remove the special handling from dependency resolution artifact and IDE artifact implementations.

No longer add a synthetic delegate task to each project that such a task is consumed as a dependency and decouple the task execution plan from `Task` slightly so that it can deal with the difference between tasks in the current build and tasks running asynchronously in another build.

  1. … 24 more files in changeset.
Extract some logic out of `DefaultTaskExecutionPlan` so that it no longer needs to know how to calculate `TaskInfo` nodes that a given task depends on.

  1. … 4 more files in changeset.
Merge branch 'master' into lptr/core/new-scheduler

  1. … 4 more files in changeset.
Fix task failure handling so that task failures from included builds are not lost. Previously, a task exception would be ignored if no task in the main build directly depended on the failed task and was still scheduled to run at the point in time where the task failed. In some cases this resulted in the build being reported as successful when in fact some task in an included build had failed.

This change means that some exceptions will be reported twice, but this is better than not at all. A subsequent change will fix this.

This change also decouples waiting for completion of tasks in an included build from firing the build finished events and other cleanup. Now all tasks in all builds are completed before finishing up any builds.

    • -21
    • +22
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 31 more files in changeset.
Merge remote-tracking branch 'origin/master' into lptr/core/new-scheduler

  1. … 1 more file in changeset.
Fix tests

Merge branch 'master' into lptr/core/new-scheduler

Simplify --continue handling

There's no need for a TaskFailureHandler: we simply need a boolean state

    • -21
    • +6
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 7 more files in changeset.
Do not try to sort tasks

    • -0
    • +29
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 2 more files in changeset.
Merge remote-tracking branch 'origin/master' into lptr/core/new-scheduler

    • -22
    • +29
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 2 more files in changeset.
Restore original order of test cases

This is to reduce diff size

    • -16
    • +16
    ./DefaultTaskExecutionPlanTest.groovy
Handle build cacnelled

  1. … 10 more files in changeset.
Do not test new implementation for task ordering

    • -0
    • +19
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 1 more file in changeset.
Fix failure checking tests

  1. … 9 more files in changeset.
Fix more test cases

    • -9
    • +52
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 10 more files in changeset.
Abstract common scheduling tests

    • -774
    • +41
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 3 more files in changeset.
Simplify test

    • -157
    • +157
    ./DefaultTaskExecutionPlanTest.groovy
Release locks via ResourceLockState

That makes the code a little bit simpler, since we don't have to track

the locks we already aquired.

  1. … 5 more files in changeset.
Rename selectNextNode to selectNextTask

  1. … 5 more files in changeset.
Remove coordination service from task execution plan

The callers of methods on the execution plan need to take care of

proper synchronisation.

    • -18
    • +1
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 3 more files in changeset.
Fix releasing of locks

Before our changes, withStateLock made sure that the aquired locks

were released when trying to schedule a task. Now we need to make sure

of that ourselves.

  1. … 2 more files in changeset.
Fix cancellation logic

  1. … 8 more files in changeset.
Changed the interaction between `TaskExecutionPlan` and the `TaskPlanExecutor` so that `TaskInfo` objects do not leak out of the execution plan. Moved responsibility for cleaning up at the completion of a task inside the execution plan (where the logic is anyway), so that now the executor only receives `Task` objects rather than the internal scheduling state. This also allows two state lock operations that previously happened one immediately after the other, to be merged into a single lock operation.

  1. … 5 more files in changeset.
Support rich task inputs (#3720)

@Nested inputs are now discovered based on the runtime type instead of the static type.

    • -9
    • +10
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 150 more files in changeset.
Remove unnecessary semicolons

    • -63
    • +63
    ./DefaultTaskExecutionPlanTest.groovy
Remove task's local state after loading from cache

    • -1
    • +10
    ./DefaultTaskExecutionPlanTest.groovy
  1. … 14 more files in changeset.
Use identity path when reporting task cycles

  1. … 1 more file in changeset.
Make sure we stop included builds even when the outer build fails

  1. … 5 more files in changeset.