Skip to content

Fix the Elyra image's default command - #3455

Merged
lresende merged 1 commit into
elyra-ai:mainfrom
lresende:fix-image-default-cmd
Nov 15, 2026
Merged

lresende merged 1 commit into
elyra-ai:mainfrom
lresende:fix-image-default-cmd

Conversation

@lresende

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

docker run elyra/elyra exits right away:

/usr/local/bin/start-elyra.sh: line 30: /usr/local/bin/start-notebook.sh: No such file or directory

start-elyra.sh ran start-notebook.sh, which comes with the docker-stacks images. Zero to JupyterHub's k8s-singleuser-sample image was built on jupyter/base-notebook through 1.x, but the 3.3.7 base adopted in 4.1.0 (#3372) is built on python:3.11-slim-bullseye and doesn't include it. Zero to JupyterHub deployments weren't affected because the chart overrides the command with jupyterhub-singleuser.

Start script (etc/docker/elyra/start-elyra.sh):

  • Starts the server directly, the way start-notebook.sh did. When JupyterHub spawns the server with the image's default command, which sets JUPYTERHUB_API_TOKEN, it runs jupyterhub-singleuser, which gets its address from the Hub. Otherwise it runs jupyter lab --no-browser --ip=$NB_IP --port=$NB_PORT.
  • Passes arguments with "$@" instead of $*, so they keep their quoting.
  • Drops JUPYTER_ENABLE_LAB, which only start-notebook.sh read.

Validation: validate-image.sh (added in #3454) now runs the start script and checks that a Jupyter server answers on /api, in both modes of make validate-elyra-image.

How was this pull request tested?

  • Fails before the fix: the new check fails on an image with the old script, with the start-notebook.sh: No such file or directory error above.
  • Passes with the fix: all checks pass, both as built and with an empty home.
  • Bare docker run: with the image's own command, the server answers on /api and logs elyra | extension was successfully loaded.
  • Arguments: start-elyra.sh --ServerApp.base_url=/user/test/ serves /user/test/api.
  • JupyterHub branch: with JUPYTERHUB_API_TOKEN set, jupyterhub-singleuser starts and stops at Missing required environment $JUPYTERHUB_SERVICE_URL, which a real Hub provides. Not tested against a running Hub.
  • bash -n passes for both scripts.
  • As in Install Elyra image packages into system site #3454, the image was built on a stand-in for jupyterhub/k8s-singleuser-sample:3.3.7 (the 4.2.0 image with ~/.local and ~/.cache removed), because Docker Hub wasn't reachable from the build environment. To check on the real base: make release elyra-image validate-elyra-image.

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@lresende lresende added this to the 4.3.0 milestone Nov 13, 2026
@lresende lresende added the kind:bug Something isn't working label Nov 13, 2026
@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.89%. Comparing base (94ed013) to head (46267ca).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3455      +/-   ##
==========================================
- Coverage   84.89%   84.89%   -0.01%     
==========================================
  Files         161      161              
  Lines       19379    19379              
  Branches      502      502              
==========================================
- Hits        16452    16451       -1     
- Misses       2887     2888       +1     
  Partials       40       40              
Flag Coverage Δ
integration-editors 48.21% <ø> (+0.06%) ⬆️
integration-misc 25.64% <ø> (ø)
integration-pipeline 47.62% <ø> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lresende
lresende force-pushed the fix-image-default-cmd branch from 77f6258 to a36ab0e Compare November 14, 2026 22:44
@lresende
lresende force-pushed the fix-image-default-cmd branch 2 times, most recently from a36f6c3 to 8d79d00 Compare November 15, 2026 15:34
start-elyra.sh ran start-notebook.sh, which the docker-stacks images
provide. Zero to JupyterHub's singleuser sample image was built on
jupyter/base-notebook through 1.x, but the 3.3.7 base adopted in 4.1.0
is built on python:3.11-slim and doesn't include it, so a plain
`docker run elyra/elyra` exited right away. Zero to JupyterHub wasn't
affected because it overrides the command.

Start the server directly, as start-notebook.sh did: run
jupyterhub-singleuser when a JupyterHub spawner sets
JUPYTERHUB_API_TOKEN, and jupyter lab otherwise. Pass arguments with
"$@" so they keep their quoting, and drop JUPYTER_ENABLE_LAB, which
only start-notebook.sh read.

validate-image.sh now checks that the default command starts a
Jupyter server.

Signed-off-by: Luciano Resende <lresende@apple.com>
@lresende
lresende force-pushed the fix-image-default-cmd branch from 8d79d00 to 46267ca Compare November 15, 2026 15:50
@lresende
lresende merged commit 12e063e into elyra-ai:main Nov 15, 2026
19 checks passed
@lresende
lresende deleted the fix-image-default-cmd branch November 15, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant