fix: handle submit-package-job when Deadline CLI is installed via submitter installer#230
Merged
Cherie-Chen merged 1 commit intoJun 2, 2026
Conversation
…mitter installer The submit-package-job wrapper assumed the 'deadline' command was always a pip-installed Python entry point script, recovering the interpreter from its '#!' shebang via 'head -1 | cut -c 3-'. When the CLI is installed via the standalone submitter installer, 'deadline' is a compiled binary with no reusable Python interpreter, so this produced a cryptic 'cut: stdin: Illegal byte sequence' error on macOS/Linux. - Add a DEADLINE_PYTHON environment variable override so installer users can point the wrapper at any Python that has the 'deadline' library installed. - Detect the non-script (installer) case and the missing-deadline case, and emit an actionable error instead of failing cryptically. - Mirror the DEADLINE_PYTHON override and a clearer error in the .bat wrapper. - Document the Python interpreter requirement and installer limitation in the conda_recipes README. Fixes aws-deadline#123 Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
bf0d43d to
02b2e55
Compare
waninggibbon
approved these changes
Jun 2, 2026
Cherie-Chen
approved these changes
Jun 2, 2026
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.
Fixes: #123
What was the problem/requirement? (What/Why)
The
conda_recipes/submit-package-jobwrapper script assumed thedeadlinecommand was always apip-installed Python entry point script. On macOS/Linux it recovered the interpreter to use by reading the script's#!shebang line viahead -1 "$DEADLINE_PATH" | cut -c 3-.When the Deadline Cloud CLI is installed via the standalone submitter installer,
deadlineis instead a self-contained compiled binary (PyInstaller build) with no reusable Python interpreter. Feeding that binary tohead -1 | cuthits a non-UTF-8 byte and fails with a cryptic error, leaving the user with no path forward:The only workaround was to uninstall the CLI and reinstall it via
pip.What was the solution? (How)
submit-package-job— Added aDEADLINE_PYTHONenvironment variable override so users can point the wrapper at any Python that has thedeadlinelibrary installed. Guarded the shebang read by verifying the file actually begins with#!, and emit an actionable error (instead of a crypticcutfailure) for both the installer-binary case and the case wheredeadlineis not found onPATH.submit-package-job.bat— Mirrored theDEADLINE_PYTHONoverride and replaced the terse:nopythonmessage with one that explains the installer limitation and how to resolve it.conda_recipes/README.md— Documented the Python interpreter requirement, the difference betweenpip installand the standalone installer, and how to useDEADLINE_PYTHON.What is the impact of this change?
DEADLINE_PYTHONto a Python that has thedeadlinelibrary, without uninstalling/reinstalling.cut: stdin: Illegal byte sequence.pip install deadlineauto-discovery path is unchanged and fully backward compatible.How was this change tested?
Tested on macOS with two
deadlineinstalls present: a standalone submitter-installer binary (/Users/.../DeadlineClient/deadline, a Mach-O executable) and apip-installed one (a shebang script).Case 1 — installer binary first on
PATH(previously failed withIllegal byte sequence):Case 2 —
DEADLINE_PYTHONoverride (installer still first onPATH):Case 3 —
pip-installeddeadlinefirst onPATH(auto-discovery, unchanged behavior):Case 4 — no
deadlineonPATHand no override:bash -n submit-package-jobpasses the syntax check.Was this change documented?
Yes. Added a "Python interpreter requirement" section to
conda_recipes/README.mdcovering thepipvs. standalone-installer cases and theDEADLINE_PYTHONoverride, plus a pointer to it from the prerequisites. Both wrapper scripts also gained explanatory header comments.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.