Skip to content

fix: handle submit-package-job when Deadline CLI is installed via submitter installer#230

Merged
Cherie-Chen merged 1 commit into
aws-deadline:mainlinefrom
crowecawcaw:fix/submit-package-job-installer
Jun 2, 2026
Merged

fix: handle submit-package-job when Deadline CLI is installed via submitter installer#230
Cherie-Chen merged 1 commit into
aws-deadline:mainlinefrom
crowecawcaw:fix/submit-package-job-installer

Conversation

@crowecawcaw
Copy link
Copy Markdown
Contributor

Fixes: #123

What was the problem/requirement? (What/Why)

The conda_recipes/submit-package-job wrapper script assumed the deadline command was always a pip-installed Python entry point script. On macOS/Linux it recovered the interpreter to use by reading the script's #! shebang line via head -1 "$DEADLINE_PATH" | cut -c 3-.

When the Deadline Cloud CLI is installed via the standalone submitter installer, deadline is instead a self-contained compiled binary (PyInstaller build) with no reusable Python interpreter. Feeding that binary to head -1 | cut hits a non-UTF-8 byte and fails with a cryptic error, leaving the user with no path forward:

$ sh submit-package-job aftereffects-25.1
cut: stdin: Illegal byte sequence

The only workaround was to uninstall the CLI and reinstall it via pip.

What was the solution? (How)

  • submit-package-job — Added a DEADLINE_PYTHON environment variable override so users can point the wrapper at any Python that has the deadline library installed. Guarded the shebang read by verifying the file actually begins with #!, and emit an actionable error (instead of a cryptic cut failure) for both the installer-binary case and the case where deadline is not found on PATH.
  • submit-package-job.bat — Mirrored the DEADLINE_PYTHON override and replaced the terse :nopython message with one that explains the installer limitation and how to resolve it.
  • conda_recipes/README.md — Documented the Python interpreter requirement, the difference between pip install and the standalone installer, and how to use DEADLINE_PYTHON.

What is the impact of this change?

  • Users who installed the CLI via the submitter installer can now submit package build jobs by setting DEADLINE_PYTHON to a Python that has the deadline library, without uninstalling/reinstalling.
  • Users who hit an unsupported configuration get a clear, actionable error instead of cut: stdin: Illegal byte sequence.
  • The existing pip install deadline auto-discovery path is unchanged and fully backward compatible.

How was this change tested?

Tested on macOS with two deadline installs present: a standalone submitter-installer binary (/Users/.../DeadlineClient/deadline, a Mach-O executable) and a pip-installed one (a shebang script).

Case 1 — installer binary first on PATH (previously failed with Illegal byte sequence):

$ ./submit-package-job aftereffects-25.1
ERROR: The 'deadline' command at '/Users/.../DeadlineClient/deadline' is not a pip-installed Python script (it looks like the standalone submitter installer build, which does not bundle a reusable Python interpreter).

submit-package-job needs a Python interpreter that has the 'deadline' library
installed. Set the DEADLINE_PYTHON environment variable to such an interpreter, e.g.:

    DEADLINE_PYTHON=python3 ./submit-package-job aftereffects-25.1

and ensure it has the library available (pip install deadline).

Case 2 — DEADLINE_PYTHON override (installer still first on PATH):

$ DEADLINE_PYTHON=python3 ./submit-package-job --help
usage: submit-package-job [-h] [-q QUEUE] [--s3-channel S3_CHANNEL] ...

Case 3 — pip-installed deadline first on PATH (auto-discovery, unchanged behavior):

$ ./submit-package-job --help
usage: submit-package-job [-h] [-q QUEUE] [--s3-channel S3_CHANNEL] ...

Case 4 — no deadline on PATH and no override:

$ ./submit-package-job blender-4.2
ERROR: Could not find the 'deadline' command on your PATH.
...

bash -n submit-package-job passes the syntax check.

Was this change documented?

Yes. Added a "Python interpreter requirement" section to conda_recipes/README.md covering the pip vs. standalone-installer cases and the DEADLINE_PYTHON override, 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.

@crowecawcaw crowecawcaw requested a review from a team as a code owner June 1, 2026 23:29
@github-actions github-actions Bot added the waiting-on-maintainers Waiting on the maintainers to review. label Jun 1, 2026
…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>
@crowecawcaw crowecawcaw force-pushed the fix/submit-package-job-installer branch from bf0d43d to 02b2e55 Compare June 1, 2026 23:31
@Cherie-Chen Cherie-Chen merged commit bf23ec8 into aws-deadline:mainline Jun 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-maintainers Waiting on the maintainers to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: submit-package-job failing on macOS when Deadline CLI is installed via submitter installer

3 participants