Repository navigation
Fail job instead of starting container with an empty MAAP_PGT - #22
Merged
Merged
Conversation
Fail with exit 78 and _alt_error.txt when _job.json has no username or the API returns an empty/non-string session_key, instead of printing nothing (or an empty token) and letting the container start. Refs #9 Claude-Session: https://claude.ai/code/session_0171HvL7yCdP2wCuxh7UngYP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9
Follow-up to #21. That PR made a failed token fetch exit 78 (error in
_stderr.txtand_alt_error.txt), anddps_wrapper.shpropagates it with|| exit $?, so the user container is not started. Two paths could still leaveMAAP_PGTempty with exit 0:_job.jsonhas nousername: the script printed nothing. It now reports "no 'username' in _job.json", writes_alt_error.txtand exits 78.session_key: it was returned as the token. It now raisesPgtTokenError.Behaviour change
A job whose
_job.jsonhas no username used to run without a token and now fails at this step. I assumed every real DPS job has a username (the wrapper also callsget_username.py); not verified for every job type.Tests
New cases for empty/whitespace/None/non-string
session_keyand for the no-username run (exit 78, empty stdout,_alt_error.txt). Full suite: 78 passed on Python 3.12 / urllib3 2.8. The wrapper itself was not run; "container not started" rests on the|| exit $?line.