Commit Graph
236 Commits
Author SHA1 Message Date
Priamo Germosen 4b342dad3f feat(emr): open a cluster's on-cluster application UIs for real in the docker runner mode (#8773)
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.
2026-11-17 19:48:12 -04:00
Andre Kurait 6a5a464ca8 test(emr): move Hive and Spark steps to nightly checks (#8738)
* test(emr): move Hive steps to nightly checks alongside session checks
* test(emr): declare nightly Hive and Spark timeout
2026-11-17 16:50:18 -04:00
Priamo Germosen 9821a919b6 feat(emr): run a notebook execution's notebook on its cluster in the docker runner mode (#8764)
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.
2026-11-17 15:08:32 -04:00
Priamo Germosen 2517edb471 feat(emr): run a session's Spark Connect server on its cluster in the docker runner mode (#8751)
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.
2026-11-17 12:18:09 -04:00
Priamo Germosen 50276fa533 feat(emr-serverless): run a session's Spark Connect server in the docker runner mode (#8731)
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.
2026-11-17 07:55:24 -04:00
Priamo Germosen 98b66319a9 test(emr-serverless): give the custom-image nightly check room for its pull and pushes (#8675)
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.
2026-11-16 19:10:32 -04:00
Priamo Germosen 30f8a9985e feat(emr): run Pig steps on Apache Pig, an opt-in download added to the cluster's image (#8636)
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.
2026-11-16 16:25:21 -04:00
Priamo Germosen 975632df5c test(emr): run an EMR cluster from Floci in a container nightly (#8591)
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.
2026-11-16 12:02:02 -04:00
Priamo Germosen 9ee8417f6c test(emr-serverless): run a custom image from Floci's ECR nightly (#8584)
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.
2026-11-16 10:13:25 -04:00
Priamo Germosen 2d3fa5cd86 ci: run the checks too heavy for a pull request nightly (#8574)
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.
2026-11-16 08:39:28 -04:00
Priamo Germosen acc8196d80 ci: run the IAM data drift check on pull requests touching the documented REST routes (#8552)
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.
2026-11-16 07:00:30 -04:00
Andre Kurait 065d7194b0 fix(ci): distribute slow classes sharing a test profile (#8511) 2026-11-15 18:20:50 -04:00
Andre Kurait 5d40c565d4 fix(ci): prepare Cargo sidecar images before HTTP requests (#8512) 2026-11-15 17:56:14 -04:00
Hector Ventura 2c0e4e5ff8 fix(release): publish the binaries that built when a macOS build times out (#8479)
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.
2026-11-15 14:12:23 -04:00
Priamo Germosen 7f90395364 ci: give the vendored AWS data job ten minutes (#8372)
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.
2026-11-14 16:28:18 -04:00
Priamo Germosen 54ea160aa6 feat(emr): run a step's MapReduce and Hive's Tez on the cluster's YARN (#8151)
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.
2026-11-12 19:20:56 -04:00
Oleksandr Nikolaichuk 410e09bf62 fix(cloudformation): generate the create-only table from the registry and compare nested pointers (#8093) 2026-11-12 07:58:09 -04:00
Priamo Germosen 9eb3ba38ed ci: weigh the two slow EMR Docker classes when partitioning test shards (#7901)
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.
2026-11-10 22:47:50 -06:00
Vũ Thế Huy fcb2421ee4 fix(ci): prefetch bind-directory Docker test images (#7651)
* 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.
2026-11-09 22:24:26 -04:00
Andre Kurait a5b3fab110 fix(ci): derive Neptune prefetch images from configuration (#7834)
* 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>
2026-11-09 21:49:27 -04:00
Andre Kurait 99be149382 chore: add regression coverage for CI sharding (#7245)
Cover the two balancing rules with deterministic partition CLI regressions.

Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-11-09 21:40:22 -04:00
outofplace a65def00a4 feat(helm): add a Helm chart for running Floci in Kubernetes (#7749) 2026-11-09 09:06:23 -04:00
Andre Kurait a9c606df1d ci: prepare Neptune image before Node compatibility tests (#7629)
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>
2026-11-09 02:28:39 -04:00
Jackson PriceandAndre Kurait aef59b9aaf ci: prefetch the PostGIS snapshot restore fixture image (#7647)
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>
2026-11-09 02:23:17 -04:00
Hector Ventura 7cf443fcee chore: rename the package to io.floci.aws (#7689)
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>
2026-11-06 11:07:21 -04:00
luiseterc c3058a8de4 fix(iam): generate resource and request tag condition context (#7589) 2026-11-06 09:02:14 -04:00
Aymen JAMAAOUI 5bcb83b932 fix(iam): check Redshift requests on the resources they name (#7287)
Under IAM enforcement, Redshift requests were checked on `*`, so a
grant scoped to a cluster, a snapshot or a database user was refused,
and a deny scoped to one never applied.

The redshift namespace moves from NOT_COVERED to NAMESPACES in the
request resources generator, with corrections where the generated rule
checks the wrong resource. GetClusterCredentials now also gives the
redshift:DbUser condition key, from a new generated table, to its own
check and to the CreateClusterUser check that AutoCreate adds.

Refs #5907

fix(redshift): act only on a snapshot of the cluster the request names

A snapshot request is checked on snapshot:<cluster>/<name> for the
cluster it names, but DeleteClusterSnapshot, RestoreFromClusterSnapshot
and DescribeClusterSnapshots found the snapshot by its name alone. A
caller allowed on one cluster's snapshots could act on a snapshot of
another cluster by naming the allowed one.

A snapshot taken from another cluster than the one the request names,
in SnapshotClusterIdentifier, the cluster of a SnapshotArn, or
DescribeClusterSnapshots' ClusterIdentifier, is now not found.

Refs #5907

chore(iam): generate the Lambda Web and Redshift condition keys into one table

chore(redshift): read a restore's snapshot ARN once
2026-11-05 11:57:59 -04:00
Andre Kurait a389299b67 chore(ci): prefetch missing container fixture images (#7474)
* chore(ci): prefetch missing container fixture images

Prefetch configured DSQL, PostgreSQL 18, CodeArtifact, MySQL and OpenSearch images only for consuming fixture shards. Preserve best-effort background pulls and current Hive selection.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* fix(ci): skip unused mock OpenSearch image prefetch

The OpenSearch domain options fixture uses mock mode and never starts its engine container. Preserve prefetches for the actual consuming fixtures.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-05 08:20:32 -06:00
Jimmy Liu Jia cbb2db82d1 ci: allow slow test shards more time to finish (#7601)
* ci: allow slow test shards more time to finish

* ci: clarify shard and fork timeout boundaries

* ci: align shard fork and job timeouts
2026-11-05 08:13:20 -06:00
Priamo Germosen 3a64d2b761 feat(emr): give each docker cluster a real HDFS on its primary node (#7496)
Every EMR cluster runs HDFS: its primary node "also runs the HDFS
NameNode service". In the docker runner mode a cluster's HDFS was a
folder of its /mnt volume behind a view of the hdfs scheme, so an
hdfs:// path naming a host was not served, hadoop fs -ls / failed, and
Hive, which looks up the encryption zone of any hdfs:// path, reached it
under viewfs, where a table at an hdfs:// location failed. Each cluster
now runs a NameNode and a DataNode.

- EmrClusterStorage starts them in a container of their own, from the
  release's EMR Serverless Hive image, which has HDFS's daemons where
  the release's image has only the client. It runs as root only to add
  the primary node's name to its hosts file and give its data volume to
  the hadoop user, then runs both daemons as that user, with one copy of
  each block and permissions off, and makes /tmp and /user/hadoop once
  the DataNode has joined. The data is in a volume of its own, so the
  first container to mount the cluster's /mnt volume is still a step's,
  which fills it with what the bootstrap actions left there. It is on a
  Docker network of the cluster's own, which only the cluster's steps
  join besides theirs, as its HDFS serves its files to any client that
  reaches it, so another cluster's steps, another account's too, do not.
- The AWS runtime for Apache Spark's releases, emr-spark-8.0.0 on,
  publish no Hive image, so their clusters run HDFS from emr-7.5.0's.
  Hadoop keeps its client-server protocols compatible across a major
  version's minor releases, so their newer client reaches its NameNode.
- A step's thread starts it after the cluster's volumes, from the id
  its image's pull, when it is missing, resolves, and waits up to two
  minutes from then, the
  NameNode on its port its own, the DataNode joined and the NameNode out
  of safe mode, as the NameNode's JMX says; a step that comes while
  it starts waits, and one that finds it running uses it. A failure
  fails the step ("The step could not start: ..."), and one whose
  container Docker cannot tell the state of leaves it as it is.
- The daemons log their warnings and errors to the container's output.
- When either daemon exits, the container ends and its readiness goes,
  so the next step starts it again on the data its volume keeps; one
  that finds it about to stop starts it again once.
- Steps reach it by the primary instance's PrivateDnsName, as
  ListInstances gives it, on port 8020: their containers resolve that
  name to the HDFS container's address, and fs.defaultFS names it, so
  hdfs:// paths without a host and paths without a scheme lead there.
  ListInstances numbers the MASTER group's instance first, so the name
  holds while other groups resize.
  In a namespace the steps share, the host's or another container's,
  which the HDFS container joins too, they reach it on its loopback, and
  its daemons listen there only, so no other interface serves its files,
  which any client could change; one cluster's HDFS runs there at a
  time, another's refused while it does. One a process with another
  docker-network left running, in another namespace than the steps', is
  started again in theirs on its data. With none, steps have no network,
  so the cluster runs no HDFS.
- Hadoop's local job runner copies a job's -files to
  /tmp/hadoop/mapred/staging on the local file system, then looks for
  them at that path of the default file system, as JobResourceUploader
  drops the folder's scheme. So in the hadoop command's configuration,
  which a custom JAR's MapReduce in the driver reads too, the hdfs
  scheme is a view of the cluster's HDFS in which that one folder is
  the container's own. Spark and Hive keep HDFS's own client, as Hive
  casts an hdfs:// file system to it to look up its encryption zone,
  so a Spark step writes a Hive table in HDFS too.
- A reset or a shutdown removes the HDFS containers this process
  started, found running or kept from an earlier process, after the
  drivers that use them are stopped, and a step or a bootstrap handed to
  its thread before it, however it then ends, starts no HDFS, driver or
  successor after it but is left as one whose driver was stopped, and
  none is handed to a thread until the reset is over; a container Docker
  refuses to remove stays known for the next; a cluster's next step
  starts its HDFS again on the data its volume keeps. The container and
  its network go with the cluster's storage, and the startup sweep
  removes those of clusters that are gone or have ended.

Every cluster now needs a Hive image, so the documentation of
image-template and hive-image-template says a mirror sets both.

The Docker-gated tests now cover a Hive table at an hdfs:// location, a
bootstrap action's file in /mnt, a structured streaming query keeping
its checkpoints in HDFS, a Spark step writing a Hive table there, hadoop
fs -ls /, and a DataNode that exits, after which the next step reads an
earlier step's file. The CI prefetch queues the Hive image for
EmrDockerRunnerDockerIntegrationTest's shard too.
2026-11-04 21:50:36 -06:00
syedali032-creator 68271ef6b8 fix(stepfunctions): return the HTTP task result on the native image (#7543) 2026-11-04 17:17:54 -04:00
Priamo Germosen 5a4632229e feat(emr): run Hive steps in the docker runner mode (#7459)
In the docker runner mode a Hive step failed without running ("hive-script
and pig-script are not in the image steps run in"). On a cluster whose
Applications name Hive, a command-runner.jar step running hive-script, as
the AWS CLI writes a Type=Hive step ("hive-script --run-hive-script
--args" and the step's Args), or hive itself, now runs: the image's
hive-script runs hive with the arguments after --args, with Tez in local
mode, on the cluster's storage and Floci's S3.

- An EMR cluster's nodes hold every application it installs, so a
  cluster with Hive bootstraps and runs every step in one image: the
  release's EMR Serverless image with the Hive, Tez, HDFS, MapReduce and
  YARN of its EMR Serverless Hive image (or the new hive-image-template).
  EmrReleaseImages makes it the first time a release's cluster needs it:
  a container of the EMR Serverless image, created and never started,
  gets the Hive image's folders streamed in from a container of that
  image, and is committed, as a bootstrap's container is, with no image
  builder involved. The two images ship different builds of
  emr-serverless-goodies-common under one name, so Tez keeps the Hive
  image's in a folder of its own, its links rewritten to lead there, and
  the Hive image's Hadoop configuration, which puts Tez on the class
  path, goes to /etc/hadoop/conf.hive, which Hive runs with.
- The image is named after the release, the ids of the two images as a
  container would run them (an image-registry-base included) and what
  is copied, so a newer pull of either makes another; it is kept for the
  release's next cluster, and made once at a time. The bootstrap and the
  steps get its id, as they get a bootstrap image's, from their own
  thread, which makes it first, unless the cluster has ended by then; a
  failure to make it fails the step, or ends a bootstrapping cluster with
  INTERNAL_ERROR.
- hive gets Floci's settings, then the cluster's core-site, tez-site and
  hive-site properties as --hiveconf settings, then the step's own
  arguments, so a step's --hiveconf wins as it does over hive-site.xml;
  the cluster's hive-env exports are its environment.
- Its metastore is the cluster's own, as "Hive records metastore
  information in a MySQL database on the primary node's file system": an
  embedded Derby database in the cluster's /mnt, so a table one Hive step
  makes is there for the next until the cluster ends. A hive-site naming
  the Glue Data Catalog's client factory uses Floci's Glue instead.
- Hive reaches the cluster's HDFS through the same view of /mnt/hdfs
  under the viewfs scheme: Hive looks up the HDFS encryption zone of any
  hdfs:// path, which only an HDFS NameNode answers. A table without a
  LOCATION is in /user/hive/warehouse there, which other steps read as
  hdfs://.
- On a cluster without Hive, hive-script runs in the release's image, as
  EMR's does without Hive ("Hive isn't installed."); NOT_RUN is
  pig-script's alone.

The Docker-gated EmrHiveStepsDockerIntegrationTest runs the AWS CLI's
Hive steps on a cluster's metastore and HDFS, a hive-site for the Glue
Data Catalog, a cluster without Hive, and a bootstrapped cluster whose
installs a Hive step and a later step both find, in the emr-7.5.0
images, which the CI prefetch pulls for its shard.
EmrServerlessSparkRunner's hiveSettings now builds both services'
--hiveconf settings.
2026-11-03 23:18:20 -06:00
Hector Ventura 01f64e8a5c fix(docker): let the compat image reach the Docker socket on native Linux (#7378)
USER 1001 made the image start unprivileged, so the entrypoint skipped the branch that adds the socket's group and honours FLOCI_RUN_AS_ROOT. With a socket owned by a non-root group and mode 660, Docker-backed services could not launch containers, and FLOCI_RUN_AS_ROOT=true had no effect.

The image now starts as root like the standard one, and the entrypoint drops to uid 1001. HOME is set to /app because that drop keeps the environment: hooks would otherwise run with HOME=/root, which uid 1001 cannot write to, and pip install would fail.

docker exec now defaults to root on this image, as it does on the standard one.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-03 21:23:35 -04:00
Priamo Germosen 710b2488bf feat(emrserverless): run Hive job runs in the docker runner mode (#7407)
In the docker runner mode a Hive application's job run failed without
running ("Floci runs Spark job runs only"). It now runs: Floci starts
hive in a container of the release's EMR Serverless Hive image
(public.ecr.aws/emr-serverless/hive/<release>, or the new
hive-image-template), with Tez in local mode in Hive's JVM, S3A on
Floci's S3 and the Glue Data Catalog client, the image's metastore, on
Floci's Glue in the run's account.

- hive gets the core-site, tez-site and hive-site classifications as
  --hiveconf settings, the application's then the run's, a run's
  classification replacing the application's; then -i initQueryFile
  and -f query; then the run's parameters, whose --hiveconf settings
  take priority, as the user guide ranks them.
- The run's hive.exec.scratchdir and hive.metastore.warehouse.dir are
  used as it sets them, in S3. Tez in local mode copies a session's
  staging folder, which Hive puts under the scratch folder, to the same
  path in the container, a copy that silently does nothing where the
  image's hadoop user cannot create that path. The container starts as
  root, makes that path hadoop's, sets the Tez addresses EMR
  Serverless's runtime would set, then runs hive as hadoop in its home
  folder, with the groups Docker gives it. The scratch folder is the
  last hive.exec.scratchdir setting, in any form Hive's CLI reads:
  --hiveconf name=value, --hiveconf=name=value, with one dash or two,
  or the value as the next argument.
- A Hive application's custom image is its HiveDriver worker type's,
  else the application's; Tez's tasks run in the driver's container, so
  a TezTask image is not used.
- The driver's stdout.gz and stderr.gz go to the run's HIVE_DRIVER log
  folder, and its CloudWatch log streams are under HIVE_DRIVER, the
  entry of logTypes it reads; Hive's own log stays in the container.
- A run whose driver is not its application's type, hive on a Spark
  application or sparkSubmit on a Hive one, fails without running.

spark-defaults go through the same classification merge. The
Docker-gated EmrServerlessHiveDockerIntegrationTest runs the user
guide's Hive job and a failing query in the emr-7.5.0 Hive image, which
the CI prefetch pulls for its shard. EmrServerlessRequests'
createApplication takes the application's type, and S3TestClients'
deleteBucket empties and deletes a test's bucket.
2026-11-03 17:14:56 -06:00
Priamo Germosen b63e4a5bb9 test(emr): run steps and job runs through the Docker runner (#7349)
No EMR test ran a step or a job run through Floci's Docker runner: the
runner's wrappers and settings were unit tested and run by hand in the
images. EmrDockerRunnerDockerIntegrationTest, a Docker-gated
@QuarkusTest on ContainerDataPlaneProfile (which now sets both runner
modes to docker), runs them for real in the emr-7.5.0 image, reaching
Floci's S3 from the container:

- a hadoop-streaming word count step, its mapper and reducer from S3,
  writing its counts to S3;
- the same word count as a custom JAR at EMR's streaming jar path;
- s3-dist-cp from S3 into the cluster's HDFS and back;
- a cluster's spark-env export, read by a Spark step's driver;
- an EMR Serverless run on the user guide's virtual environment recipe,
  spark.archives with #environment and the driver's and executors'
  Python in it, from an archive that needs no package index.

EmrRequests.awaitStep and EmrServerlessRequests' createSparkApplication,
startJobRun and awaitJobRun are shared helpers, each wait checking that
its call answered 200 before reading the state, and
RetryingTarCopier.putEntry, pulled out of singleFileTar, writes the
archive's entries. The CI prefetch queues the 3.5 GB image for the
shard that runs the class, last, behind the Lambda runtimes, and the
prefetch results step no longer warns about an EMR Serverless image on
ECR Public, the only place AWS publishes them.
2026-11-02 17:31:59 -06:00
Matheus André 33052fa101 ci: run required checks on merge queue entries (#7064)
Add a merge_group trigger to ci, checkstyle, docs-actions and
partition-literals so a merge queue can gate main on them.

Refs #5085
2026-11-02 10:27:34 -04:00
Priamo Germosen e3a0b167c5 chore: route tools/ to the maintainers in CODEOWNERS (#7322)
tools/ had no CODEOWNERS rule, so a PR touching only that directory
requested no reviewer and notified neither maintainer, as #7262 did.
2026-11-02 07:57:47 -06:00
Priamo Germosen 2d17978bf7 ci: run the test suite in five shards (#7303)
One shard was cut by the 25-minute job limit twice on 2026-11-02, at 25m15s
and 25m26s, and no test had failed in it either time: the reports it uploaded
before the cut carried 13459 tests with no failures and no errors. The suite
has grown into the budget rather than anything having broken, and a fifth
shard is what gives it room.

The partitioner needs no change. It takes the shard total as an argument and
balances by class count with each @TestProfile group kept whole, and the
completeness gate checks the shards it is handed against the commit's own
class list rather than a count. So this is the matrix, the total beside it,
and the comments that named four.

Measured over the 3223 test classes on main today, with each class's time
taken from the surefire reports of one four-shard run:

  four shards   13.8  13.3  17.1  13.8        minutes of tests
  five shards   12.6  12.1  12.4  10.7  10.2

The slowest shard loses 27 percent of its test time, 17.1 minutes down to
12.6, and the spread across shards narrows from 3.8 to 2.4. A shard pays
about 2m15s before its first test, 1m52s of that the compile, so the fifth
job costs that much runner time while the critical path drops by about four
and a half minutes.

What this does not do is balance by duration. The partitioner weighs classes
and profile groups rather than seconds, which is how one shard of four came
to carry 17.1 minutes against another's 13.3. Five shards leave more headroom
over that imbalance; they do not remove it.
2026-11-02 07:53:47 -06:00
Oleksandr Nikolaichuk 42bc856258 test(cloudformation): run the schema coverage ratchet in CI (#7282) 2026-11-02 07:37:06 -04:00
Hector Ventura b38fe7d96d chore(deps): bump botocore to 1.43.118 and drop it from Dependabot (#7223) 2026-11-01 12:44:09 -04:00
Hector Ventura 488a3197f1 chore(compat): close the SES races and report pre-pull and class timings (#7221)
Review of #7212 left three gaps in the parallel sdk-test-java setup.

The classes that create SES contact lists share a one-list-per-account limit
and three of them delete every list, and SesAccountAttributesTest turns
account sending off while other classes send. All of them now hold
ses-account, which costs about 8 s of serial time.

The pre-pull step discarded its output, so a failed pull only showed as a
slower run. Each pull now records its result and duration, and a step puts
them in the job summary with a warning when one failed.

Under JUnit parallel execution Surefire writes some test cases into another
class's XML file, so the timing report credited them to the wrong class. It
now sums per test case classname, which also splits sdk-test-python's single
"pytest" row into its classes.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-01 12:20:58 -04:00
Hector Ventura a93a07475e chore(compat): run sdk-test-java classes in parallel and pre-pull service images (#7212)
* chore(compat): run sdk-test-java classes in parallel and pre-pull service images

The sdk-test-java leg has grown to ~18 min because the suite runs strictly
serially and most of its time is spent waiting on containers Floci starts
and on minute-aligned metric ticks. Run test classes three at a time (the
methods of a class stay on one thread, in order), with @ResourceLock on the
classes that change Organizations or SES account-level state and @Isolated
on the ones that change wider shared state.

Also pull the heavy service images in the background before the tests
start, so they no longer serialize inside the test window, and drop the
stale "~10 min" note from the timing-report comment.

On the homelab runner (x86, 6 vCPU, JVM Floci with CI's flags) the suite
went from 21.5 to 10.7 min with the same 2933 tests and no new failures.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* chore(compat): lock the classes that share port 5432 and floci-duck

The first CI run in parallel failed three tests. RdsControlPlaneTest's DB
proxy could not bind port 5432 while DsqlCompatTest's endpoint held it, so
the two now share a lock. DataLakeTest's Athena query failed in floci-duck
while RedshiftRelationalSpectrumTest was using it; the classes that drive
floci-duck now share a lock too.

EcrTest deleted its last repository and the next CreateRepository stalled
for 30 s, past the SDK's timeout, while Floci kept calling the removed
registry's cached address. The retry then got RepositoryAlreadyExists. The
class now keeps one repository for its whole run, so the registry stays up.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-01 11:39:43 -04:00
dependabot[bot] e90f2590b5 chore(deps): bump the actions-minor-patch group across 1 directory with 3 updates (#7171)
Bumps the actions-minor-patch group with 3 updates in the / directory: [docker/login-action](https://github.com/docker/login-action), [actions/setup-python](https://github.com/actions/setup-python) and [actions/setup-java](https://github.com/actions/setup-java).


Updates `docker/login-action` from 4.6.0 to 4.7.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/dbcb813823bdd20940b903addbd779551569679f...81c6f93d4bc991e510b342a00b419b3bb4efc5c6)

Updates `actions/setup-python` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/5fda3b95a4ea91299a34e894583c3862153e4b97...6d4fd22b20465ccc0f7354476588e8df7c9ca0e0)

Updates `actions/setup-java` from 6.0.1 to 6.1.0
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/de7274f081f381c8f8158605e0321c36c376e2e6...b843ebf9b913146b38da2eaa7aeddf76074ae1ad)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: actions/setup-python
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: actions/setup-java
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-31 22:11:42 -05:00
Hector Ventura 2b1d91b7ca fix(docker): start the Windows binary with or without Docker running (#7166)
* fix(docker): start the Windows binary with or without Docker running

The 2.4.0 Windows standalone binary exited at startup with an
UnsatisfiedLinkError for Java_com_sun_jna_Native_open. docker-java's
named-pipe socket calls JNA when the pipe does not open at once, and
JNA was initialized at image build time, so its native dispatch library
was loaded into the builder and never into the binary. JNA is now
initialized at run time, its JNI metadata (from
oracle/graalvm-reachability-metadata, CC0) and a proxy registration for
NamedPipeSocket$Kernel32 are bundled, and FlociDockerHttpClient turns a
LinkageError from the transport into an exception, so a JNA that still
cannot load fails that one Docker call instead of the whole emulator.

With JNA working, a Windows host without Docker never answered its
health check: docker-java retries a missing pipe for the whole 30 s
connect timeout, and DockerRetry retried the NoSuchFileException six
times. The pipe is now opened once first and a missing or denied pipe
fails at once, keeping docker-java's wait loop for a busy pipe, and
DockerRetry no longer retries either error.

The release smoke script prints both ends of a long log on failure.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* test(docker): skip the named-pipe client tests on Windows and name the tolerated exception

Both tests stand a temporary directory in for a pipe, which only behaves that way off Windows: there a directory opens as access-denied and Kernel32 loads. The busy-pipe catch now names its exception expected, as AGENTS.md asks for a tolerated one.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-31 23:11:16 -04:00
Priamo Germosen e77823feed ci: push the published images with zstd -19 layers (#7159)
BuildKit compresses zstd at about level 11 at most, so the release and
nightly images now go through a composite action: the image is built
into an OCI layout, every layer is recompressed with the zstd CLI at
level 19, and a second build that only names the layout pushes it.
BuildKit keeps the recompressed layers and still attaches provenance
and the SBOM to the pushed digests.

On 2.4.0 this takes the native image from 94.6 to 70.1 MB on amd64 and
from 92.6 to 67.1 MB on arm64, and compat amd64 from 223.2 to 167.7 MB.
Pulling zstd layers needs Docker Engine 23.0 or later, so the
installation requirements move up from 20.10.

A new workflow tests the action on the pull requests that change it:
recompress.py against fixture layouts, then the whole action pushing a
two-platform image to a registry on the runner.
2026-10-31 21:38:13 -05:00
Robin Baeckman 07f2d62c17 feat(eks): vendor AWS's add-on version catalog for every supported Kubernetes version (#6735) 2026-10-30 07:21:01 -04:00
Priamo Germosen 743bede481 feat(core): have the JVMs in Lambda, ECS, Batch and Flink containers trust Floci's CA (#6945)
With TLS on, Floci writes its CA bundle as a Java trust store too, but
only EMR's containers got it: a launcher had to copy it in with
ContainerLifecycleManager.copyJavaTrustStore and point its JVMs at it
with a shell line. So a Java Lambda function, ECS task, Batch job or
Flink application calling Floci over HTTPS still failed with "PKIX
path building failed" unless it brought a trust store of its own.

ContainerBuilder now has withJavaTrustStore(). For a container whose
spec asks for it, the lifecycle manager copies the trust store in
beside the CA bundle as it creates the container, and sets
JAVA_TOOL_OPTIONS to Floci's -Djavax.net.ssl.trustStore ahead of the
value the spec gives it, or the image's own when the spec sets none,
so a trust store the workload names itself still replaces Floci's. A
copy that fails creates the container again without any of the trust
variables, as a failed bundle copy already did, so JAVA_TOOL_OPTIONS
never names a file that is not there.

Lambda functions on a Java runtime or from a container image, ECS task
containers, Batch jobs, and Flink's JobManager and TaskManager ask for
it, and so do EMR steps and EMR Serverless job runs, whose
spark-submit starts directly again. The bootstrap actions' container
keeps the separate copy and the shell line, since it is kept as the
steps' image, which would keep a JAVA_TOOL_OPTIONS set at its
creation. Other containers are unchanged.
2026-10-29 18:04:46 -05:00
TATSUNO “Taz” Yasuhiro 385ffcfdd0 feat(lambdaweb): set the WebFunctionAuthType condition keys on endpoint routes (#6893) 2026-10-29 00:54:49 -04:00
galsuchetzky-act f926968167 fix(s3control): take TagResource and UntagResource tag condition keys from generated data (#6677)
The Service Authorization Reference lists aws:RequestTag/${TagKey} and
aws:TagKeys as condition keys for s3:TagResource, and aws:TagKeys for
s3:UntagResource. botocore's s3control model says where the request
carries them: TagResource's Tags list in the body, UntagResource's
TagKeys in the tagKeys query parameters.

With IAM enforcement on, Floci checked both S3 Control actions with no
request tag keys. A policy that allows TagResource only for certain tag
values, or UntagResource only for certain keys, matched no request, so
a request it allows was denied, and a ForAllValues condition on
aws:TagKeys allowed UntagResource whatever keys it named.

tools/aws/regen_s3control_tag_condition_keys.py now generates
s3control-tag-condition-keys.json from the two sources, as the DynamoDB
condition key table is generated: every s3 action the reference gives
either key, and every S3 Control operation's request members that feed
them, found as the tag-on-create table finds tag members.
IamConditionContextResolver reads it for a request on an S3 Control
route. The make targets check the members offline against the pinned
botocore in CI and the actions online against AWS in the IAM data drift
workflow. S3's own bucket and object tag keys stay as written, since
they were measured against AWS and do not all match the reference.
2026-10-28 10:14:26 -04:00
lex00 967e87d7f7 fix(iam): set iam: condition keys from a table generated from the Service Reference (#6762) 2026-10-28 07:00:43 -04:00