[JIRA] [saltstack-plugin] (JENKINS-34535) net.sf.json.JSONException: JSONObject["result"] is not a Boolean

7 views
Skip to first unread message

zmcneilly@rez1.com (JIRA)

unread,
May 2, 2016, 11:36:01 AM5/2/16
to jenkinsc...@googlegroups.com
Zach McNeilly created an issue
 
Jenkins / Bug JENKINS-34535
net.sf.json.JSONException: JSONObject["result"] is not a Boolean
Issue Type: Bug Bug
Assignee: Christian McHugh
Components: saltstack-plugin
Created: 2016/May/02 3:35 PM
Environment: saltstack-plugin 1.7.0
saltmaster 2015.8.8.2

Priority: Minor Minor
Reporter: Zach McNeilly

When we use the saltstack-plugin to run "state.highstate" with "test=true" as the only KWArgument if there are any changes that would've been run we get the following output:

[EnvInject] - Loading node environment variables.
Building remotely on <host> in workspace <workspace>
Running jid: 20160502104957249184
Waiting for 4 minions
0 minions are done
Will check status every 10 seconds...
ERROR: Build step failed with exception
net.sf.json.JSONException: JSONObject["result"] is not a Boolean.
	at net.sf.json.JSONObject.getBoolean(JSONObject.java:1929)
	at com.waytta.Utils.validateInnerJsonObject(Utils.java:208)
	at com.waytta.Utils.validateInnerJsonObject(Utils.java:215)
	at com.waytta.Utils.validateFunctionCall(Utils.java:178)
	at com.waytta.SaltAPIBuilder.perform(SaltAPIBuilder.java:377)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
	at hudson.model.Build$BuildExecution.build(Build.java:205)
	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Build step 'Send a message to Salt API' marked build as failure
Notifying upstream projects of job completion
Finished: FAILURE

If there is an error with any state on any minion then this will return correctly. If there are no changes on any state on any minion it will also return correctly. It's only if there are changes that would be applied that we see this information.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

zmcneilly@rez1.com (JIRA)

unread,
May 2, 2016, 11:37:01 AM5/2/16
to jenkinsc...@googlegroups.com
Zach McNeilly updated an issue
Change By: Zach McNeilly
Environment: jenkins 1.635
java 1.7.0_79
saltstack-plugin 1.7.0
saltmaster 2015.8.8.2

scm_issue_link@java.net (JIRA)

unread,
May 6, 2016, 2:39:02 PM5/6/16
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Bug JENKINS-34535
 
Re: net.sf.json.JSONException: JSONObject["result"] is not a Boolean

Code changed in jenkins
User: Christian McHugh
Path:
src/main/java/com/waytta/Utils.java
src/test/java/com/waytta/UtilsTest.java
http://jenkins-ci.org/commit/saltstack-plugin/9d93e17995a4a86fec1cfee70b2f117dc9c49c13
Log:
Properly detect scenario where highstate would create changes and test=True. This causes the minion result key = "null" instead of a boolean. Closes JENKINS-34535

mchugh19@hotmail.com (JIRA)

unread,
May 6, 2016, 2:41:02 PM5/6/16
to jenkinsc...@googlegroups.com

As mentioned, performing a state.highstate test=True causes the results key to equal "null".

This situation is now tested for and handled as of 9d93e179

mchugh19@hotmail.com (JIRA)

unread,
May 6, 2016, 2:43:01 PM5/6/16
to jenkinsc...@googlegroups.com
Christian McHugh closed an issue as Fixed
 

Handed in 9d93e179

Change By: Christian McHugh
Status: Open Closed
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages