You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
EMR and EMR Serverless in docker runner mode get no Docker socket, and Floci's returned URLs miss the mapped port #40
Two gaps that show up with Floci's EMR Serverless sessions, which now run a real Spark Connect server when runner-mode is docker (floci-io/floci#8731). Both affect EMR and EMR Serverless more generally too.
1. No Docker socket for EMR or EMR Serverless in docker runner mode
With FLOCI_SERVICES_EMRSERVERLESS_RUNNER_MODE=docker, Floci runs each job run's driver and each session's Spark Connect server in a container. FLOCI_SERVICES_EMR_RUNNER_MODE=docker does the same for a cluster's steps. Both need the host's Docker socket. Here neither service counts as needing it, so with only EMR or EMR Serverless enabled the socket isn't mounted, and the runs fail to start. In the default immediate mode they run nothing, so the socket is needed only when the runner mode isn't immediate.
Where it is here: socket_services in floci/aws/container.py lists Athena through RDS, with no EMR or EMRSERVERLESS. SocketService's spawns reader fits: SocketService("EMR", spawns=...) and SocketService("EMRSERVERLESS", spawns=...), true when RUNNER_MODE is set to anything but immediate. The .NET module already does this for Batch.
2. URLs Floci hands back name localhost:4566, not the mapped port
Floci builds the URLs it returns from floci.base-url (FLOCI_BASE_URL), http://localhost:4566 by default. The container publishes 4566 on a random host port and nothing passes that address to Floci, so those URLs point at a port nothing listens on. Some of them are meant to be opened or connected to directly:
GetSessionEndpoint's Spark Connect endpoint;
the EMR Serverless dashboard links and the EMR app UI links;
an EMR Studio's URL.
The mapped port is only known once the container runs. So a fix probably means choosing the host port before start and passing it as FLOCI_BASE_URL, or another way of telling Floci its outside address before it starts.
Nothing in floci/core/container.py or floci/aws/container.py sets FLOCI_BASE_URL.
Activity