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

Refactor and unify issue handling in CLI commands

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • cli, core
    • None

      TL;DR;
      The aim of this JIRA is to start unification of an issue handling in CLI commands.

      Details:
      Currently there is a discrepancy between returned error codes if an issue occurred during execution. It depends on the fact whether the CLI command is implemented as @CLIMethod or extending hudson.cli.CLICommand class.

      @CLIMethod usually returns 1 in the case an issue occurred, similar situation in hudson.cli.CLICommand returns -1 to the shell.

      There is an ongoing effort to extract all CLI commands from the Core to CLI (see JENKINS-22969), so the discrepancy should be removed shortly and consistent error code definition should be set-up on one place only - in hudson.cli.CLICommand.

      Currently we should use this semantic in CLI:

      • 0 means All right
      • -1 means An error occurred

      Technically anything else than zero means an issue occurred. Later we can use more precisely defined error codes for the different issues if useful.

      Update 07-Jan-2016 (WIP):

      TODO

      • Refactor core commands to use correct exception classes
      • Update javadoc for CLICommand#run
      • Unify the handling in CLIRegisterer

      Proposed a new unified scheme of exception raising, handling, reporting and error code returning:
      Update 12-Feb-2016: - Exception -> Throwable

      Exception name Meaning Correct usage Incorrect usage Processing Return code
      CmdLineException Wrong parameter,
      input value can't be decoded etc.
      CommandDuringBuild.java
      • catch in CLICommand
      • print "\nERROR: " + cause message to stderr
      • print usage help
      2
      IllegalStateException Can't continue due to an incorrect
      state of Jenkins instance, job, build etc.
      CommandDuringBuild.java
      comes from Jenkins.getActiveInstance()
      none
      • catch in CLICommand
      • print "\nERROR: " + cause message to stderr
      4
      IllegalArgumentException Can't continue due to
      wrong input parameter (job doesn't exist etc.)
      CopyJobCommand.java
      • catch in CLICommand
      • print "\nERROR: " + cause message to stderr
      3
      AbortException Can't continue due to an other (rare) issue
      Note: Current usage of this exception is wrong,
      usually there should be IllegalState or CmdLine exception
      raised instead of this
      none
      • catch in CLICommand
      • print "\nERROR: " + cause message to stderr
      5
      AccessDeniedException Not sufficent rights for requested action comes from checkPermission() none
      • catch in CLICommand
      • print "\nERROR: " + cause message to stderr
      6
      BadCredentialsException Bad credentials provided via the CLI N/A N/A
      • catch in CLICommand
      • print "\nERROR: " + cause message to stderr with HASH
      • log a cause (HASH included) with INFO level
      7
      Exception
      Throwable
      Any unknown issue occurred, just to report it for the record N/A N/A
      • catch in CLICommand
      • print "\nERROR: " + general message to stderr
      • log general message + exception with WARNING level
      • print stacktrace to stderr for further investigation
      1

          [JENKINS-32273] Refactor and unify issue handling in CLI commands

          Oliver Gondža added a comment - - edited

          I suggest to keep the cases when command is putting Jenkins into some state (computer offline, jenkins quieting down, job in view, etc.) while it already is in such state aside for now as I would like to see those idempotent and therefore return 0. (Unless we want to squeeze such change into this PR).

          I fail to come up with a definition of foreseeable failure class. Consider there is a client that calls Jenkins CLI internally, how would handling of such problems differ?

          Oliver Gondža added a comment - - edited I suggest to keep the cases when command is putting Jenkins into some state (computer offline, jenkins quieting down, job in view, etc.) while it already is in such state aside for now as I would like to see those idempotent and therefore return 0. (Unless we want to squeeze such change into this PR). I fail to come up with a definition of foreseeable failure class. Consider there is a client that calls Jenkins CLI internally, how would handling of such problems differ?

          Daniel Beck added a comment -

          I would like to see those idempotent and therefore return 0.

          Good point. Still leaves creating/renaming a job when the name is already taken. Trying to get-job a job that does not exist. Etc.

          Daniel Beck added a comment - I would like to see those idempotent and therefore return 0. Good point. Still leaves creating/renaming a job when the name is already taken. Trying to get-job a job that does not exist. Etc.

          I don't see an issue to start error return codes numbering in the above table from 2 if necessary.

          My intention is to have uniform issue handling/reporting from all CLI commands. I think the best way how we can do that is to throw appropriate exception (following above scheme) when it occurs and pass its handling/reporting to the CLICommand class itself.

          If we follow that every CLI command can on "foreseeable issue" return its own code (includes reporting), we can lost this benefit at all and return to the previous state.

          Pavel Janoušek added a comment - I don't see an issue to start error return codes numbering in the above table from 2 if necessary. My intention is to have uniform issue handling/reporting from all CLI commands. I think the best way how we can do that is to throw appropriate exception (following above scheme) when it occurs and pass its handling/reporting to the CLICommand class itself. If we follow that every CLI command can on "foreseeable issue" return its own code (includes reporting), we can lost this benefit at all and return to the previous state.

          James Nord added a comment - - edited

          @danielBeck - I suggest your example of rename not the correct use case here - basically what we are trying to say is - the command ran perfectly fine and did exactly what you asked it to - but there is nothing to report / no side effects.

          This is distinct from the command not doing what you asked due to some reason (the job you asked it to rename already exists)

          e.g. consider a fictional CLI command isJenkinsInQueitDownMode.

          to be usable by scripts you would want 2 different exit codes (but both mean the command ran ok) - 0 would be false, 1 would be true and >1 is error_something_bad_happened. Otherwise you need to output some text - and that text should be localizable for humans - which means you need to write a whole boat load of code on your script to both parse the response and generate the outpu - ie a --machine-output=true flag)

          So 1 is not an error case and it is not for "forseeable errors" - its where the CLI wants to say Hey I ran successfully but (similar to grep foo bar when bar does not contain foo.

          James Nord added a comment - - edited @danielBeck - I suggest your example of rename not the correct use case here - basically what we are trying to say is - the command ran perfectly fine and did exactly what you asked it to - but there is nothing to report / no side effects. This is distinct from the command not doing what you asked due to some reason (the job you asked it to rename already exists) e.g. consider a fictional CLI command isJenkinsInQueitDownMode . to be usable by scripts you would want 2 different exit codes (but both mean the command ran ok) - 0 would be false, 1 would be true and >1 is error_something_bad_happened. Otherwise you need to output some text - and that text should be localizable for humans - which means you need to write a whole boat load of code on your script to both parse the response and generate the outpu - ie a --machine-output=true flag) So 1 is not an error case and it is not for "forseeable errors" - its where the CLI wants to say Hey I ran successfully but (similar to grep foo bar when bar does not contain foo.

          Pavel Janoušek added a comment - - edited

          Exception isn't enough general standpoint.

          For example Java language assert code (raises java.lang.AssertionException which isn't derived from java.lang.Exception). We have to catch an unchecked exception as well, so I've changed Exception to Throwable as the most general standpoint if anything unknown goes wrong.

          Pavel Janoušek added a comment - - edited Exception isn't enough general standpoint. For example Java language assert code (raises java.lang.AssertionException which isn't derived from java.lang.Exception ). We have to catch an unchecked exception as well, so I've changed Exception to Throwable as the most general standpoint if anything unknown goes wrong.

          Code changed in jenkins
          User: Ing. Pavel Janousek
          Path:
          core/src/main/java/hudson/cli/CLICommand.java
          http://jenkins-ci.org/commit/jenkins/49d9f0e1b5872b7eea4d22c8b5edd634cc28e9f6
          Log:
          JENKINS-32273 Refactored return error codes and messages

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ing. Pavel Janousek Path: core/src/main/java/hudson/cli/CLICommand.java http://jenkins-ci.org/commit/jenkins/49d9f0e1b5872b7eea4d22c8b5edd634cc28e9f6 Log: JENKINS-32273 Refactored return error codes and messages

          Code changed in jenkins
          User: Ing. Pavel Janousek
          Path:
          core/src/main/java/hudson/cli/AddJobToViewCommand.java
          core/src/main/java/hudson/cli/BuildCommand.java
          core/src/main/java/hudson/cli/CLIAction.java
          core/src/main/java/hudson/cli/CLICommand.java
          core/src/main/java/hudson/cli/CliProtocol.java
          core/src/main/java/hudson/cli/CliProtocol2.java
          core/src/main/java/hudson/cli/ClientAuthenticationCache.java
          core/src/main/java/hudson/cli/CommandDuringBuild.java
          core/src/main/java/hudson/cli/ConsoleCommand.java
          core/src/main/java/hudson/cli/CopyJobCommand.java
          core/src/main/java/hudson/cli/CreateJobCommand.java
          core/src/main/java/hudson/cli/CreateNodeCommand.java
          core/src/main/java/hudson/cli/CreateViewCommand.java
          core/src/main/java/hudson/cli/DeleteJobCommand.java
          core/src/main/java/hudson/cli/DeleteNodeCommand.java
          core/src/main/java/hudson/cli/DeleteViewCommand.java
          core/src/main/java/hudson/cli/GroovyCommand.java
          core/src/main/java/hudson/cli/GroovyshCommand.java
          core/src/main/java/hudson/cli/HelpCommand.java
          core/src/main/java/hudson/cli/InstallPluginCommand.java
          core/src/main/java/hudson/cli/InstallToolCommand.java
          core/src/main/java/hudson/cli/ListJobsCommand.java
          core/src/main/java/hudson/cli/ListPluginsCommand.java
          core/src/main/java/hudson/cli/OnlineNodeCommand.java
          core/src/main/java/hudson/cli/ReloadJobCommand.java
          core/src/main/java/hudson/cli/RemoveJobFromViewCommand.java
          core/src/main/java/hudson/cli/SetBuildDisplayNameCommand.java
          core/src/main/java/hudson/cli/declarative/CLIRegisterer.java
          core/src/main/java/hudson/cli/handlers/GenericItemOptionHandler.java
          core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java
          core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java
          core/src/test/java/hudson/cli/ListJobsCommandTest.java
          core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java
          test/src/test/groovy/hudson/cli/BuildCommandTest.groovy
          test/src/test/java/hudson/cli/CLIRegistererTest.java
          test/src/test/java/hudson/cli/CopyJobCommandTest.java
          test/src/test/java/hudson/cli/CreateJobCommandTest.java
          test/src/test/java/hudson/cli/CreateNodeCommandTest.java
          test/src/test/java/hudson/cli/CreateViewCommandTest.java
          test/src/test/java/hudson/cli/DeleteJobCommandTest.java
          test/src/test/java/hudson/cli/DeleteNodeCommandTest.java
          test/src/test/java/hudson/cli/DeleteViewCommandTest.java
          test/src/test/java/hudson/cli/GetNodeCommandTest.java
          test/src/test/java/hudson/cli/GetViewCommandTest.java
          test/src/test/java/hudson/cli/OnlineNodeCommandTest.java
          test/src/test/java/hudson/cli/ReloadJobCommandTest.java
          test/src/test/java/hudson/cli/SetBuildDisplayNameCommandTest.java
          test/src/test/java/hudson/cli/UpdateNodeCommandTest.java
          test/src/test/java/hudson/cli/UpdateViewCommandTest.java
          test/src/test/java/hudson/cli/ViewManipulationTest.java
          test/src/test/java/jenkins/security/Security218CliTest.java
          http://jenkins-ci.org/commit/jenkins/d5725e6d18c0bcd4a2640943eaea059f137786bc
          Log:
          JENKINS-32273 Unified an issue handling in CLI

          Re-factored all existed CLI code to follow the new proposed scheme for
          raising an exception if issue occurs, handling and reporting it.
          Unified CLIRegisterer as well.
          Fixed unit tests to follow the new scheme.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ing. Pavel Janousek Path: core/src/main/java/hudson/cli/AddJobToViewCommand.java core/src/main/java/hudson/cli/BuildCommand.java core/src/main/java/hudson/cli/CLIAction.java core/src/main/java/hudson/cli/CLICommand.java core/src/main/java/hudson/cli/CliProtocol.java core/src/main/java/hudson/cli/CliProtocol2.java core/src/main/java/hudson/cli/ClientAuthenticationCache.java core/src/main/java/hudson/cli/CommandDuringBuild.java core/src/main/java/hudson/cli/ConsoleCommand.java core/src/main/java/hudson/cli/CopyJobCommand.java core/src/main/java/hudson/cli/CreateJobCommand.java core/src/main/java/hudson/cli/CreateNodeCommand.java core/src/main/java/hudson/cli/CreateViewCommand.java core/src/main/java/hudson/cli/DeleteJobCommand.java core/src/main/java/hudson/cli/DeleteNodeCommand.java core/src/main/java/hudson/cli/DeleteViewCommand.java core/src/main/java/hudson/cli/GroovyCommand.java core/src/main/java/hudson/cli/GroovyshCommand.java core/src/main/java/hudson/cli/HelpCommand.java core/src/main/java/hudson/cli/InstallPluginCommand.java core/src/main/java/hudson/cli/InstallToolCommand.java core/src/main/java/hudson/cli/ListJobsCommand.java core/src/main/java/hudson/cli/ListPluginsCommand.java core/src/main/java/hudson/cli/OnlineNodeCommand.java core/src/main/java/hudson/cli/ReloadJobCommand.java core/src/main/java/hudson/cli/RemoveJobFromViewCommand.java core/src/main/java/hudson/cli/SetBuildDisplayNameCommand.java core/src/main/java/hudson/cli/declarative/CLIRegisterer.java core/src/main/java/hudson/cli/handlers/GenericItemOptionHandler.java core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java core/src/test/java/hudson/cli/ListJobsCommandTest.java core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java test/src/test/groovy/hudson/cli/BuildCommandTest.groovy test/src/test/java/hudson/cli/CLIRegistererTest.java test/src/test/java/hudson/cli/CopyJobCommandTest.java test/src/test/java/hudson/cli/CreateJobCommandTest.java test/src/test/java/hudson/cli/CreateNodeCommandTest.java test/src/test/java/hudson/cli/CreateViewCommandTest.java test/src/test/java/hudson/cli/DeleteJobCommandTest.java test/src/test/java/hudson/cli/DeleteNodeCommandTest.java test/src/test/java/hudson/cli/DeleteViewCommandTest.java test/src/test/java/hudson/cli/GetNodeCommandTest.java test/src/test/java/hudson/cli/GetViewCommandTest.java test/src/test/java/hudson/cli/OnlineNodeCommandTest.java test/src/test/java/hudson/cli/ReloadJobCommandTest.java test/src/test/java/hudson/cli/SetBuildDisplayNameCommandTest.java test/src/test/java/hudson/cli/UpdateNodeCommandTest.java test/src/test/java/hudson/cli/UpdateViewCommandTest.java test/src/test/java/hudson/cli/ViewManipulationTest.java test/src/test/java/jenkins/security/Security218CliTest.java http://jenkins-ci.org/commit/jenkins/d5725e6d18c0bcd4a2640943eaea059f137786bc Log: JENKINS-32273 Unified an issue handling in CLI Re-factored all existed CLI code to follow the new proposed scheme for raising an exception if issue occurs, handling and reporting it. Unified CLIRegisterer as well. Fixed unit tests to follow the new scheme.

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          core/src/main/java/hudson/cli/AddJobToViewCommand.java
          core/src/main/java/hudson/cli/BuildCommand.java
          core/src/main/java/hudson/cli/CLIAction.java
          core/src/main/java/hudson/cli/CLICommand.java
          core/src/main/java/hudson/cli/CliProtocol.java
          core/src/main/java/hudson/cli/CliProtocol2.java
          core/src/main/java/hudson/cli/ClientAuthenticationCache.java
          core/src/main/java/hudson/cli/CommandDuringBuild.java
          core/src/main/java/hudson/cli/ConsoleCommand.java
          core/src/main/java/hudson/cli/CopyJobCommand.java
          core/src/main/java/hudson/cli/CreateJobCommand.java
          core/src/main/java/hudson/cli/CreateNodeCommand.java
          core/src/main/java/hudson/cli/CreateViewCommand.java
          core/src/main/java/hudson/cli/DeleteJobCommand.java
          core/src/main/java/hudson/cli/DeleteNodeCommand.java
          core/src/main/java/hudson/cli/DeleteViewCommand.java
          core/src/main/java/hudson/cli/GroovyCommand.java
          core/src/main/java/hudson/cli/GroovyshCommand.java
          core/src/main/java/hudson/cli/HelpCommand.java
          core/src/main/java/hudson/cli/InstallPluginCommand.java
          core/src/main/java/hudson/cli/InstallToolCommand.java
          core/src/main/java/hudson/cli/ListJobsCommand.java
          core/src/main/java/hudson/cli/ListPluginsCommand.java
          core/src/main/java/hudson/cli/OnlineNodeCommand.java
          core/src/main/java/hudson/cli/ReloadJobCommand.java
          core/src/main/java/hudson/cli/RemoveJobFromViewCommand.java
          core/src/main/java/hudson/cli/SetBuildDisplayNameCommand.java
          core/src/main/java/hudson/cli/declarative/CLIRegisterer.java
          core/src/main/java/hudson/cli/handlers/GenericItemOptionHandler.java
          core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java
          core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java
          core/src/test/java/hudson/cli/ListJobsCommandTest.java
          core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java
          test/src/test/groovy/hudson/cli/BuildCommandTest.groovy
          test/src/test/java/hudson/cli/CLIRegistererTest.java
          test/src/test/java/hudson/cli/CopyJobCommandTest.java
          test/src/test/java/hudson/cli/CreateJobCommandTest.java
          test/src/test/java/hudson/cli/CreateNodeCommandTest.java
          test/src/test/java/hudson/cli/CreateViewCommandTest.java
          test/src/test/java/hudson/cli/DeleteJobCommandTest.java
          test/src/test/java/hudson/cli/DeleteNodeCommandTest.java
          test/src/test/java/hudson/cli/DeleteViewCommandTest.java
          test/src/test/java/hudson/cli/GetNodeCommandTest.java
          test/src/test/java/hudson/cli/GetViewCommandTest.java
          test/src/test/java/hudson/cli/OnlineNodeCommandTest.java
          test/src/test/java/hudson/cli/ReloadJobCommandTest.java
          test/src/test/java/hudson/cli/SetBuildDisplayNameCommandTest.java
          test/src/test/java/hudson/cli/UpdateNodeCommandTest.java
          test/src/test/java/hudson/cli/UpdateViewCommandTest.java
          test/src/test/java/hudson/cli/ViewManipulationTest.java
          test/src/test/java/jenkins/security/Security218CliTest.java
          http://jenkins-ci.org/commit/jenkins/fe41dc89ab9801c9d57713f84e650788e172e115
          Log:
          Merge pull request #1997 from pjanouse/JENKINS-32273

          JENKINS-32273 Unified an issue handling in CLI

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/src/main/java/hudson/cli/AddJobToViewCommand.java core/src/main/java/hudson/cli/BuildCommand.java core/src/main/java/hudson/cli/CLIAction.java core/src/main/java/hudson/cli/CLICommand.java core/src/main/java/hudson/cli/CliProtocol.java core/src/main/java/hudson/cli/CliProtocol2.java core/src/main/java/hudson/cli/ClientAuthenticationCache.java core/src/main/java/hudson/cli/CommandDuringBuild.java core/src/main/java/hudson/cli/ConsoleCommand.java core/src/main/java/hudson/cli/CopyJobCommand.java core/src/main/java/hudson/cli/CreateJobCommand.java core/src/main/java/hudson/cli/CreateNodeCommand.java core/src/main/java/hudson/cli/CreateViewCommand.java core/src/main/java/hudson/cli/DeleteJobCommand.java core/src/main/java/hudson/cli/DeleteNodeCommand.java core/src/main/java/hudson/cli/DeleteViewCommand.java core/src/main/java/hudson/cli/GroovyCommand.java core/src/main/java/hudson/cli/GroovyshCommand.java core/src/main/java/hudson/cli/HelpCommand.java core/src/main/java/hudson/cli/InstallPluginCommand.java core/src/main/java/hudson/cli/InstallToolCommand.java core/src/main/java/hudson/cli/ListJobsCommand.java core/src/main/java/hudson/cli/ListPluginsCommand.java core/src/main/java/hudson/cli/OnlineNodeCommand.java core/src/main/java/hudson/cli/ReloadJobCommand.java core/src/main/java/hudson/cli/RemoveJobFromViewCommand.java core/src/main/java/hudson/cli/SetBuildDisplayNameCommand.java core/src/main/java/hudson/cli/declarative/CLIRegisterer.java core/src/main/java/hudson/cli/handlers/GenericItemOptionHandler.java core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java core/src/test/java/hudson/cli/ListJobsCommandTest.java core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java test/src/test/groovy/hudson/cli/BuildCommandTest.groovy test/src/test/java/hudson/cli/CLIRegistererTest.java test/src/test/java/hudson/cli/CopyJobCommandTest.java test/src/test/java/hudson/cli/CreateJobCommandTest.java test/src/test/java/hudson/cli/CreateNodeCommandTest.java test/src/test/java/hudson/cli/CreateViewCommandTest.java test/src/test/java/hudson/cli/DeleteJobCommandTest.java test/src/test/java/hudson/cli/DeleteNodeCommandTest.java test/src/test/java/hudson/cli/DeleteViewCommandTest.java test/src/test/java/hudson/cli/GetNodeCommandTest.java test/src/test/java/hudson/cli/GetViewCommandTest.java test/src/test/java/hudson/cli/OnlineNodeCommandTest.java test/src/test/java/hudson/cli/ReloadJobCommandTest.java test/src/test/java/hudson/cli/SetBuildDisplayNameCommandTest.java test/src/test/java/hudson/cli/UpdateNodeCommandTest.java test/src/test/java/hudson/cli/UpdateViewCommandTest.java test/src/test/java/hudson/cli/ViewManipulationTest.java test/src/test/java/jenkins/security/Security218CliTest.java http://jenkins-ci.org/commit/jenkins/fe41dc89ab9801c9d57713f84e650788e172e115 Log: Merge pull request #1997 from pjanouse/ JENKINS-32273 JENKINS-32273 Unified an issue handling in CLI

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4458
          JENKINS-32273 Refactored return error codes and messages (Revision 49d9f0e1b5872b7eea4d22c8b5edd634cc28e9f6)
          JENKINS-32273 Unified an issue handling in CLI (Revision d5725e6d18c0bcd4a2640943eaea059f137786bc)

          Result = SUCCESS
          pjanouse : 49d9f0e1b5872b7eea4d22c8b5edd634cc28e9f6
          Files :

          • core/src/main/java/hudson/cli/CLICommand.java

          pjanouse : d5725e6d18c0bcd4a2640943eaea059f137786bc
          Files :

          • test/src/test/java/hudson/cli/SetBuildDisplayNameCommandTest.java
          • core/src/main/java/hudson/cli/DeleteNodeCommand.java
          • core/src/main/java/hudson/cli/handlers/GenericItemOptionHandler.java
          • test/src/test/java/hudson/cli/UpdateViewCommandTest.java
          • core/src/test/java/hudson/cli/ListJobsCommandTest.java
          • core/src/main/java/hudson/cli/GroovyCommand.java
          • core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java
          • test/src/test/java/hudson/cli/GetViewCommandTest.java
          • test/src/test/java/hudson/cli/CopyJobCommandTest.java
          • core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java
          • core/src/main/java/hudson/cli/InstallPluginCommand.java
          • core/src/main/java/hudson/cli/CommandDuringBuild.java
          • test/src/test/groovy/hudson/cli/BuildCommandTest.groovy
          • test/src/test/java/hudson/cli/ViewManipulationTest.java
          • test/src/test/java/hudson/cli/DeleteNodeCommandTest.java
          • test/src/test/java/hudson/cli/CreateNodeCommandTest.java
          • test/src/test/java/hudson/cli/GetNodeCommandTest.java
          • core/src/main/java/hudson/cli/RemoveJobFromViewCommand.java
          • core/src/main/java/hudson/cli/ListJobsCommand.java
          • core/src/main/java/hudson/cli/InstallToolCommand.java
          • core/src/main/java/hudson/cli/BuildCommand.java
          • test/src/test/java/hudson/cli/CreateViewCommandTest.java
          • core/src/main/java/hudson/cli/ConsoleCommand.java
          • test/src/test/java/hudson/cli/CreateJobCommandTest.java
          • core/src/main/java/hudson/cli/ClientAuthenticationCache.java
          • core/src/main/java/hudson/cli/SetBuildDisplayNameCommand.java
          • core/src/main/java/hudson/cli/GroovyshCommand.java
          • core/src/main/java/hudson/cli/CreateJobCommand.java
          • core/src/main/java/hudson/cli/DeleteViewCommand.java
          • test/src/test/java/hudson/cli/UpdateNodeCommandTest.java
          • core/src/main/java/hudson/cli/CliProtocol.java
          • core/src/main/java/hudson/cli/CLICommand.java
          • test/src/test/java/jenkins/security/Security218CliTest.java
          • core/src/main/java/hudson/cli/ListPluginsCommand.java
          • core/src/main/java/hudson/cli/CLIAction.java
          • core/src/main/java/hudson/cli/declarative/CLIRegisterer.java
          • core/src/main/java/hudson/cli/ReloadJobCommand.java
          • core/src/main/java/hudson/cli/HelpCommand.java
          • test/src/test/java/hudson/cli/CLIRegistererTest.java
          • test/src/test/java/hudson/cli/OnlineNodeCommandTest.java
          • core/src/main/java/hudson/cli/OnlineNodeCommand.java
          • core/src/main/java/hudson/cli/AddJobToViewCommand.java
          • core/src/main/java/hudson/cli/CliProtocol2.java
          • core/src/main/java/hudson/cli/CreateNodeCommand.java
          • test/src/test/java/hudson/cli/DeleteJobCommandTest.java
          • core/src/main/java/hudson/cli/CreateViewCommand.java
          • test/src/test/java/hudson/cli/DeleteViewCommandTest.java
          • core/src/main/java/hudson/cli/DeleteJobCommand.java
          • core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java
          • test/src/test/java/hudson/cli/ReloadJobCommandTest.java
          • core/src/main/java/hudson/cli/CopyJobCommand.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4458 JENKINS-32273 Refactored return error codes and messages (Revision 49d9f0e1b5872b7eea4d22c8b5edd634cc28e9f6) JENKINS-32273 Unified an issue handling in CLI (Revision d5725e6d18c0bcd4a2640943eaea059f137786bc) Result = SUCCESS pjanouse : 49d9f0e1b5872b7eea4d22c8b5edd634cc28e9f6 Files : core/src/main/java/hudson/cli/CLICommand.java pjanouse : d5725e6d18c0bcd4a2640943eaea059f137786bc Files : test/src/test/java/hudson/cli/SetBuildDisplayNameCommandTest.java core/src/main/java/hudson/cli/DeleteNodeCommand.java core/src/main/java/hudson/cli/handlers/GenericItemOptionHandler.java test/src/test/java/hudson/cli/UpdateViewCommandTest.java core/src/test/java/hudson/cli/ListJobsCommandTest.java core/src/main/java/hudson/cli/GroovyCommand.java core/src/main/java/hudson/cli/handlers/ViewOptionHandler.java test/src/test/java/hudson/cli/GetViewCommandTest.java test/src/test/java/hudson/cli/CopyJobCommandTest.java core/src/test/java/hudson/cli/handlers/ViewOptionHandlerTest.java core/src/main/java/hudson/cli/InstallPluginCommand.java core/src/main/java/hudson/cli/CommandDuringBuild.java test/src/test/groovy/hudson/cli/BuildCommandTest.groovy test/src/test/java/hudson/cli/ViewManipulationTest.java test/src/test/java/hudson/cli/DeleteNodeCommandTest.java test/src/test/java/hudson/cli/CreateNodeCommandTest.java test/src/test/java/hudson/cli/GetNodeCommandTest.java core/src/main/java/hudson/cli/RemoveJobFromViewCommand.java core/src/main/java/hudson/cli/ListJobsCommand.java core/src/main/java/hudson/cli/InstallToolCommand.java core/src/main/java/hudson/cli/BuildCommand.java test/src/test/java/hudson/cli/CreateViewCommandTest.java core/src/main/java/hudson/cli/ConsoleCommand.java test/src/test/java/hudson/cli/CreateJobCommandTest.java core/src/main/java/hudson/cli/ClientAuthenticationCache.java core/src/main/java/hudson/cli/SetBuildDisplayNameCommand.java core/src/main/java/hudson/cli/GroovyshCommand.java core/src/main/java/hudson/cli/CreateJobCommand.java core/src/main/java/hudson/cli/DeleteViewCommand.java test/src/test/java/hudson/cli/UpdateNodeCommandTest.java core/src/main/java/hudson/cli/CliProtocol.java core/src/main/java/hudson/cli/CLICommand.java test/src/test/java/jenkins/security/Security218CliTest.java core/src/main/java/hudson/cli/ListPluginsCommand.java core/src/main/java/hudson/cli/CLIAction.java core/src/main/java/hudson/cli/declarative/CLIRegisterer.java core/src/main/java/hudson/cli/ReloadJobCommand.java core/src/main/java/hudson/cli/HelpCommand.java test/src/test/java/hudson/cli/CLIRegistererTest.java test/src/test/java/hudson/cli/OnlineNodeCommandTest.java core/src/main/java/hudson/cli/OnlineNodeCommand.java core/src/main/java/hudson/cli/AddJobToViewCommand.java core/src/main/java/hudson/cli/CliProtocol2.java core/src/main/java/hudson/cli/CreateNodeCommand.java test/src/test/java/hudson/cli/DeleteJobCommandTest.java core/src/main/java/hudson/cli/CreateViewCommand.java test/src/test/java/hudson/cli/DeleteViewCommandTest.java core/src/main/java/hudson/cli/DeleteJobCommand.java core/src/main/java/hudson/cli/handlers/NodeOptionHandler.java test/src/test/java/hudson/cli/ReloadJobCommandTest.java core/src/main/java/hudson/cli/CopyJobCommand.java

          Code changed in jenkins
          User: Jesse Glick
          Path:
          test/src/test/java/hudson/cli/GetNodeCommandTest.java
          test/src/test/java/hudson/cli/UpdateNodeCommandTest.java
          http://jenkins-ci.org/commit/jenkins/9f3f352ee989c861e5304dc0ac4e7b06f7fd1403
          Log:
          JENKINS-32273 CLI exit codes changed as of #1997 in 1.649.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/test/java/hudson/cli/GetNodeCommandTest.java test/src/test/java/hudson/cli/UpdateNodeCommandTest.java http://jenkins-ci.org/commit/jenkins/9f3f352ee989c861e5304dc0ac4e7b06f7fd1403 Log: JENKINS-32273 CLI exit codes changed as of #1997 in 1.649.

            pajasoft Pavel Janoušek
            pajasoft Pavel Janoušek
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: