Fetch parent session log when job fails without recording log
@YuryShkoda is already working on this.
Since Sep 6, 2023.
Assessment
This issue has not been assessed yet.
Description
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.
- Dominant language
- TypeScript
- Stars
- 40
- Forks
- 6
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sasjs/cli
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
refactoring
-
refactoring
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
adapter refactoring
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·