-
Bug
-
Resolution: Unresolved
-
Major
-
None
If the textual description of the build failure cause contains a single quote, then the notification command to gerrit will fail. For example:
SEVERE: Could not run command gerrit review 42422,1 --message 'Build Failed http://leeroy-jenkins/job/<some-job> : SUCCESS http://leeroy-jenkins/job/<some-other-job>: FAILURE Gradle couldn't successfully build your target. ( http://leeroy-jenkins//job/<some-other-job> ) http://leeroy-jenkins/job/<yet-another-build> : SUCCESS' --verified -1 --code-review 0 java.io.IOException: Error during sending command at <stack trace> Caused by: com.sonymobile.tools.gerrit.gerritevents.ssh.SshException: fatal: "successfully" is not a valid patch set (1) at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.executeCommand(SshConnectionImpl.java:253)
[JENKINS-28273] Failure explanation text not sanitized prior to issuing gerrit review command
Description |
Original:
If the textual description of the build failure cause contains a single quote, then the notification command to gerrit will fail. For example: {noformat} SEVERE: Could not run command gerrit review 42422,1 --message 'Build Failed http://leeroy-jenkins/job/<some-job> : SUCCESS http://leeroy-jenkins/job/<some-other-job>: FAILURE Gradle couldn't successfully build your target. ( http://leeroy-jenkins//job/<some-other-job> ) http://leeroy-jenkins/job/gerrit-controller-uxbuild-sanity/16467/ : SUCCESS' --verified -1 --code-review 0 java.io.IOException: Error during sending command at <stack trace> Caused by: com.sonymobile.tools.gerrit.gerritevents.ssh.SshException: fatal: "successfully" is not a valid patch set (1) at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.executeCommand(SshConnectionImpl.java:253) {noformat} {noformat} |
New:
If the textual description of the build failure cause contains a single quote, then the notification command to gerrit will fail. For example: {noformat} SEVERE: Could not run command gerrit review 42422,1 --message 'Build Failed http://leeroy-jenkins/job/<some-job> : SUCCESS http://leeroy-jenkins/job/<some-other-job>: FAILURE Gradle couldn't successfully build your target. ( http://leeroy-jenkins//job/<some-other-job> ) http://leeroy-jenkins/job/<yet-another-build> : SUCCESS' --verified -1 --code-review 0 java.io.IOException: Error during sending command at <stack trace> Caused by: com.sonymobile.tools.gerrit.gerritevents.ssh.SshException: fatal: "successfully" is not a valid patch set (1) at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.executeCommand(SshConnectionImpl.java:253) {noformat} {noformat} |
Workflow | Original: JNJira [ 163105 ] | New: JNJira + In-Review [ 181102 ] |
We encounter the same error quite often now, have a look at some longer logs https://gist.github.com/ssbarnea/0cbad6c4464b0d4bf4e0aec7c03a4b0b
My impression is that existence of single quotes inside the message will break the execution.