Files
floci/.github
Priamo Germosen b57b55025a feat(emr-containers): run %%configure on a managed endpoint's PySpark kernel (#9262)
EMR Studio's "Modifying PySpark session parameters" has a PySpark
kernel's %%configure "adjust the Spark configuration associated with a
PySpark session"; the endpoint's operations count it as ConfigureKernel
("Monitoring interactive endpoints"). A Floci endpoint's PySpark kernel
had no such magic.

- The PySpark kernel loads the image's own magic, configure_magic.py,
  beside Jupyter Enterprise Gateway's kernel launchers. It turns its
  cell's settings into KERNEL_EXTRA_SPARK_OPTS, refusing reserved ones,
  and posts them with the replies that end the cell to
  localhost:18888/api/kernels/configure/<kernel id>, signed with the
  AES key in its ADDITIONAL_INFO.
- The gateway program's kernel manager gives each kernel its KERNEL_ID
  and an AES key of its own, as the image's launcher does, keeps its
  launch environment, and drops an ENDPOINT_IP the endpoint's Spark
  defaults would pass on, which would send the magic elsewhere.
- The program serves port 18888 on the container's loopback alone: for
  a post signed with the kernel's key, it restarts the kernel, keeping
  its id, with the new KERNEL_EXTRA_SPARK_OPTS in place of the old, and
  once the restarted kernel answers, sends the prepared replies to the
  clients connected to it, as the restart takes the kernel down before
  it can. A kernel that dies first, or does not answer in
  jupyter_server's restart time, ends the cell with an error instead.
  A kernel's posts take their turn.
- The nightly check runs a %%configure cell, then reads the restarted
  kernel's Spark settings. Its timeout and the docker-runner group's
  budget grow by its four minutes.
2026-11-23 10:19:11 -04:00
..