apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.67k stars 1.03k forks source link

"gradlew clean check" results in internal gradle error "Unable to make progress running work." #13567

Open dweiss opened 3 months ago

dweiss commented 3 months ago

Description

As reported by Chris, running "gradlew clean check" on main results in this nasty (or its variations):

Unable to make progress running work. The following items are queued for execution but none of them can be started:
  - Build ':build-infra':
      - Waiting for nodes:
          - :build-infra:clean (state=SHOULD_RUN, dependencies=COMPLETE_AND_SUCCESSFUL, group=task group 0, dependencies=[Resolve mutations for :build-infra:clean (EXECUTED)], has-failed-dependency=false )
          - :build-infra:forbiddenApis (state=SHOULD_RUN, dependencies=NOT_COMPLETE, group=task group 1, dependencies=[:build-infra:forbiddenApisMain (EXECUTED), :build-infra:forbiddenApisTest (SHOULD_RUN)], waiting-for=[:build-infra:forbiddenApisTest (SHOULD_RUN)], has-failed-dependency=false )
      - Nodes ready to start:
          - :build-infra:clean
          - :build-infra:compileTestJava
          - :build-infra:processTestResources
      - Reachable nodes:
          - :build-infra:compileTestJava (state=SHOULD_RUN, dependencies=COMPLETE_AND_SUCCESSFUL, group=task group 1, dependencies=[Resolve mutations for :build-infra:compileTestJava (EXECUTED), destroyer locations for task group 0 (EXECUTED), :build-infra:classes (EXECUTED), :build-infra:compileJava (EXECUTED)], has-failed-dependency=false )
          - :build-infra:processTestResources (state=SHOULD_RUN, dependencies=COMPLETE_AND_SUCCESSFUL, group=task group 1, dependencies=[Resolve mutations for :build-infra:processTestResources (EXECUTED), destroyer locations for task group 0 (EXECUTED)], has-failed-dependency=false )
          - :build-infra:testClasses (state=SHOULD_RUN, dependencies=NOT_COMPLETE, group=task group 1, dependencies=[:build-infra:compileTestJava (SHOULD_RUN), :build-infra:processTestResources (SHOULD_RUN)], waiting-for=[:build-infra:processTestResources (SHOULD_RUN), :build-infra:compileTestJava (SHOULD_RUN)], has-failed-dependency=false )
          - :build-infra:forbiddenApisTest (state=SHOULD_RUN, dependencies=NOT_COMPLETE, group=task group 1, dependencies=[:build-infra:classes (EXECUTED), :build-infra:compileJava (EXECUTED), :build-infra:compileTestJava (SHOULD_RUN), :build-infra:testClasses (SHOULD_RUN)], waiting-for=[:build-infra:compileTestJava (SHOULD_RUN), :build-infra:testClasses (SHOULD_RUN)], has-failed-dependency=false )
      - Scheduling events:
          - node added to plan: destroyer locations for task group 0, when: scheduled, state: SHOULD_RUN, dependencies: 1, is ready node? false
      - Ordinal groups:
          - group 0 entry nodes: [:build-infra:clean (SHOULD_RUN)]
          - group 1 entry nodes: [:build-infra:forbiddenApis (SHOULD_RUN)]
  - Workers waiting for work: 12
  - Stopped workers: 3

I've dumped task execution ordering using this plugin:

  id 'org.barfuin.gradle.taskinfo' version '2.2.0'

and I can see composite project tasks are intertwined with top level project tasks - this may lead to insanity.

The only workaround for now is to not run 'clean' together with other tasks.

dweiss commented 3 months ago

I think this comment provides an explanation of what is happening: https://github.com/gradle/gradle/issues/23585#issuecomment-1403862031