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

Allow delete-* CLI commands to operate on multiple arguments

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: cli, core
    • Labels:
      None
    • Similar Issues:

      Description

      delete-job, delete-node and delete-view CLI commands accepts only one argument. Modify the commands in core to accept many.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java
          http://jenkins-ci.org/commit/jenkins/b6bff4f2c078dc0f1474a96ab18f629c213aa509
          Log:
          JENKINS-28041 fix failing unittest

          Compare: https://github.com/jenkinsci/jenkins/compare/998b2f2be5f4...b6bff4f2c078

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java http://jenkins-ci.org/commit/jenkins/b6bff4f2c078dc0f1474a96ab18f629c213aa509 Log: JENKINS-28041 fix failing unittest Compare: https://github.com/jenkinsci/jenkins/compare/998b2f2be5f4...b6bff4f2c078
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #4169
          JENKINS-28041 Extended delete-view CLI command to accept multiple names to delete (Revision 4ddc5aa313e6ba1c0fc0377552646bfddacf239e)
          JENKINS-28041 Extended delete-node CLI command to accept multiple names to delete (Revision 67e4e88b052dcad1d5802527e79ead32dafba3cf)
          JENKINS-28041 Extended delete-job CLI command to accept multiple names to delete (Revision c05b80f73d65f941441d6c1d1efa0ea713c6c3e4)
          JENKINS-28041 Code clean-up (Revision 3cc5162d68ee0f8922e1de184f75b34cdbac93bd)
          JENKINS-28041 Incorporated changes from feedback by Oleg (Revision 9d284a5e5f225d3465bfefd9c5946e4c48f7fa38)
          JENKINS-28041 fix failing unittest (Revision b6bff4f2c078dc0f1474a96ab18f629c213aa509)

          Result = SUCCESS
          pjanouse : 4ddc5aa313e6ba1c0fc0377552646bfddacf239e
          Files :

          • test/src/test/java/hudson/cli/DeleteViewCommandTest.java
          • core/src/main/resources/hudson/cli/Messages.properties
          • core/src/main/java/hudson/cli/DeleteViewCommand.java

          pjanouse : 67e4e88b052dcad1d5802527e79ead32dafba3cf
          Files :

          • core/src/main/resources/hudson/cli/Messages_de.properties
          • core/src/main/resources/hudson/model/Messages_ja.properties
          • core/src/main/resources/hudson/cli/Messages_it.properties
          • core/src/main/resources/hudson/cli/Messages.properties
          • core/src/main/resources/hudson/cli/Messages_zh_CN.properties
          • core/src/main/resources/hudson/model/Messages_de.properties
          • core/src/main/resources/hudson/model/Messages_da.properties
          • core/src/main/resources/hudson/model/Messages_pt_BR.properties
          • test/src/test/java/hudson/cli/DeleteNodeCommandTest.java
          • core/src/main/resources/hudson/cli/Messages_zh_TW.properties
          • core/src/main/resources/hudson/model/Messages_zh_CN.properties
          • core/src/main/java/hudson/model/Computer.java
          • core/src/main/resources/hudson/cli/Messages_da.properties
          • core/src/main/resources/hudson/cli/Messages_pt_BR.properties
          • core/src/main/resources/hudson/model/Messages.properties
          • core/src/main/resources/hudson/model/Messages_es.properties
          • core/src/main/resources/hudson/cli/Messages_es.properties
          • core/src/main/resources/hudson/model/Messages_zh_TW.properties
          • core/src/main/java/hudson/cli/DeleteNodeCommand.java
          • core/src/main/resources/hudson/model/Messages_it.properties
          • core/src/main/resources/hudson/cli/Messages_ja.properties

          pjanouse : c05b80f73d65f941441d6c1d1efa0ea713c6c3e4
          Files :

          • core/src/main/resources/hudson/model/Messages_it.properties
          • core/src/main/resources/hudson/cli/Messages_es.properties
          • core/src/main/resources/hudson/cli/Messages_da.properties
          • core/src/main/resources/hudson/cli/Messages_zh_TW.properties
          • core/src/main/java/hudson/cli/DeleteJobCommand.java
          • core/src/main/resources/hudson/model/Messages.properties
          • core/src/main/java/hudson/model/AbstractItem.java
          • core/src/main/resources/hudson/cli/Messages_ja.properties
          • core/src/main/resources/hudson/model/Messages_zh_TW.properties
          • test/src/test/java/hudson/cli/DeleteJobCommandTest.java
          • core/src/main/resources/hudson/model/Messages_pt_BR.properties
          • core/src/main/resources/hudson/cli/Messages_pt_BR.properties
          • core/src/main/resources/hudson/cli/Messages_zh_CN.properties
          • core/src/main/resources/hudson/cli/Messages_de.properties
          • core/src/main/resources/hudson/model/Messages_da.properties
          • core/src/main/resources/hudson/model/Messages_es.properties
          • core/src/main/resources/hudson/model/Messages_zh_CN.properties
          • core/src/main/resources/hudson/model/Messages_de.properties
          • core/src/main/resources/hudson/model/Messages_ja.properties
          • core/src/main/resources/hudson/cli/Messages_it.properties
          • core/src/main/resources/hudson/cli/Messages.properties

          pjanouse : 3cc5162d68ee0f8922e1de184f75b34cdbac93bd
          Files :

          • test/src/test/java/hudson/cli/DeleteViewCommandTest.java
          • core/src/main/java/hudson/cli/DeleteJobCommand.java
          • test/src/test/java/hudson/cli/DeleteNodeCommandTest.java
          • test/src/test/java/hudson/cli/DeleteJobCommandTest.java
          • core/src/main/java/hudson/cli/DeleteViewCommand.java
          • core/src/main/java/hudson/model/Computer.java
          • core/src/main/java/hudson/cli/DeleteNodeCommand.java
          • core/src/main/java/hudson/model/AbstractItem.java
          • core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java

          pjanouse : 9d284a5e5f225d3465bfefd9c5946e4c48f7fa38
          Files :

          • core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java
          • core/src/main/java/hudson/cli/DeleteJobCommand.java
          • core/src/main/java/hudson/cli/DeleteViewCommand.java
          • core/src/main/java/hudson/cli/DeleteNodeCommand.java
          • test/src/test/java/hudson/cli/DeleteViewCommandTest.java

          ogondza : b6bff4f2c078dc0f1474a96ab18f629c213aa509
          Files :

          • core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4169 JENKINS-28041 Extended delete-view CLI command to accept multiple names to delete (Revision 4ddc5aa313e6ba1c0fc0377552646bfddacf239e) JENKINS-28041 Extended delete-node CLI command to accept multiple names to delete (Revision 67e4e88b052dcad1d5802527e79ead32dafba3cf) JENKINS-28041 Extended delete-job CLI command to accept multiple names to delete (Revision c05b80f73d65f941441d6c1d1efa0ea713c6c3e4) JENKINS-28041 Code clean-up (Revision 3cc5162d68ee0f8922e1de184f75b34cdbac93bd) JENKINS-28041 Incorporated changes from feedback by Oleg (Revision 9d284a5e5f225d3465bfefd9c5946e4c48f7fa38) JENKINS-28041 fix failing unittest (Revision b6bff4f2c078dc0f1474a96ab18f629c213aa509) Result = SUCCESS pjanouse : 4ddc5aa313e6ba1c0fc0377552646bfddacf239e Files : test/src/test/java/hudson/cli/DeleteViewCommandTest.java core/src/main/resources/hudson/cli/Messages.properties core/src/main/java/hudson/cli/DeleteViewCommand.java pjanouse : 67e4e88b052dcad1d5802527e79ead32dafba3cf Files : core/src/main/resources/hudson/cli/Messages_de.properties core/src/main/resources/hudson/model/Messages_ja.properties core/src/main/resources/hudson/cli/Messages_it.properties core/src/main/resources/hudson/cli/Messages.properties core/src/main/resources/hudson/cli/Messages_zh_CN.properties core/src/main/resources/hudson/model/Messages_de.properties core/src/main/resources/hudson/model/Messages_da.properties core/src/main/resources/hudson/model/Messages_pt_BR.properties test/src/test/java/hudson/cli/DeleteNodeCommandTest.java core/src/main/resources/hudson/cli/Messages_zh_TW.properties core/src/main/resources/hudson/model/Messages_zh_CN.properties core/src/main/java/hudson/model/Computer.java core/src/main/resources/hudson/cli/Messages_da.properties core/src/main/resources/hudson/cli/Messages_pt_BR.properties core/src/main/resources/hudson/model/Messages.properties core/src/main/resources/hudson/model/Messages_es.properties core/src/main/resources/hudson/cli/Messages_es.properties core/src/main/resources/hudson/model/Messages_zh_TW.properties core/src/main/java/hudson/cli/DeleteNodeCommand.java core/src/main/resources/hudson/model/Messages_it.properties core/src/main/resources/hudson/cli/Messages_ja.properties pjanouse : c05b80f73d65f941441d6c1d1efa0ea713c6c3e4 Files : core/src/main/resources/hudson/model/Messages_it.properties core/src/main/resources/hudson/cli/Messages_es.properties core/src/main/resources/hudson/cli/Messages_da.properties core/src/main/resources/hudson/cli/Messages_zh_TW.properties core/src/main/java/hudson/cli/DeleteJobCommand.java core/src/main/resources/hudson/model/Messages.properties core/src/main/java/hudson/model/AbstractItem.java core/src/main/resources/hudson/cli/Messages_ja.properties core/src/main/resources/hudson/model/Messages_zh_TW.properties test/src/test/java/hudson/cli/DeleteJobCommandTest.java core/src/main/resources/hudson/model/Messages_pt_BR.properties core/src/main/resources/hudson/cli/Messages_pt_BR.properties core/src/main/resources/hudson/cli/Messages_zh_CN.properties core/src/main/resources/hudson/cli/Messages_de.properties core/src/main/resources/hudson/model/Messages_da.properties core/src/main/resources/hudson/model/Messages_es.properties core/src/main/resources/hudson/model/Messages_zh_CN.properties core/src/main/resources/hudson/model/Messages_de.properties core/src/main/resources/hudson/model/Messages_ja.properties core/src/main/resources/hudson/cli/Messages_it.properties core/src/main/resources/hudson/cli/Messages.properties pjanouse : 3cc5162d68ee0f8922e1de184f75b34cdbac93bd Files : test/src/test/java/hudson/cli/DeleteViewCommandTest.java core/src/main/java/hudson/cli/DeleteJobCommand.java test/src/test/java/hudson/cli/DeleteNodeCommandTest.java test/src/test/java/hudson/cli/DeleteJobCommandTest.java core/src/main/java/hudson/cli/DeleteViewCommand.java core/src/main/java/hudson/model/Computer.java core/src/main/java/hudson/cli/DeleteNodeCommand.java core/src/main/java/hudson/model/AbstractItem.java core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java pjanouse : 9d284a5e5f225d3465bfefd9c5946e4c48f7fa38 Files : core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java core/src/main/java/hudson/cli/DeleteJobCommand.java core/src/main/java/hudson/cli/DeleteViewCommand.java core/src/main/java/hudson/cli/DeleteNodeCommand.java test/src/test/java/hudson/cli/DeleteViewCommandTest.java ogondza : b6bff4f2c078dc0f1474a96ab18f629c213aa509 Files : core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java
          Hide
          felfert Fritz Elfert added a comment -

          This badly breaks cleanup of cloud-managed VMs (at least in jclouds-plugin and openstack-plugin)

          The cloud plugins extend AbstractCloudComputer and then override doDoDelete() in order to perform any cleanup (and delay the actual deleteion until this is done). The new delete-node command does not invoke this and thus when using this command, lots of unused VM's are kept around which get never cleaned up. In fact, there is no "hook" whatsoever anymore which allows a cloud plugin to intercept node deletion.

          If there's some other (new) functionality to intercept node-deletion please let me know.
          Unfortunately this made it into 1.625.1 LTS and I only noticed that change now. It is not even mentioned in the changelog.

          Show
          felfert Fritz Elfert added a comment - This badly breaks cleanup of cloud-managed VMs (at least in jclouds-plugin and openstack-plugin) The cloud plugins extend AbstractCloudComputer and then override doDoDelete() in order to perform any cleanup (and delay the actual deleteion until this is done). The new delete-node command does not invoke this and thus when using this command, lots of unused VM's are kept around which get never cleaned up. In fact, there is no "hook" whatsoever anymore which allows a cloud plugin to intercept node deletion. If there's some other (new) functionality to intercept node-deletion please let me know. Unfortunately this made it into 1.625.1 LTS and I only noticed that change now. It is not even mentioned in the changelog.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Fritz, please create new Critical bugs instead of reopening feature requests.

          doDoDelete() is a Stapler call designed for UIs, so I'm not sure it's a right place for the custom logic. BTW it should be investigated.

          Show
          oleg_nenashev Oleg Nenashev added a comment - Fritz, please create new Critical bugs instead of reopening feature requests. doDoDelete() is a Stapler call designed for UIs, so I'm not sure it's a right place for the custom logic. BTW it should be investigated.
          Hide
          felfert Fritz Elfert added a comment -
          Show
          felfert Fritz Elfert added a comment - Ok. https://issues.jenkins-ci.org/browse/JENKINS-31098 Continue discussion there.

            People

            • Assignee:
              pajasoft Pavel Janoušek
              Reporter:
              pajasoft Pavel Janoušek
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: