You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmmm. I'll chalk this up as related to saltstack/salt#37043. I don't think I've seen an example of an empty return being successful, so I'll special case this as an error.
Yep, it's a bug. The saltapi does not give a consistent response, so it is sometimes difficult to determine the success or failure of any query (hence the upstream bug report). In this particular case, I think we can also have the jenkins plugin detect this output and fail the job.
As a workaround, I think you could select the 'wait for completion' option which would fail on this output.
If you have an example of json response from the saltapi, I can ensure it passes validation. In your last mentioned output, it looks like the http endpoint returns a 401 which makes it sound like there was some other problem. Do you have an example response?
Just ran into this same issue. Adding the @jobs runner to the external auth allowed our user to access the /jobs endpoint: - '@jobs' # to allow access to the jobs runner and/or wheel module
Activity
mchugh19 commentedon Dec 20, 2016
Hmmm. I'll chalk this up as related to saltstack/salt#37043. I don't think I've seen an example of an empty return being successful, so I'll special case this as an error.
idokaplan commentedon Dec 20, 2016
I just want to make sure that I understand, is it a bug? is it related to Jenkins plugin or Salt?
mchugh19 commentedon Dec 20, 2016
Yep, it's a bug. The saltapi does not give a consistent response, so it is sometimes difficult to determine the success or failure of any query (hence the upstream bug report). In this particular case, I think we can also have the jenkins plugin detect this output and fail the job.
As a workaround, I think you could select the 'wait for completion' option which would fail on this output.
idokaplan commentedon Dec 20, 2016
I have selected "wait for completion", but all the builds fails even if they should be success.
{"Error": "java.io.IOException: Server returned HTTP response code: 401 for URL: https:// sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1676)\n\tat sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)\n\tat com.waytta.Utils.getJSON(Utils.java:57)\n\tat com.waytta.SaltAPIBuilder.perform(SaltAPIBuilder.java:297)\n\tat hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)\n\tat hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)\n\tat hudson.model.Build$BuildExecution.build(Build.java:205)\n\tat hudson.model.Build$BuildExecution.doRun(Build.java:162)\n\tat hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)\n\tat hudson.model.Run.execute(Run.java:1729)\n\tat hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)\n\tat hudson.model.ResourceController.execute(ResourceController.java:98)\n\tat hudson.model.Executor.run(Executor.java:404)\n"}
Build step 'Send a message to Salt API' marked build as failure
Finished: FAILURE
mchugh19 commentedon Mar 24, 2017
If you have an example of json response from the saltapi, I can ensure it passes validation. In your last mentioned output, it looks like the http endpoint returns a 401 which makes it sound like there was some other problem. Do you have an example response?
woody3000 commentedon Oct 22, 2018
Just ran into this same issue. Adding the @jobs runner to the external auth allowed our user to access the /jobs endpoint:
- '@jobs' # to allow access to the jobs runner and/or wheel module