This thread is in relation to this ticket: https://github.com/sasjs/adapter/issues/829
Looking for support here whilst we figure out the root cause (maybe someone is already aware). It looks like something has changed recently on Viya 4 when it comes to running code in an existing session.
This is the request / response (running SASjs CLI with verbose mode):
ℹ HTTP Request:
POST /compute/sessions/ca3f4bdf-3cf8-48b5-91fb-f9f11999789c-ses0000/jobs HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsIREDACTED
User-Agent: axios/0.27.2
Content-Length: 1162
Host: extviya4.emea.sas.com
Connection: close
{
name: 'myJob',
description: 'Powered by SASjs',
code: [
'data work.demo;',
' do x=1 to 1e6;',
' y=ranuni(0);',
' end;',
'run;'
],
variables: {
SYS_JES_JOB_URI: '',
_program: '/Viyademo08 Group Folder/4GL/proj/yurshk/jobs/long/long',
_DEBUG: 131
},
arguments: {
_contextName: 'SAS Job Execution compute context',
_OMITJSONLISTING: true,
_OMITJSONLOG: true,
_OMITSESSIONRESULTS: false,
_OMITTEXTLISTING: true,
_OMITTEXTLOG: false
}
}
HTTP Response Code: 400
HTTP Response:
Date: Fri, 01 Sep 2023 15:14:27 GMT
Content-Type: application/vnd.sas.error+json;charset=utf-8;version=2
Content-Length: 470
Connection: close
Set-Cookie: sas-ingress-nginx=9a59cdfa1a238157REDACTED; Path=/compute/; Secure; HttpOnly; SameSite=Lax
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Security-Policy: default-src 'self'; object-src 'none'; frame-ancestors 'self'; form-action 'self';
Expires: 0
Pragma: no-cache
Sas-Service-Response-Flag: true
Vary: Origin
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
Strict-Transport-Security: max-age=63072000; includeSubDomains
{
version: 2,
httpStatusCode: 400,
errorCode: 5036,
message: 'The input provided for this request is not valid for this endpoint. ',
details: [
'path: /compute/sessions/ca3f4bdf-3cf8-48b5-91fb-f9f11999789c-ses0000/jobs',
'correlator: d03057f5-3c73-4a2c-b171-af28f8367024'
],
remediation: 'Check to make sure the request made to the server is a valid request. Contact your system administrator to determine if the request made from your application is formatted correctly.'
}
Checking the API docs the example body does appear to be different however it does not correspond to the referred JobRequest schema. Does anyone have any working examples, or can see what is wrong with our payload? It has worked fine for several years until now..
... View more