The "Vendored AWS data in sync" job now takes six to nine minutes, nearly
all of it the IAM request-resources check, which grows with each namespace
the generated table reads, so runs on a slower runner reach the job's
ten-minute limit and are cancelled inside that check. Raise the limit to
thirty minutes; nothing else changes.
Toree finds its built-in magics (%AddJar, %AddDeps, %LsMagic, %%sql,
%%dataframe and the rest) by scanning its own jar for plugin classes,
and its class finder reads each entry's name through a reflective call
to JarFile$JarFileEntry.getName(). The notebook image's Java 17 refuses
that call unless java.util.jar is open to the caller, so the scan
failed ("PluginSearcher: Failed to load class info from classpath",
an InaccessibleObjectException) and the kernel started with no magics.
- The Scala kernel spec exports JDK_JAVA_OPTIONS with
--add-opens=java.base/java.util.jar=ALL-UNNAMED, after any value
already set, before it runs spark-submit. Java reads the variable
itself, so the image's spark.driver.extraJavaOptions stay as they
are, where --driver-java-options would replace them. The option
comes from EmrServerlessSparkRunner.javaBaseOpens, which now builds
YARN's options from their package list too.
- The nightly check's Scala kernel adds a jar with %AddJar, then
compiles a cell against a class in it. Its method's timeout grows by
the two cells' four minutes, and the docker-runner group's with it.
An endpoint's jupyter-kernel-overrides gives a kernel its own
container-image ("Custom kernel image with interactive endpoint"), and
on EMR on EKS each kernel is a pod of its image. A Floci endpoint ran
every kernel in its gateway's container, whatever image the overrides
named.
- The gateway job tells the gateway program which kernels the
overrides give an image (python3 and spark-python-kubernetes, the
kernels the guide's example names, as "You can't add new kernel image
types"), where it asks Floci for their containers, and a secret Floci
gives that gateway alone.
- EmrContainersKernelContainersRoute takes the gateway's POST and
DELETE on /_aws/emr-containers/kernel-containers/<endpoint>/<kernel>.
The service checks the secret, that the endpoint is ACTIVE and its
overrides give the kernel an image, and the kernel id, response
address and public key, then EmrContainersKernelContainers runs the
kernel's container: the override image, with the gateway's settings
and environment and the kernel's KERNEL_ variables, running the
image's Jupyter Enterprise Gateway launcher (launch_ipykernel.py),
under spark-submit with the %%configure magic for a PySpark kernel.
A launch is admitted under the lock the gateway's end takes, so an
endpoint's kernel containers all stop with its gateway, and a reset
or Floci's shutdown stops every one.
- The gateway program gives such a kernel a jupyter_client provisioner
that speaks the launcher's protocol: it asks Floci for the container
with an RSA public key and a response address, decrypts the
connection the launcher sends back (an AES key, under RSA, over
AES-GCM), and polls, signals and stops the kernel through the
launcher's comm port and Floci. It waits KERNEL_LAUNCH_TIMEOUT
seconds, at most the guide's 400, or 400, and a launch that fails
once the container was asked for stops it.
- Such a kernel's %%configure magic posts to its ENDPOINT_IP, the
gateway, on port 9547 over TLS, with a certificate the image's openssl
makes; the program checks it with the launcher's AES key, which each
launch refreshes. Every restart, the kernels API's, the
auto-restarter's or %%configure's, gives the kernel a new container
with new ports and a new key, and the program moves the kernel's
clients and its activity watch onto them.
- The nightly check gains a method: an endpoint that overrides both
kernels with the release's own image runs each in its own container,
the PySpark one counting an S3 file's lines and taking %%configure.
The docker-runner group's budget grows by its eighteen minutes.
Interactive endpoints "support the following kernels: Python 3, PySpark
on Kubernetes, Apache Spark with Scala" (EMR on EKS Development Guide,
"Overview of interactive endpoints"). A Floci endpoint's gateway had no
Scala kernel.
- The gateway program writes a spark-scala-kubernetes kernel spec,
"Apache Spark with Scala", a name of Floci's beside the guide's
spark-python-kubernetes, as the guide gives the Scala kernel none. It
runs the image's Apache Toree, beside Jupyter Enterprise Gateway's
Scala launcher, under spark-submit as Toree's own kernel spec does:
org.apache.toree.Main with the connection file as its profile, after
KERNEL_EXTRA_SPARK_OPTS. Its spark is a Spark session in Spark's
local mode on Floci's S3, as the PySpark kernel's is.
- The docs move the Scala kernel out of "Not emulated yet", and the
endpoint role every kernel runs with out of it too: "All kernels and
users that connect to the interactive endpoint utilize the role that
you specified when you created the endpoint".
- The nightly check lists the new kernel spec and counts an S3 file's
lines in the Scala kernel. Kernel start, connection and deletion
become helpers. The method's timeout and the docker-runner group's
budget grow by its four minutes.
An endpoint's configurationOverrides take "the additional
classification jeg-config", whose allow-listed settings are
RemoteMappingKernelManager.cull_idle_timeout and
RemoteMappingKernelManager.cull_interval (EMR on EKS Development
Guide, "Jupyter Enterprise Gateway (JEG) configuration options"). A
Floci endpoint's gateway read neither.
- The gateway job passes those two properties of the endpoint's
jeg-config classification to the program as its arguments
(--RemoteMappingKernelManager.cull_idle_timeout=<value>), a later
classification's winning; other jeg-config properties go nowhere.
- The program's kernel manager is now named RemoteMappingKernelManager,
as Jupyter Enterprise Gateway's is, so the settings reach it under the
names the guide gives them, and jupyter_server's culler shuts down a
kernel idle that long, checking every interval.
- EmrContainersSparkJobs.properties reads any classification of a
configurationOverrides, sparkDefaults now through it.
- The nightly check gains a method: an endpoint whose jeg-config sets a
10-second idle timeout culls a python3 kernel left idle within a
minute. The docker-runner group's budget grows by its seven minutes.
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.
An EMR on EKS managed endpoint ran nothing: it was ACTIVE at once with no
serverUrl, so no Jupyter client could start a kernel on it, and its
session tokens opened nothing.
- With runner-mode docker, an endpoint runs a Jupyter Enterprise Gateway,
which "provides the remote kernel lifecycle management capability that
interactive clients need", in a container of its release's
notebook-spark image on Amazon ECR Public, the base image of
interactive endpoints. That image holds jupyter_server and ipykernel but
no Enterprise Gateway, so a program of Floci's own serves the gateway's
kernels API on jupyter_server, passing a kernel the KERNEL_ variables
of its start request's env, as Jupyter Enterprise Gateway does.
- Its kernels are the image's python3, and spark-python-kubernetes, whose
spark and sc are a Spark session in Spark's local mode on Floci's S3,
with the endpoint's execution role, KERNEL_EXTRA_SPARK_OPTS going to
its spark-submit.
- The endpoint is CREATING until the gateway answers, then ACTIVE with
its serverUrl and the guide's "Endpoint created successfully. It took
m Minutes s Seconds". DeleteManagedEndpoint makes it TERMINATING until
the gateway has stopped. A gateway that fails, and one a restart left,
end it TERMINATED_WITH_ERRORS with INTERNAL_ERROR.
- serverUrl is a path of the endpoint's own on Floci's port. A request
there goes on to the gateway, its kernels' WebSocket tunnelled, when it
carries a live token GetManagedEndpointSessionCredentials gave for that
endpoint, as a token parameter or an Authorization: token header, as
Jupyter Enterprise Gateway 2.6.0 takes one; any other gets that
gateway's 401 {"reason": "Unauthorized", "message": ""}.
- SessionServers, which runs EMR Serverless's and EMR's Spark Connect
servers and keeps their tokens, runs the gateways too, a token given
for one endpoint reaching no other. CloudFront's WebSocket splice moves
to WebSocketUpgrades, which the gateway's tunnel shares.
- gateway-image-template replaces the notebook image's registry.
With security-group enforcement on, revoking the last world-open ingress rule closes the relay's host listener at once and keeps the connections it already accepted, as AWS keeps tracked connections. When the instance's egress allows TCP to every address and port in the family the relay uses to reach the guest, AWS does not track those flows, so the revoke removes the relay and closes them immediately. A listener that cannot be closed falls back to removing the relay, one instance's failure no longer skips the group's other instances, and stop or terminate removes any draining relay. Ec2PublishedConnectionNightlyIntegrationTest covers both cases.
An EMR on EKS job run ran nothing: it was COMPLETED at once, or RUNNING
on a timer and then COMPLETED, whatever its Spark job would have done.
- With floci.services.emrcontainers.runner-mode set to docker, a run
runs its Spark job in a container of its release's EMR on EKS base
image on Amazon ECR Public, or of its custom image: a
sparkSubmitJobDriver's spark-submit, or a sparkSqlJobDriver's
spark-sql with its entry point as the file it runs, with the
spark-defaults of its configurationOverrides and its execution role's
credentials, on Floci's S3.
- The release label names the image's repository and tag, as the
development guide's release notes give each release's "Container
image tag": emr-7.2.0-20240610 runs emr-7.2.0:20240610. The base
image's spark-defaults.conf runs a driver in Kubernetes' cluster
mode, so the driver runs in client mode, its executors with it.
- A run is SUBMITTED while its container starts, RUNNING once its
driver runs, and COMPLETED or FAILED as the driver exits, a failed
driver with AWS's USER_ERROR and "Jobrun failed. Main Spark container
terminated with errors. ...". A container that cannot start, a job
driver without an entry point, and a run a restart left running fail
with the development guide's INTERNAL_ERROR and VALIDATION_ERROR
answers.
- CancelJobRun makes a running run CANCEL_PENDING until its driver is
stopped, then CANCELLED.
- A run holds its virtual cluster's running slot from its submission
until its driver ends, counting as concurrent, not queued, and the
slot then goes to the queue. A run that cannot be handed to a thread
fails and frees its slot, and a leftover driver of a run found failed
is removed.
- The immediate runner mode, the default, is unchanged.
Use the existing HTTP host and port environment settings for the container
probe. Map wildcard hosts to loopback and keep TLS probes on the public
multiplexed port. Preserve readiness and startup-grace handling.
Honor the LocalStack listener aliases the way LocalStackParity does:
USE_SSL, EDGE_PORT and the first GATEWAY_LISTEN entry, with a nonempty
Floci setting winning and LOCALSTACK_PARITY=false turning them off.
Add socket-level coverage for listener selection and failure responses,
run in the existing Docker runner job.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
A large pull request diff could fail the IAM data gate before any check
ran, because the workflow passed every changed path in one make argument
("Argument list too long"). The workflow now writes the paths to a file
and iam-data-verify reads it through CHANGED_FILE, keeping affected-check
selection, the CHANGED interface, full verification for an empty diff or
the weekly run, and the report of every failed check. A Python test runs
the target with stubbed checks for each of those cases.
The prune job added in #8956 listed maven-Linux- caches across every ref, so a cache another ref saved under the current pom's key could pass its guard and let it delete main's older entries while main's own current one was missing. It now lists and checks only refs/heads/main. No other ref saves that key today, since the save runs only on a push to main, but the guard no longer depends on it.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* chore(ci): check the amd64 native image after each Nightly, not on every pull request
compatibility.yml built the amd64 native image on every pull request (7 to 9 minutes in the last five green runs) to run one 2-minute suite, sdk-test-python, whose Firehose compression delivery test needs the x86_64 snappy JNI library. Pull requests now build and test arm64 only. compat-partitions.yml, which already runs after each Nightly against the published floci/floci:nightly image, gains an amd64 sdk-test-python job in the commercial partition, so the amd64 half of the multi-arch image is still checked once a day, against the image users pull.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* chore(ci): keep the amd64 job's test results, and skip it on a single-region dispatch
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
EmrDockerRunnerDockerIntegrationTest pulls a 3.5 GB image and took about 640 s of a passing pull request shard, so after #8903 moved its cluster shrink scenario to the nightly checks, the rest of the class follows as EmrDockerRunnerNightlyIntegrationTest. partition.sh no longer weighs it: SLOW_CLASSES comes from PARTITION_SLOW_CLASSES, empty by default, and test_partition.py passes its own. The standard nightly group has no room for it (339 of its 359 minutes), so the cluster-shrink group becomes docker-runner, with both classes in 42 minutes of bounds in a 62-minute job. On a pull request, the nightly checks now run only the nightly classes it adds or changes, or all of them when it changes the workflow.
* feat(docker): count open Docker streams per service and add a saturation harness
* fix(docker): match container routes at the start of the path, and tidy the harness
* test(docker): drop the saturation harness's quiet-stream sleep
With runner-mode docker, GetDashboardForJobRun's link for a Spark run's
attempt that has not ended now opens its driver's Spark UI for real, and
GetResourceDashboard's link does the same for a session's Spark Connect
server, as "For jobs in a running state, the application UI is a live
user interface such as the Spark or Tez web UI" and "While a session is
active, the URL opens the live Apache Spark UI".
Each link opens on a host of its own,
<secret>-4040.emr-serverless-ui.<Floci's host>, through the application
UI proxy EMR's on-cluster UIs use. That proxy moves to core.common
(AppUiProxy, AppUiRoutes, AppUiRoute, AppUiHost), and each service
registers the label its hosts are under. The runner turns the driver's
UI on for every EMR Serverless Spark run, as the release's image turns
it off, publishes port 4040 on the Docker host's loopback interface, and
keeps where Floci reaches it while the container runs.
A run whose logs are not kept in managed storage gets no live UI, as
with logs in S3 alone the application UI is "Not supported". A Hive
run, a run or session that has ended, and every link in the immediate
mode still open Floci's own page, which now says whether the attempt's
logs are in managed storage.
A nightly check skips unless -Dnightly.checks.enabled=true, but Quarkus builds
the application of every profile a run's classes use while JUnit discovers the
tests, before any class is skipped, and keeps it for the rest of the JVM. Six
profiles are used only by nightly checks, so every routine run built and held
six applications for classes that never run.
Surefire now excludes **/*NightlyIntegrationTest.java by default, and a
nightly-checks profile, active when nightly.checks.enabled is true, takes the
exclusion away again. The nightly workflow already passes that flag, so it runs
the checks as before; a CI shard and a local ./mvnw test no longer discover
them. The default **/*$* exclude stays, since a configured list replaces it.
With runner-mode docker, GetOnClusterAppUIPresignedURL now opens the
interfaces that run on the cluster's primary node for real: its
ResourceManager, an application master through the ResourceManager's
web proxy, its MapReduce JobHistory server, and the NodeManager of a
primary node that works.
Each opens on a host of its own, as AWS's application UIs do under
emrappui-prod.<region>.amazonaws.com, which are on the Public Suffix
List: http://<secret>-<port>.emrappui.<Floci's host and port>/, the
secret 26 random base32 characters only the link holds, so the host is
the link's authority, as the interface takes no AWS credentials.
EmrAppUiProxy, a Vert.x route ahead of the REST layer, sends a request
to that host on to the node's port, which the primary node publishes on
the host's loopback interface (Floci in a container joins the cluster's
network instead). It asks the interface under the browser's host, so
the links the interface writes itself are the browser's, and makes each
link the node's daemons write to one another by the node's name a link
to that interface's own host under the same secret, in text answers and
Location headers; an answer too large to hold goes on unchanged. A
request's body streams on as it arrives, an interface that sends nothing
for a minute has the request given up, and a link of a cluster that has
ended opens nothing, the node's port it found asked for again every ten
seconds while the cluster runs.
A link asked for before the primary node runs, as on a cluster no step
has run on yet, starts the node as a step would, through runOnCluster,
running nothing, and is not PresignedURLReady until the node is; its
host answers 503 meanwhile. With an ApplicationId each interface lands
on the application's page. The link lasts an hour, as Floci's page
links do. An interface Floci does not run (the Spark History Server,
the YARN timeline server, the Tez UI), and any link in the immediate
mode, still opens Floci's own page.
Floci's TLS certificate names *.emrappui.localhost and
*.emrappui.localhost.floci.io.
Lambda's CreateFunction and UpdateFunctionCode now refuse a direct
ZipFile upload over 50 MB from its Base64 length, before decoding it,
so a request already over the limit takes no more memory than it came
in; its RequestEntityTooLargeException is as before, and the test of it
builds its oversized upload without the bytes behind it.
EmrAppUiNightlyIntegrationTest runs it for real on an emr-7.5.0
cluster: the ResourceManager's link starts the primary node and opens
the ResourceManager, and after a MapReduce step its REST answer's links
open the application master's logs on the NodeManager's host and,
through the web proxy's redirect, the job on the JobHistory server's
host, as the JobHistory server's own link does. The nightly job's
timeout and image prefetch take the new check.
With runner-mode docker, StartNotebookExecution now runs the notebook on
its cluster as a step's command runs: a spark-submit there, a YARN
application with the cluster's Spark settings, as the execution's
ExecutionRoleArn, else the cluster's instance profile, with its
EnvironmentVariables (KERNEL_EXTRA_SPARK_OPTS, as AWS's example passes,
going to spark-submit as its options).
No source names AWS's kernel, so a program of Floci's own runs it,
needing only Python and PySpark, which every release's image has, not
Jupyter: it reads the notebook through the cluster's S3A, puts
NotebookParams in papermill's way (a cell tagged injected-parameters
after the one tagged parameters, else first, in place of any an earlier
run left; a name that is not a Python variable's fails the run), clears
every earlier output, runs the code cells in one namespace holding spark
and sc, keeping each one's output, its last expression's value and any
error, stops at the first cell that raises, and writes the notebook as
run as <name>.ipynb and <name>.html, then exits 3. A %%sql cell runs its
body with spark.sql, a %%local or %%spark one as Python, and other cell
magics are not run; % and ! lines are dropped only from a cell that is
not Python as it stands.
The notebook is the execution's NotebookS3Location; Floci keeps no EMR
Notebook's own S3 location, so an execution named by EditorId alone
fails at once. No source gives where AWS writes the notebook as run, so
Floci writes it under the OutputNotebookS3Location prefix, else beside
the notebook, in a folder named for the execution, and reports the one
OutputNotebookFormat names, the HTML one, else the notebook, as
OutputNotebookURI. The execution is START_PENDING until its container
runs, then RUNNING, and FINISHED, FAILED at the first raising cell (any
other failure giving the run's exit code), or STOPPED,
StopNotebookExecution going through STOPPING; its cluster's end stops
it, and one a restart left behind fails as interrupted.
EmrService.runOnCluster runs such a command on a cluster through the
cluster preparation steps and sessions share, its cluster's storage held
while it runs and its end stopping it. As a step's, its thread starts
nothing once its cluster has shut down or a reset's or a shutdown's
teardown has begun; one that cannot be handed to its thread ends at
once.
EmrNotebookExecutionNightlyIntegrationTest runs it for real on an
emr-7.5.0 cluster: a parameterized notebook's run, an earlier run's
parameters in it, written to S3 with its outputs, its %%sql cell's among
them, and HTML; a failing notebook's FAILED with its error kept and an
earlier run's later outputs gone; and a misnamed parameter's run failed
with its exit code.
The nightly job's timeout and image prefetch take the new check.
With runner-mode docker, StartSession now runs the session's Spark
Connect server on its cluster, as "Amazon EMR launches a Spark Connect
Server as a YARN application on your cluster": a container on the
cluster as a step's is, in the image its steps run in, its HDFS and
YARN started first where they are not running, the server's driver in
that container and its executors on the cluster's YARN. Its
spark-defaults are the cluster's, then the session's
EngineConfigurations, with the server's port; it runs as the session's
ExecutionRoleArn, else the cluster's instance profile.
A client reaches it through Floci as an EMR Serverless session's server
is reached (#8731): GetSessionEndpoint answers Floci's address and a
token, and a client connects with
sc://<host>:<port>/;x-aws-proxy-auth=<token>;authorization=<session id>,
AWS's string with Floci's port. The proxy drops the authorization
parameter, which AWS's own proxy reads, before the call reaches the
server.
The session is SUBMITTED until its container runs, STARTING until the
server answers, then IDLE, BUSY while a call runs on its server and
IDLE again once none does. TerminateSession goes through TERMINATING
until the server has stopped; the idle timeout stops it too, and the
cluster's end ends its sessions and stops their servers on its own,
its storage released only once the last of them has gone. A server that exits on its own, or does not answer within
10 minutes, fails the session; one a restart left behind fails as
interrupted, its container removed.
What EMR Serverless's sessions and these share moves into
emrserverless.SparkConnectServers: running each server, asking it
whether it answers, the tokens, the calls a session takes, and one
check for its next deadline; and SparkConnectSessionOwner, the states a
session goes through as its server starts, answers, takes calls and
stops, each service giving only how it stores, ends and checks its
sessions (both models implement SparkConnectSession). A server being stopped takes no new call, a call's
busy and idle reach the owner in order under the server's own lock, and
a server's entry goes even where its owner fails to hear it stopped. A step's setup on its cluster (its image, storage,
metadata address, added nodes and HDFS) moves into a preparation that
steps and sessions' servers share.
EmrSessionServerNightlyIntegrationTest runs it for real on an
emr-spark-8.1.0 cluster with Spark 4's JVM client from that image: a
wrong token refused, queries run, a missing table's Spark error back,
TerminateSession removing the server. The nightly job's timeout and
image prefetch take the new check.
With runner-mode docker, StartSession now runs the session's driver, a
Spark Connect server, in a container, as a job run's driver runs: in the
release's image or the application's custom image, on the same network,
with the execution role's credentials and the application's executors.
Its spark-defaults are the application's runtime configuration, then the
session's runtimeConfiguration; Floci sets the server's port and drops a
spark.connect.grpc.binding.address, which "is reserved by EMR Serverless
and cannot be overridden by users".
A client reaches the server through Floci. GetSessionEndpoint answers
Floci's own address, and the client puts the token in the
x-aws-proxy-auth parameter, as AWS's connection string does
(sc://<host>:443/;use_ssl=true;x-aws-proxy-auth=<token>). The new
core.common.SparkConnectProxy takes gRPC calls to
spark.connect.SparkConnectService on Floci's port, checks the token, and
forwards each call over HTTP/2, trailers included, to the server, whose
port is published on the Docker host's loopback interface only; a
Trailers-Only answer, Spark's error before any message, goes back as
one. A call
with no token, an unknown one or an expired one fails with gRPC's
UNAUTHENTICATED; one to a session that is not ready, or in the immediate
mode, with UNAVAILABLE.
The session is SUBMITTED until its container runs, STARTING until the
server answers, then IDLE. No source says when a session is BUSY: Floci
makes it BUSY while a call runs on its server and IDLE again once none
does, its idle timeout counting from then. TerminateSession goes through
TERMINATING until the container has stopped; the idle timeout, the 24
hours (counted from when the server answers) and StopApplication stop it
too, each session keeping one check for its next deadline. A server that
exits on its own, or does not answer within 10 minutes, fails the
session with the reason; one a restart left behind fails as interrupted,
and its container, if the startup's cleanup left it, is removed.
The runner's Job gains a listening port, published on loopback and
reported through Progress.listening once the container runs.
EmrServerlessSparkConnectNightlyIntegrationTest runs it for real: the
server in the emr-7.13.0 image and Spark's own JVM Spark Connect client
from that image, which runs a query through Floci with the token and is
refused with a wrong one. The nightly job's timeout and image prefetch
take the new check.
EmrServerlessCustomImageNightlyIntegrationTest's waits are bounded
already, the base image's pull at 20 minutes, its two pushes at 30 each
and its five job runs at 5 each, but it ran under the pom's 2-minute
default for every test and lifecycle method: a pull or a push that ran
long was cut short before its own bound. The class now allows the sum
of its test's waits, 85 minutes, and its setUp, which a class-level
@Timeout does not reach, 21.
The Nightly checks job, which runs the checks one after another, was
capped at 90 minutes, less than this check's bounds alone, so a slow
pull or push would have cancelled the job with no message. It now
allows the sum of every check's bounds, 160 minutes, and 20 for the
build: 180.
No AWS image carries Pig, so a Pig step failed without running. With
floci.services.emr.pig.enabled on (off by default), a docker cluster
whose Applications name Pig gets Apache Pig 0.18.0 in its image:
downloaded to a temporary file from the first of
floci.services.emr.pig.urls that gives it whole with the checksum
floci.services.emr.pig.sha256 names (a URL that fails, stalls for a
minute or gives another checksum passes to the next), then streamed
into /usr/lib/pig as EmrReleaseImages makes the image, with Tez from
the release's Hive image and a /usr/bin/pig that EMR's own pig-script
runs.
Pig runs on the image's Tez, its bundled Tez and protobuf 3 left out,
on the cluster's YARN or in local mode, with exectype=tez, a working
directory without a scheme, which S3A takes, and no task reports and
one try for counters from the MapReduce JobHistory server the cluster
does not run, then the cluster's tez-site and pig-properties, in a
pig.properties of the step's own; pig-log4j and pig-env reach Pig too. A command step's new
tez-site.xml shares Hive's Tez-on-YARN settings.
Without the setting, a Pig step on a cluster that installs Pig still
fails without running, its message naming the setting; on one that
does not, EMR's pig-script says "Pig isn't installed." as on EMR.
Floci in a container of its own, with the Docker socket, is how many
users run it, and an EMR cluster's nodes are then its siblings on a
network of their own: Floci's container joins that network so the
cluster's metastore service reaches Floci's S3, and leaves it once the
cluster has ended. That path had unit tests and one manual run, as no
test ran Floci in a container for EMR.
EmrFlociContainerNightlyIntegrationTest starts the Floci image the
nightly workflow builds from the commit (docker/Dockerfile.jvm-package)
with the socket and the docker runner mode, runs a cluster with Hive and
Spark on it, and checks that a Hive step's tables over rows in S3 are
read by a Spark step through the metastore, that a later Hive step reads
the table the Spark step made, that Floci's container is on the
cluster's network meanwhile, and that it is off it once the cluster has
ended. A failing step's message carries its stderr and Floci's log.
The nightly workflow builds the image and names it to the checks; the
Spark and Hive images are prefetched for the class. The Hive and Spark
jobs EmrHiveStepsDockerIntegrationTest wrote inline are HiveCatalogJobs,
the step EMR tests added in two copies is EmrRequests.addStep, and the
Docker client two RDS tests built by hand is TestDockerClients.local.
An EMR Serverless application on a custom image in Floci's ECR had unit
tests for the digest it resolves (#8542) but no run that pushed an image
and pulled it back, as each run of it copies the whole 3.5 GB base image
into the registry. It is now a nightly check.
EmrServerlessCustomImageNightlyIntegrationTest builds the release's base
image with a FLOCI_IMAGE_BUILD marker, pushes it to a repository's tag in
Floci's ECR, removes the local copy, and runs a job that writes the marker
it sees. A second build pushed under the same tag is not seen by the
application that resolves its image as it starts until it starts again,
and is seen at once by one resolving it for each run. Floci listens on a
fixed port there, since the runner hands the Docker daemon
localhost:<floci.port> for an ECR image.
The class is enabled only by -Dnightly.checks.enabled=true, so the CI
shards skip it before Quarkus starts, and its base image is prefetched
only for the nightly checks. That property was -Dfloci.nightly=true, which
the first nightly run showed Floci's configuration refusing as a floci.*
name it does not know, so a Quarkus check never started; the workflow and
AGENTS.md name the new one. The part-file reader EmrDockerRunnerDockerIntegrationTest
kept to itself is S3TestClients.partFiles, shared by both.
Some checks need images of several gigabytes or long runs: an EMR
Serverless run on a custom image pushed to Floci's ECR copies the whole
3.5 GB base image into the registry on every run, and Floci running in a
container with an EMR cluster beside it needs the Floci image built
first. Every *Test class lands in one of the five CI shards, already
close to their time limit, so these have had no place to run.
The Nightly checks workflow runs the classes named
*NightlyIntegrationTest with -Dfloci.nightly=true: once a day on main, on
demand, and on a pull request that adds or changes one, so a check is
seen to pass before it merges. Each such class skips without the
property, which keeps the shards' cost at a skip. It frees the runner's
unused toolchains for the images, prefetches them through
prefetch-images.sh, and uploads the reports. GitHub-hosted runners only.
A nightly check keys its images in prefetch-images.sh on its own name, and
ci.yml hands the prefetch its shard's classes without the nightly ones, so
a shard never pulls an image for a check that skips there. AGENTS.md names
the convention.
documented-routes-verify runs inside iam-data-verify for a pull request
touching rest-routes.json, regen_rest_routes.py or its test, but
iam-data-drift.yml's pull_request.paths listed none of the three, so a
pull request changing only the routes skipped the online check until the
weekly run. rest-routes.json is also one of the authorized-action
check's paths, which went unchecked the same way.
- iam-data-drift.yml lists the three paths, and its header says it
checks the routes rest-routes.json takes from the AWS page documenting
an endpoint botocore does not model.
- DOCUMENTED_ROUTES_PATHS also covers regen_partitions.py and
regen_query_services.py, the modules regen_rest_routes.py imports, as
every other check's paths cover its generator's imports.
The release no longer holds back every standalone binary when a macOS or
Windows build fails or times out. publish-binaries now requires only the
three Linux native builds; a missing macOS or Windows binary gets a
warning and a job summary line, and every binary that did build is
staged, signed, attested and uploaded as before. 2.4.0 and 2.5.0
published none because both macOS builds timed out.
The macOS and Windows builds move unchanged into a reusable
standalone-binaries.yml, which release.yml calls for every tag. It can
also be run by hand from any branch with a subset of platforms, extra
native-image arguments, a macOS runner label and a timeout, and then
only uploads workflow artifacts.
The job's IAM request-resources check now takes about four and a half
minutes on its own, so the job as a whole runs right at its five-minute
limit and is cancelled whenever a runner is a little slow. Main's own
push run of it was cancelled that way on 2026-11-14, as were the PR runs
on several branches the same day, each of which passed on a re-run.
Every check that finished before the cut matched; nothing had drifted.
Where a docker cluster runs YARN its Spark ran on it, while MapReduce and
Hive's Tez stayed in local mode, in the step's container, and a job's own
-D mapreduce.framework.name=yarn failed.
- A step's mapred-site names YARN and the layout of the cluster's nodes,
which yarn.application.classpath's default does not, S3A's AWS SDK, and
the step's AWS environment for the application master and tasks, sized
for a NodeManager; the cluster's mapred-site replaces them.
- A step's hadoop, hadoop-streaming and hdfs dfs run from the nodes'
Hadoop, /usr/lib or an emr-spark-* release's /opt, set for that command
alone, so a spark-submit in the same step keeps the release's own.
- The images hold EMR Serverless's build of Tez, whose tez-site.xml names
its own plugins. On YARN a Hive step names the stock classes from the
same jars, real ports and bind addresses, ${env.NM_HOST} left for the
application master's node to fill in, Tez's jars from the node's own
disk, and one virtual core a task, as YARN's default scheduler grants
one and Tez gives back a container that does not match what it asked.
Intermediate compression is off, as the image's codec needs a native
library it lacks.
Where a cluster runs no YARN, MapReduce and Tez stay in local mode.
Two Docker cases check that a streaming job's tasks and a Hive query's
Tez tasks run in YARN's containers on the cluster's nodes. With them the
two EMR Docker classes take 651s and 402s on CI's runners, so the shard
partitioner weighs them at that, as at 280s and 260s their shard ran into
Surefire's 25 minutes.
With that split, PipesStreamEnrichmentDockerIntegrationTest ran in a JVM
where no class before it had told RestAssured how to send and read
DynamoDB's application/x-amz-json-1.0, which it relied on; it now does so
itself, as other tests do.
partition.sh balances shards by class count, which says nothing of how
long a class runs. EmrDockerRunnerDockerIntegrationTest and
EmrHiveStepsDockerIntegrationTest take about 540s between them, so the
shard holding them ran 1246s of Surefire's 1500s while the others ran
641s to 869s, and one run has already been cut at the limit.
- SLOW_CLASSES gives the seconds of those two, by class name, so a
package rename leaves them alone. A class counts for that many average
classes, and every other class counts as one, so with none listed the
assignment is what it was.
- Groups are packed heaviest first by that weight rather than by their
number of classes, and a slow class without a profile goes before the
others, so the rest are placed around them.
- A name that no longer matches a class is an annotation, not a failure,
as a stale key is for the image prefetch: the shards are only uneven.
Summing the 2026-11-09 run's class timings over the classes at this
commit, the slowest shard goes from 1136s to 989s. A profile of its own
for the EMR classes gave 1321s and a sixth shard 1117s, as neither tells
the partition that those classes are slow.
* fix(ci): prefetch bind-directory Docker test images
* fix(ci): locate OpenSearch catalog dynamically and log unreadable image
Find OpenSearchVersions.java dynamically instead of hardcoding its path, and log to PREFETCH_LOG when the default OpenSearch image cannot be parsed.
* fix(ci): drop stale REDSHIFT_PG18 prefetch block
RedshiftMaxErrorPostgres18IntegrationTest was renamed and no longer overrides the image, so the block only warned about a stale key on every shard. The renamed test runs on the default image already prefetched by the /redshift/ line.
* fix(ci): derive Neptune prefetch images from configuration
Read the Neptune pin for Java compatibility and shared shard prefetch from application.yml. Preserve best-effort pulls, shard selection and Node retry behavior.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(ci): share configured Neptune image lookup
Reuse one keyed lookup for Node, Java and shard prefetch. Read the Neo4j pin from configuration and correct the pre-pull overlap comment.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(ci): share service image read and prefetch
Use one service/key config reader across Neptune and CodeArtifact. Share configured-image pull/skip logic, preserve Node/Java failure policies and remove the unused test file.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* chore(ci): remove superseded Neptune image reader
Remove the old helper left by the preceding rename publication. All consumers use the qualified shared service/key reader.
Signed-off-by: Andre Kurait <akurait@amazon.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Prepare the configured Gremlin image before the timed Node SDK suite on cold native runners. Preserve test assertions and deadlines.
Read the effective Neptune image pin after sparse checkout and retry registry pulls up to three times before Node compatibility execution. Preserve the existing test deadline and report exhausted pulls explicitly.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Read the restore fixture's PostgreSQL image override and prefetch it only
for the shard running that class, avoiding a cold pull during database
creation. Keep the existing best-effort pull behavior.
Source: AndreKurait/floci#487
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Move the Java sources from io.github.hectorvent.floci to io.floci.aws, matching io.floci.gcp, io.floci.az and io.floci.oci. Generated by tools/rename/rename_package.py apply on the base commit, with no other edits.
Logger categories and the arn.fail-on-blank-region property move to the io.floci.aws prefix. The pom groupId becomes io.floci; the artifactId stays floci.
Refs #6589
Signed-off-by: Hector Ventura <hectorvent@gmail.com>