Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-73835

Builds can be deleted while they are still running

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      Builds can be deleted via the /doDelete REST API, and the delete-builds CLI command while they are still running. The “Delete build” link in the sidepanel of builds is hidden unless !it.building and !it.keepLog, but this is a UI-only restriction. Run.delete has the same issue, but in practice all of the callers that I found in plugins already check whether the build is done building (most calls are in LogRotator implementations where LogRotator.shouldKeepRun handles the issue), but there are some subtle race conditions regarding checking Run.isBuilding instead of Run.isLogUpdated that can lead to LogRotator deleting Pipeline builds while they are in the middle of finishing.

      Deleting a build while it is running can cause various kinds of anomalous behavior as the build continues to run despite its configuration directory being deleted, and it is likely that the build will return after a Jenkins restart since build.xml may be rewritten as the build continues running.

          [JENKINS-73835] Builds can be deleted while they are still running

          Devin Nusbaum created issue -
          Devin Nusbaum made changes -
          Description Original: Builds can be deleted via {{{}Run.delete{}}}, the {{/doDelete}} REST API, and the {{delete-builds}} CLI command {_}while they are still running{_}.

          The “Delete build” link in the sidepanel of builds is hidden unless {{{}!it.building and !it.keepLog{}}}, but this is a UI-only restriction.

          Deleting a build while it is running can cause various kinds of anomalous behavior as the build continues to run despite its configuration directory being deleted, and it is likely for the build will return after a Jenkins restart since {{build.xml}} may be rewritten as the build continues running.
          New: Builds can be deleted via the {{/doDelete}} REST API, and the {{delete-builds}} CLI command {_}while they are still running{_}. The “Delete build” link in the sidepanel of builds is hidden unless {{{}!it.building and !it.keepLog{}}}, but this is a UI-only restriction. {{Run.delete}} has the same issue, but in practice all of the callers that I found in plugins already check whether the build is done building (most calls are in {{LogRotator}} implementations where {{LogRotator.shouldKeepRun}} handles the issue), although there may be some subtle race conditions regarding checking {{Run.isBuilding}} instead of {{{}Run.isLogUpdated{}}}.

          Deleting a build while it is running can cause various kinds of anomalous behavior as the build continues to run despite its configuration directory being deleted, and it is likely for the build will return after a Jenkins restart since {{build.xml}} may be rewritten as the build continues running.
          Devin Nusbaum made changes -
          Description Original: Builds can be deleted via the {{/doDelete}} REST API, and the {{delete-builds}} CLI command {_}while they are still running{_}. The “Delete build” link in the sidepanel of builds is hidden unless {{{}!it.building and !it.keepLog{}}}, but this is a UI-only restriction. {{Run.delete}} has the same issue, but in practice all of the callers that I found in plugins already check whether the build is done building (most calls are in {{LogRotator}} implementations where {{LogRotator.shouldKeepRun}} handles the issue), although there may be some subtle race conditions regarding checking {{Run.isBuilding}} instead of {{{}Run.isLogUpdated{}}}.

          Deleting a build while it is running can cause various kinds of anomalous behavior as the build continues to run despite its configuration directory being deleted, and it is likely for the build will return after a Jenkins restart since {{build.xml}} may be rewritten as the build continues running.
          New: Builds can be deleted via the {{/doDelete}} REST API, and the {{delete-builds}} CLI command {_}while they are still running{_}. The “Delete build” link in the sidepanel of builds is hidden unless {{{}!it.building and !it.keepLog{}}}, but this is a UI-only restriction. {{Run.delete}} has the same issue, but in practice all of the callers that I found in plugins already check whether the build is done building (most calls are in {{LogRotator}} implementations where {{LogRotator.shouldKeepRun}} handles the issue), although there may be some subtle race conditions regarding checking {{Run.isBuilding}} instead of {{{}Run.isLogUpdated{}}}.

          Deleting a build while it is running can cause various kinds of anomalous behavior as the build continues to run despite its configuration directory being deleted, and it is likely that the build will return after a Jenkins restart since {{build.xml}} may be rewritten as the build continues running.
          Devin Nusbaum made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Devin Nusbaum made changes -
          Remote Link New: This issue links to "jenkinsci/jenkins#9810 (Web Link)" [ 30020 ]
          Devin Nusbaum made changes -
          Summary Original: Builds may be deleted via the API and CLI while they are still running New: Builds may be deleted while they are still running
          Devin Nusbaum made changes -
          Description Original: Builds can be deleted via the {{/doDelete}} REST API, and the {{delete-builds}} CLI command {_}while they are still running{_}. The “Delete build” link in the sidepanel of builds is hidden unless {{{}!it.building and !it.keepLog{}}}, but this is a UI-only restriction. {{Run.delete}} has the same issue, but in practice all of the callers that I found in plugins already check whether the build is done building (most calls are in {{LogRotator}} implementations where {{LogRotator.shouldKeepRun}} handles the issue), although there may be some subtle race conditions regarding checking {{Run.isBuilding}} instead of {{{}Run.isLogUpdated{}}}.

          Deleting a build while it is running can cause various kinds of anomalous behavior as the build continues to run despite its configuration directory being deleted, and it is likely that the build will return after a Jenkins restart since {{build.xml}} may be rewritten as the build continues running.
          New: Builds can be deleted via the {{/doDelete}} REST API, and the {{delete-builds}} CLI command {_}while they are still running{_}. The “Delete build” link in the sidepanel of builds is hidden unless {{{}!it.building and !it.keepLog{}}}, but this is a UI-only restriction. {{Run.delete}} has the same issue, but in practice all of the callers that I found in plugins already check whether the build is done building (most calls are in {{LogRotator}} implementations where {{LogRotator.shouldKeepRun}} handles the issue), but there are some subtle race conditions regarding checking {{Run.isBuilding}} instead of {{{}Run.isLogUpdated{}}} that can lead to deleting Pipeline builds while they are in the middle of finishing.

          Deleting a build while it is running can cause various kinds of anomalous behavior as the build continues to run despite its configuration directory being deleted, and it is likely that the build will return after a Jenkins restart since {{build.xml}} may be rewritten as the build continues running.
          Devin Nusbaum made changes -
          Description Original: Builds can be deleted via the {{/doDelete}} REST API, and the {{delete-builds}} CLI command {_}while they are still running{_}. The “Delete build” link in the sidepanel of builds is hidden unless {{{}!it.building and !it.keepLog{}}}, but this is a UI-only restriction. {{Run.delete}} has the same issue, but in practice all of the callers that I found in plugins already check whether the build is done building (most calls are in {{LogRotator}} implementations where {{LogRotator.shouldKeepRun}} handles the issue), but there are some subtle race conditions regarding checking {{Run.isBuilding}} instead of {{{}Run.isLogUpdated{}}} that can lead to deleting Pipeline builds while they are in the middle of finishing.

          Deleting a build while it is running can cause various kinds of anomalous behavior as the build continues to run despite its configuration directory being deleted, and it is likely that the build will return after a Jenkins restart since {{build.xml}} may be rewritten as the build continues running.
          New: Builds can be deleted via the {{/doDelete}} REST API, and the {{delete-builds}} CLI command {_}while they are still running{_}. The “Delete build” link in the sidepanel of builds is hidden unless {{{}!it.building and !it.keepLog{}}}, but this is a UI-only restriction. {{Run.delete}} has the same issue, but in practice all of the callers that I found in plugins already check whether the build is done building (most calls are in {{LogRotator}} implementations where {{LogRotator.shouldKeepRun}} handles the issue), but there are some subtle race conditions regarding checking {{Run.isBuilding}} instead of {{{}Run.isLogUpdated{}}} that can lead to {{LogRotator}} deleting Pipeline builds while they are in the middle of finishing.

          Deleting a build while it is running can cause various kinds of anomalous behavior as the build continues to run despite its configuration directory being deleted, and it is likely that the build will return after a Jenkins restart since {{build.xml}} may be rewritten as the build continues running.
          Devin Nusbaum made changes -
          Remote Link New: This issue links to "jenkinsci/workflow-job-plugin#470 (Web Link)" [ 30021 ]
          Devin Nusbaum made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Devin Nusbaum made changes -
          Summary Original: Builds may be deleted while they are still running New: Builds can be deleted while they are still running

            dnusbaum Devin Nusbaum
            dnusbaum Devin Nusbaum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: