Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch parent session log when job fails without recording log #1350

Open
tmoody opened this issue Jun 29, 2023 · 0 comments
Open

Fetch parent session log when job fails without recording log #1350

tmoody opened this issue Jun 29, 2023 · 0 comments
Assignees

Comments

@tmoody
Copy link
Member

tmoody commented Jun 29, 2023

In cases where SASjs checks the status of a submitted job it may receive a response such as the following:

23:27:45 [info] Current job state: ErrorResponse[version=2,status=400,err=5113,id=,message=The session requested is currently in a failed or stopped state.,detail=[path: /compute/sessions/7e97f5a5-b60d-4849-b1ca-edd5d973eb2e-ses0003/jobs/ABE132DF-B639-6347-8E75-F648D0168FFB/state, traceId: d04fd7e5fd56e180],remediation=Correct the errors in the session request, and create a new session.,targetUri=<null>,errors=[],links=[]]
23:27:45 [error] Error executing job: Cannot read properties of undefined (reading 'href')
23:27:45 at node_modules/[@sasjs/cli/build/commands/job/internal/execute/viya.js:172:123](https://matrix.to/#/@sasjs/cli/build/commands/job/internal/execute/viya.js:172:123)
23:27:45 at step (node_modules/[@sasjs/cli/build/commands/job/internal/execute/viya.js:33:23](https://matrix.to/#/@sasjs/cli/build/commands/job/internal/execute/viya.js:33:23))
23:27:45 at [Object.next](http://object.next/) (node_modules/[@sasjs/cli/build/commands/job/internal/execute/viya.js:14:53](https://matrix.to/#/@sasjs/cli/build/commands/job/internal/execute/viya.js:14:53))
23:27:45 at fulfilled (node_modules/[@sasjs/cli/build/commands/job/internal/execute/viya.js:5:58](https://matrix.to/#/@sasjs/cli/build/commands/job/internal/execute/viya.js:5:58))
23:27:45 at processTicksAndRejections (node:internal/process/task_queues:96:5)

This leads to the end of the job, but with no log being recorded.

Documentation for the mv_getjoblog macro (https://core.sasjs.io/mv__getjoblog_8sas.html) suggests that the log is potentially available from the parent session and, if available, this should be recorded instead.

@YuryShkoda YuryShkoda self-assigned this Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants