mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 15:21:05 -05:00
ace5cbfc635ada3cef2fa3bf4f8a7103ed362c7f
150
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
fde5170335 |
test(compat): take the partition and region from TestFixtures in the last 33 suites (#5052)
Third and last batch of the cn-north-1 allowlist burn-down (#4272). The 41 remaining entries all pinned commercial values: ARNs built as arn:aws:<svc>:us-east-1:..., arn:aws: prefix assertions, us-east-1 zones, hosts and filter strings, and clients or signers created for us-east-1 next to the cn-north-1 fixture clients. Among them, the RDS IAM-token tests signed their tokens for us-east-1, OrganizationsTest built its invited account's client for us-east-1, Route53Test associated VPCs as us-east-1 that live in the fixture region, and SesEventPublishingTest failed in setup on a us-east-1 event bus ARN. All 33 classes now derive those values from TestFixtures, so the allowlist is empty: any failure in the China nightly fails the run. |
||
|
|
6deb0d4d2b |
test(compat): run the China-absent tests per partition instead of allowlisting them (#5027)
* test(compat): run the China-absent tests per partition instead of allowlisting them Third batch of the cn-north-1 allowlist burn-down (#4272): the 13 tests that exercised something AWS does not offer in China. Seven keep running there with the China shape: - S3Test: only the us-east-1 endpoint creates a bucket in another region, so elsewhere the location-constraint round trip names the client's own region. - StsTest: the SAML assertion's Recipient is the partition's console sign-on URL (the CDK region facts), signin.amazonaws.cn in China. - Ec2Tests: China names its interface endpoint services cn.com.amazonaws, so the S3 gateway and interface offerings are two services there. - IamTest: GetAccountSummary reports GlobalEndpointTokenVersion only in the commercial partition, the one with a global STS endpoint. Six skip where the service has no endpoint: the five Marketplace tests (the regions botocore publishes for each) and Lightsail (commercial only). The allowlist's China-absent section is gone, 13 entries, 73 to 60. * test(compat): derive VPC endpoint names from the DNS suffix and keep Marketplace guards to us-east-1 The ECR interface service is named under the partition's DNS suffix reversed in every China, EUSC and ISO region (eu.amazonaws, gov.ic.c2s, ...), not only in China, so describeVpcEndpointServices now takes that prefix from the SDK's partition metadata. S3 keeps the China-only split, the only regions where AWS lists it. Floci serves Marketplace Agreement and Entitlement only in us-east-1, so their guards no longer admit the other regions AWS runs them in; widening both is a separate change. |
||
|
|
dfe2117fed |
test(compat): take the partition and region from TestFixtures in five more suites (#5025)
Second batch of the cn-north-1 allowlist burn-down (#4272). These tests pinned the commercial partition, so they failed against a China deployment for the test's own reasons, not Floci's: - AppSyncTest asserted the arn:aws:appsync: prefix on four ARNs. - Ec2DescribeSpotPriceHistoryTest filtered on us-east-1a and us-east-1b. - PipesTest built its role, SQS and Kinesis ARNs in arn:aws and us-east-1. - IamTest looked its user up by an arn:aws ARN; its AWS managed-policy prefix and the SimulatePrincipalPolicy source now follow the partition too. - CloudWatchLogsMetricFilterTest replaced the recorded @aws.region dimension with us-east-1, and MetricFilterQueryAssertions signed its Query request for us-east-1, so it read another region's metrics. All now derive the partition and region from TestFixtures. The allowlist drops 19 entries, from 73 to 54. |
||
|
|
fa30cd7834 |
test(compat): take the partition and region from TestFixtures in SES and SSO Admin tests (#5017)
* test(compat): take the partition and region from TestFixtures in SES and SSO Admin tests The cn-north-1 nightly allowlists 25 cases in SesTagResourceTest, SsoAdminAccountAssignmentTest and SesConfigurationSetEventDestinationTest that fail only because the tests pin commercial values: ARNs built as arn:aws:<svc>:us-east-1:..., the arn:aws: AWS-owned SSO application provider and managed policies, and a us-east-1 primaryRegion. Floci answers correctly in China. TestFixtures gains region(), partition() (from the SDK's region metadata) and arn()/globalArn() builders, and the three classes use them. The rejected-bus cases move from @CsvSource, which only takes constants, to a @MethodSource whose mismatched-region bus is another region of the fixture partition. The 25 entries leave the allowlist (98 to 73). Part of BL-020. * test(compat): keep the SES bus rejection cases running in a single-region partition Greptile on #5017: the method source threw when the fixture partition has no second region (aws-eusc and aws-iso-e list one), so the custom-bus and mismatched-account cases, which need no second region, never ran there. The other region is now optional: the two cases always run, and only the mismatched-region case is left out of a single-region partition. |
||
|
|
c800cc375e |
test(compat): keep the China nightly allowlist free of an order-dependent entry (#4891)
The first Partition Compatibility run (36963820252) went red on one stale entry: SsoAdminAccountAssignmentTest#createInstanceQuotaUsesAwsSdk passed. It only fails when OrganizationsTest#testFullLifecycle leaves its organization behind, which made the caller the management account for every later test, and that happened because the organization's own assertions, including the arn:aws: one that fails in cn-north-1, ran before the try whose finally deletes it. The assertions now run inside the try, so the organization is deleted however they end, and the stale entry is gone from the cn-north-1 allowlist. Part of #4272. |
||
|
|
d72923ab33 |
fix(core): compare ARN partitions with the resource's region, not the literal aws (#4791)
* fix(core): compare ARN partitions with the resource's region, not the literal aws Part of #4272 (P10b). Running the Java SDK suite against a Floci deployed in cn-north-1 (#4790) found five checks comparing a parsed ARN with "aws" and a seeded ARN fixed to the commercial partition: - RdsService.hasRdsResourceIdentity required partition aws, so DB instances, clusters, DB and cluster snapshots and subnet groups created outside aws failed their own ownership check and were not found right after creation. The proxy target group check had the same comparison, and CopyDBSnapshot refused any source ARN outside aws; it now requires the target region's partition, since a snapshot copies within its partition. - ElastiCache ListTagsForResource rejected every arn:aws-cn: ARN; it now expects the request region's partition and names it in the message. - RAM ignored organization principals outside aws; any published partition is accepted, the organization id ties the principal to the caller's. - The seeded IAM Identity Center instance was arn:aws:sso:::instance/... in every deployment, so China permission sets never found it. It now takes the partition of the deployment's home region, and AddRegion compares against the instance's own primary region instead of a fixed us-east-1. * fix(sso): move a persisted bootstrap instance to its partition, and drop the fixed China allowlist entries Greptile on #4791: a deployment persisted before the seeded instance took its partition keeps it as arn:aws:sso:::instance/..., while its permission sets were already minted in the instance's own partition, so the fix would not reach it. ensureBootstrapInstance now rewrites a stored bootstrap instance whose ARN is not in its primary region's partition. pgermosen on #4791: with #4790 on main, the cn-north-1 allowlist entries this fixes would turn stale and fail the nightly. Measured against this branch in cn-north-1: CloudFormationRdsDynamicReferenceTest, the ten RdsControlPlaneTest entries, RdsJdbcCompatTest#createDbInstanceAndConnectWithPassword and SsoPortalTest now pass and are deleted. The four IAM-token connection tests still fail because they sign their tokens for a pinned us-east-1, which a cn-north-1 database rightly refuses; they move to the group of tests that pin commercial values. * fix(ram): answer the listing operations for the request's region only Greptile on #4791: with organization principals accepted in every partition, a commercial GetResourceShares from a member of the organization returned a China share. The cause predates this PR: GetResourceShares, ListResources, ListPrincipals and GetResourceShareInvitations walked every stored share, so a share created in eu-west-1 was listed through us-east-1 too, while a resource share is a regional resource. RamController now passes the request region and the four operations keep only shares (and invitations to shares) in it, which also keeps a share out of another partition. * fix(ram): resolve a share or invitation to mutate in the request's region only pgermosen on #4791: after the listings were scoped to the request's region, findOwnedShare still walked every stored share, so a share invisible to GetResourceShares in one region could still be deleted, updated, associated, disassociated or retagged from there; AssociateResourceShare would add a resource the same endpoint's ListResources does not report. Accept and RejectResourceShareInvitation had the same gap. The six share mutations and the two invitation responses now take the request region from RamController and resolve only a share or invitation in it: one from another region gets UnknownResourceException or ResourceShareInvitationArnNotFoundException, like an ARN that does not exist. |
||
|
|
8d056e9456 |
ci: limit contributors to 2 open pull requests (#4864)
Call the shared floci-io/.github pr-limit workflow on opened, reopened and ready_for_review, and on closed and converted_to_draft to clear stale labels. Runs for the same pull request queue rather than cancel, and manual runs use their own concurrency group. Contributors keep at most 2 open, non-draft pull requests: the 3rd and 4th get the over-pr-limit label and a reminder, and from 2026-10-08 the 5th and later are closed automatically. Bots and maintainers are exempt. This replaces the advisory bot that labelled authors with more than 5 open pull requests: the limit is now 2, drafts no longer count, and the logic and wording live in one shared workflow. CONTRIBUTING.md and the pull request template describe the policy. Signed-off-by: Hector Ventura <hectorvent@gmail.com> |
||
|
|
ea06896984 |
test(compat): run the Java SDK suite nightly in cn-north-1 against an allowlist of known failures (#4790)
* test(compat): run the Java SDK suite nightly in cn-north-1 against an allowlist of known failures Part of #4272 (P11). The partition work is covered by unit and integration tests over all eight partitions, but nothing ran a real SDK whose own partition logic (arn:aws-cn: ARNs, China signing scopes, the LocationConstraint S3 CreateBucket sends) has to round-trip. The Partition Compatibility workflow runs after each Nightly against the image it published, or on dispatch with an image and region: Floci starts with FLOCI_DEFAULT_REGION=cn-north-1 and sdk-test-java runs with AWS_REGION set, which TestFixtures now reads (default us-east-1, so the per-PR legs are unchanged). It runs once a night rather than per PR, to keep the shared runner pools free. compat-allowlist-check.py compares the JUnit results with compat-partition-allowlist-<region>.txt and fails on a failure the list does not name, on an entry that no longer fails, or on missing results, so the list only shrinks. The cn-north-1 list holds the 112 failures measured locally on main plus #4787: 96 tests that pin commercial ARNs, regions or zones, 13 that exercise commercial-only behaviour, and 3 still to explain. * test(compat): pin the nightly China run to its image's commit and catch an aborted suite Greptile on #4790: the workflow checked out the Nightly run's head_sha but pulled the mutable floci/floci:nightly tag, so the image and the tests could come from different commits; it now pulls the image first and checks out the commit in its org.opencontainers.image.revision label. And Maven exits non-zero for allowlisted failures too, so a suite that stopped partway could pass; the checker now takes --test-sources and requires a report for every test class in that tree. The cn-north-1 allowlist groups its entries by the verified cause: the RDS and SSO portal entries are Floci bugs (an RdsService ownership check against the literal partition "aws", and an arn:aws: seeded Identity Center instance), and SsoAdminAccountAssignmentTest#createInstanceQuotaUsesAwsSdk passes alone and fails only after OrganizationsTest leaves an organization behind. |
||
|
|
76adb9a97e |
chore(style): Enforce NoVar rule on new files, existing bad files later (#4362)
* chore: ban var with Checkstyle in CI Checkstyle runs tools/checkstyle/checkstyle.xml over src and compatibility-tests/sdk-test-java in its own workflow. It stays out of the Maven lifecycle because a full run takes about 30 seconds. Code that already uses var is listed in tools/checkstyle/suppressions.xml, one entry per service and one per compatibility-tests file, so each can be cleaned and removed in its own PR. * docs: point AGENTS.md and CONTRIBUTING.md at Checkstyle * chore: load Checkstyle suppressions from checkstyle.xml IDE plugins such as CheckStyle-IDEA set config_loc to the config directory and now apply the same suppressions as CI. Maven sets config_loc through propertyExpansion. * chore: exclude files, not directories, from the var check New files in services that still use var are now checked too. * chore: exclude the renamed NativeDynamoDbJsonHandler files from the var check |
||
|
|
d73e33fe4b |
fix(ecs): pull task images at launch so a moved tag reaches the next task (#4583)
* fix(ecs): pull task images at launch so a moved tag reaches the next task Floci resolved an image reference to an image id the first time it saw it and reused that id for the life of the process, so a rebuilt :latest pushed to the registry never reached a new task, even through a new task definition revision and a forced deployment, and nothing reported the mismatch. ECS now pulls every container image when a task starts, before creating any of its containers, following the agent's ECS_IMAGE_PULL_BEHAVIOR (configurable as floci.services.ecs.image-pull-behavior, default "default": pull, and fall back to the cached image when the pull fails). The cached image is whatever the local tag names at launch rather than a remembered id. Each container reports the manifest digest it runs as containers[].imageDigest. * fix(ecs): create task containers from the image id their pull resolved to An overlapping RunTask could pull the same moved tag between this task's pull and its container creation, so the container was created from whatever the shared tag cache named by then while reporting the digest this task pulled. resolveForLaunch now returns the resolved image id with its digest, and ECS builds each container from that id, so the image a task runs and the digest it reports always come from the same pull. The pull also now uses the reference the container is created from, including floci.docker.image-registry-base, instead of the unprefixed name. * fix(ecs): launch image ids without a pull and report the digest the pull resolved A bare sha256 image id under always, or on the first once launch, went to the registry as if it were a repository reference and failed the task although the image was local. resolveForLaunch now runs an image id as it is, like ensureImageExists. The reported digest took the first RepoDigests entry for the repository, which is not necessarily the manifest the tag resolved to when the image holds more than one (an index and a platform manifest). It now comes from the Digest line the daemon streams for the pull, kept while the tag still names that image; a cached image falls back to its repo digest only when there is exactly one. The shared test config uses prefer-cached so the other ECS Docker suites stop adding a registry round trip per launch; the image pull integration test pins default in its own profile. ContainerBuilder imports are back in order. * fix(ecs): report a pull's digest only for the launch that pulled The digest a pull reported was kept per reference and reused while the tag still named the same image id, but on the classic image store an id is the config digest and several manifests can share it, so an outside pull could move the tag to another manifest and leave the reused digest stale. Only the launch that pulled now uses the streamed digest. A cached launch uses the image's repo digest for the repository when there is one, or the one equal to the id (the containerd store names an image by its manifest), and otherwise none. Also sorts the ContainerLifecycleManager imports. * fix(ecs): pull the image-pull test's busybox and registry from Docker Hub EcsImagePullDockerIntegrationTest pulled both images through the public.ecr.aws/docker/library mirror, whose anonymous quota is shared per runner IP; shard 3 failed on toomanyrequests: Data limit exceeded. Take them from TestImages like the other Docker-backed tests, pinning the registry image there, and prefetch both for the shard that runs the class. * test(ecs): name the registry readiness probe's tolerated exception expected |
||
|
|
8ff1eae121 |
ci: run the per-PR hygiene checks in one job and skip drafts without a gate job (#4703)
* ci: run the per-PR hygiene checks in one job The signed commits, AI attribution, Conventional Commits, em-dash and PR template checks were five workflows with one job each, so every push to a pull request started five runners for about ten seconds of work apiece. At busy times those jobs queued for up to twenty minutes behind the CI shards and the compatibility suites under the account's concurrent-job limit. They now run as steps of a single "PR hygiene" job. Each step keeps the old check's name, script and annotations, and runs under !cancelled() so one failure does not hide the others. The signature check also runs on "edited" now: with one job, an edit-triggered run replaces the whole result, and skipping signatures there would turn an unsigned PR green. A per-PR concurrency group cancels superseded runs. The path-filtered checks (docs tables, partition literals, changelog guard) keep their own workflows. * ci: skip draft PRs with a job condition instead of a gate job CI and Compatibility Tests reached the draft rule through a reusable workflow that started its own job on every run. That job did about three seconds of work, but every other job in the run needed it, so under the account's concurrent-job limit its queue wait sat at the head of the critical path: on recent PR runs a median of about 35 seconds, and nine to thirteen minutes at the tail, before a shard or native build could even be queued. The same condition now sits on the root jobs as a job-level if:, which GitHub evaluates without a runner. Drafts, closed PRs and edited events still skip the suites and pushes to main still run; the native suites follow build-native. CI summary keeps always() so a failed shard still reaches the partition check and report, and uses the same condition so it does not run on a draft. pr-draft-gate.yml has no callers left and is removed. |
||
|
|
5aae37a3ef |
ci: prefetch busybox for the ECS leftover-container test (#4647)
EcsLeftoverContainersDockerIntegrationTest starts busybox but was not listed among the classes that key the busybox prefetch, so its shard pulled the image during the test instead of before it. List it with the other busybox users. |
||
|
|
1465251e0c |
fix(dynamodb): reject a request member of the wrong JSON type (#4636)
* chore(dynamodb): vendor the input shapes of botocore's DynamoDB model tools/aws/regen_dynamodb_shapes.py keeps each operation's input shape and the type of every shape it reaches, from the pinned botocore release. make aws-data-sync regenerates it and make aws-data-check keeps it in sync. * fix(dynamodb): reject a request member of the wrong JSON type DynamoDB answers a member of the wrong JSON type with a SerializationException before it runs the operation, such as "NUMBER_VALUE cannot be converted to String" for a number BillingMode or IndexName. The message names the JSON token and the Java type, or says "Unexpected field type", "Unexpected value type in payload", "Start of structure or map found where not expected" or "UnknownError" by where the value sits. The first bad member in body order is reported. A JSON null counts as absent and an unknown member is ignored. Floci now checks every DynamoDB JSON request against the vendored input shapes. A number in an ExclusiveStartKey S value is one of these errors on AWS, so that test now expects the SerializationException. * fix(dynamodb): keep provenance out of the shapes freshness check The shapes file now carries its provenance in a _source block, like the other vendored AWS data, and --check compares it without that block. A run against --botocore-data or a local checkout no longer reports the file as stale when only the botocore label differs. |
||
|
|
ac706264a3 |
ci: pull the Firelens router from Docker Hub and correct why (#4622)
* ci: pull the Firelens router from Docker Hub and correct why A post-merge run showed the ECR Public quota is per runner IP and per byte, not specific to the docker/library mirror: the Firelens router failed with "toomanyrequests: Data limit exceeded" right after the same job had pulled two Lambda runtimes from ECR Public. The router is the same image AWS publishes on Docker Hub (same manifest, config and layer digests on both architectures), so the Firelens test now names it there, through a TestImages pin the prefetch reads. The Lambda runtimes stay on ECR Public: their Docker Hub copies lag by more than a year and some tags are missing. The TestImages Javadoc now gives the corrected reason. * ci: annotate a stale, unreadable or misrouted prefetch The prefetch already writes a line when a key names a class that no longer exists or when a TestImages pin cannot be read, but only into a log nobody reads unless a shard fails. The results step now turns those lines into workflow warning annotations, and adds one more: an image prefetched from ECR Public that is not a Lambda runtime, since everything else the tests start is carried by Docker Hub and belongs there. The prefetch stays best-effort, so these are annotations, not failures. * ci: warn on a misrouted prefetch whether or not its pull succeeded The routing warning matched only "prefetched" lines, so an image on the wrong registry whose pull failed on the quota, the very case the warning is for, produced only the raw failure line. It now matches "prefetch failed" lines too. |
||
|
|
26146a3f94 |
feat(iam): expand wildcard service grants against a vendored namespace catalog (#4544)
GetServiceLastAccessedDetails reports the services an entity can reach, but a grant that names no namespace could not be expanded: "Action": "*", a globbed prefix such as s3*, and any NotAction all denote a set no policy document spells out. A user holding only AdministratorAccess came back with an empty report. Closes #4487. The list of namespaces is vendored in aws/iam-service-namespaces.json and generated by tools/aws/regen_service_namespaces.py from AWS's Service Reference Information index, whose per-service "service" field is the IAM namespace itself. botocore is deliberately not the source, even though every other vendored file here comes from it: a namespace is not any botocore field, since CloudWatch's endpointPrefix is monitoring and its serviceId is CloudWatch against an IAM namespace of cloudwatch. A rule over botocore metadata is wrong for some service, and a wrong namespace is worse than a missing one because it names something IAM does not have. That index is a live endpoint rather than a pinned dependency, so unlike regen_partitions.py a fresh generation is not byte-identical and byte equality is the wrong gate. What must be guaranteed is that nothing in the file is invented, which is checked directly: make iam-namespaces-check validates the file's shape offline, and make iam-namespaces-verify checks online that every namespace in it still exists upstream, failing on one that does not. Services AWS has added since the last sync are reported without failing, since the file being behind makes the report incomplete rather than wrong. A namespace a policy names outright is kept whether or not the catalog knows it, so a catalog trailing an AWS launch still reports an explicitly named service; only wildcard expansion depends on it being current. A globbed prefix now expands to the namespaces it matches rather than being treated as every service and then dropped. |
||
|
|
903efdf58e |
ci: key the ECR Public prefetch on the classes that start each image (#4600)
* ci: key the ECR Public prefetch on the classes that start each image prefetch-images.sh keyed the four Lambda runtimes on any /lambda/ path in shard.txt, and partition.sh spreads the Lambda tests over every shard, so each of the four shards pulled all four runtimes (674 MiB) plus the Firelens router (105 MiB) from ECR Public anonymously before its tests started. ECR Public counts that transfer per runner IP, and once the quota is spent every later anonymous pull fails with "toomanyrequests: Data limit exceeded", which is how a 2 MiB busybox pull took a shard down on main twice on 2026-09-27. Measured from a full four-shard run by pairing each ImageCacheService "Pulling image" / "Image already present locally" line with the class that logged it: nodejs:20 is reached from every shard, python:3.14 and python:3.12 each have one Docker-backed class, nodejs:18 was pulled by every shard and started by none, and the Firelens router has one class. Each entry now keys on those classes, which cuts a shard's ECR Public prefetch from about 800 MiB to between 120 and 330 MiB. A class the list misses pulls inline, as before. The tests also used three busybox tags (latest, 1.36, stable) for the same 2 MiB image. They now share one pin, TestImages.BUSYBOX (busybox:stable, the tag application.yml and the compatibility suites already use), and the prefetch script reads that pin from the class the way it reads the sidecar pins from application.yml, so one prefetch serves every test and the two cannot drift apart. The one test that pulls the other architecture keeps a tag of its own: a foreign-platform pull replaces what the local tag points at on a daemon without the containerd image store, and the docker build in the VolumesFrom test resolves its base from that local tag. Each key that names a class is checked against src/test/java, and a stale name is written to the log, so a rename cannot silently turn a prefetch off. The prefetch also set off ECR Public's per-second limit on its own: every pull started in the background at once, so the shard's ECR Public pulls landed in the same second. They are now queued and pulled one after another, a second apart, small images first because core/common/docker sorts near the top of every shard, while the Docker Hub pulls stay parallel. And each pull now writes one result line to prefetch-images.log, printed by a step after the tests, so a failed or still-running prefetch can be told apart from a test pulling the image itself. * ci: pull the Docker library test images from Docker Hub The first run of the prefetch results log showed where the quota actually runs out. On the two shards that failed, the very first pull of the job, docker/library/busybox or docker/library/python from the ECR Public mirror, came back with "toomanyrequests: Data limit exceeded" before the job had transferred anything, so the shard's own volume was not what spent it. The same runner then pulled busybox from Docker Hub seven seconds later and a 116 MiB lambda/ image from ECR Public half a minute after that, both fine. The mirror at public.ecr.aws/docker/library has an anonymous quota of its own, shared by runner IP and often already spent when a job starts, while GitHub-hosted runners pull Docker Hub without a limit: the fourteen Docker Hub images each shard prefetches have never failed. TestImages now names busybox and python-alpine the Docker Hub way, with the reason in its Javadoc, and the prefetch pulls them with the other Docker Hub images instead of queuing them behind the ECR Public runtimes. The three python-alpine literals share one pin. The pin is read with a regex that tolerates spacing, and a pin the script cannot read writes a "prefetch skipped" line instead of silently pulling nothing. An image two entries name is pulled once. The results step also lists any docker pull still running, so an early exit does not make an unfinished pull look like one that never ran. * test(compat): pull the SageMaker and CodeBuild images from Docker Hub The SageMaker compatibility tests (Java and Python) and the CodeBuild one named busybox through the public.ecr.aws/docker/library mirror, the same namespace whose anonymous quota fails the Build and Test shards, and the native Python jobs of another PR failed on it the same way. They now name the image the Docker Hub way. The CodeBuild digest is the same on both registries, so that reference only changes its host. |
||
|
|
dce7983b15 |
chore(ci): native CI now fails when the native image breaks a Docker call (#4514)
* chore(ecs): read the task metadata stats from inside a container No compatibility test reached Docker's stats API, so the native image could lose the docker-java stats models without any test failing. * chore(compat): reach the Docker commands no native test used Recording the Docker API calls of the Java suite against the native image showed commands no test reached. Cover the ones a CI run can reach: - ECS Exec resizes the terminal of an interactive session - a Lambda function with 33 MB of unzipped code is served from a code volume, which lists the volumes - Timestream for InfluxDB reboots an instance * chore(ci): run container-backed EC2 against the native image The native suites run EC2 in mock mode, so no native test reached the Docker calls only container-backed EC2 makes: building the security group helper image, committing an instance as an AMI and removing that image, and the VPC networks. A new job starts the native image with container-backed EC2, once with security group enforcement and once without, since an enforced instance lives in its helper's network rather than on a VPC network. It ends by killing and restarting Floci, which must remove the VPC network the tests leave behind. * chore(compat): trust Floci's test certificate in the ECS Exec session client The native CI job runs Floci with TLS, which makes the ExecuteCommand stream URL wss:// on Floci's test CA. * chore(ci): launch arm64 EC2 guests in the container-backed EC2 job The job runs on an arm64 runner, and the x86_64 AMI starts its guest as linux/amd64. The VPC network instances never reached running there. Maven also logs its test counts now, so a skipped phase shows in the job log. * chore(compat): say why the new tests' cleanup failures are ignored * chore(ci): stop waiting for Floci once it reports unhealthy in the EC2 job The wait kept polling for the full minute after an unhealthy status, unlike the existing wait step in the same workflow. |
||
|
|
238e21770e |
ci(compat): skip test compilation in the native build (#4539)
-DskipTests only stops surefire; testCompile still ran and compiled all of src/test on both arches before the native image build. -Dmaven.test.skip=true skips test compilation as well. |
||
|
|
c357d37fa9 |
feat(release): sign published image attestations with keyless cosign (#3914)
Move signing into its own sign-images job that consumes push-native's digest outputs, so a Fulcio or Rekor outage can no longer strand a partially published release, and document the cosign verify invocation for consumers. Closes #2397 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> |
||
|
|
288cc01268 |
ci: verify the source-derived shard class list against compiled test classes (#4245)
all-classes.txt is derived from src/test/java file names so shard.txt exists before Compile. A test class whose name differed from its file would drop out of both all-classes.txt and the shard union, and the completeness check in CI summary would not notice. After Compile, derive the list from target/test-classes as before and fail the shard if the two disagree. |
||
|
|
a3a06bb7b6 |
ci: raise the shard timeout from 15 to 20 minutes (#4437)
Measured on recent green runs, shards take 10m49s to 13m47s, so the slowest had about a minute of margin under a 15 minute ceiling. Shard 1 timed out twice on an unrelated PR because of exactly that. timeout-minutes is a kill switch for a hung job rather than a budget. Actions bills the minutes a job actually uses, so raising the ceiling costs nothing while runs stay the length they are, and it stops a slow runner or a contended queue turning a passing suite into a red build. This does not make anything faster, and it is not a substitute for the work in #3963: it removes the failure mode while the suite sits where it sits. Per shard that is about 1m15s compiling, 2.3 to 3.2 min building one application per distinct test profile, and 7.2 to 8.2 min running test classes, with the class time spread too flat to have a hot spot left. ci-summary keeps its 10 minute ceiling; it finishes in seconds. |
||
|
|
0dd080a46f |
feat(core): partition foundation from botocore's published partition data (#4317)
P1 of the multi-partition initiative (#4272). tools/aws/regen_partitions.py vendors botocore's partitions.json and endpoints.json (8 partitions, 46 regions, the partition-wide endpoints with their signing regions) plus the CDK's opt-in and S3 website rules into src/main/resources/aws/partitions.json, checked by make aws-data-check. AwsPartition and AwsPartitions replace the hand-typed rules behind AwsRegions; RequestContext carries the request's partition from its SigV4 signing region; RegionResolver mints global ARNs in that partition and buildArn routes a blank region there; floci.partitions.id pins the deployment's partition behind a startup validator that refuses a contradiction with the default region. Behaviour a reviewer will see, all AWS-faithful: DescribeRegions follows the request's partition and the opt-in model (17 commercial regions by default, all 34 with AllRegions=true, RegionName.N filters, endpoints on the partition's DNS suffix); TLS SANs cover every published region; the EKS registry mirrors follow the deployment partition's regions. The partition-literal baseline drops by two. Part of #4272 |
||
|
|
0a601d54eb |
chore(tooling): gate partition literals in src/main against a per-file baseline (#4270)
P0 of the multi-partition plan. tools/partition/partition_literals.py inventories the arn:aws: prefixes, amazonaws.com hosts, hosted-zone ids and hand-rolled partition regexes in src/main/java per file against tools/partition/baseline.tsv. A literal in a new file fails, growth in an existing file fails, and a drop fails until the baseline is regenerated, so the remaining count only shrinks. Escapes are a `// partition-literal: <reason>` comment or an allowlist.yaml entry. Makefile targets (partition-check, partition-baseline, partition-audit, partition-test), a python-only workflow, AGENTS.md and CONTRIBUTING.md paragraphs, and the ResourceExplorer2 assertion now checks the partition against the ARN's region instead of a literal arn:aws:. |
||
|
|
375d83c0f4 |
fix(ci): add draft PR handling to CI workflows for compatibility and build tests (#4292)
Signed-off-by: Matheus André <matheusandr2@gmail.com> |
||
|
|
5fbaab1cca |
fix(ci): compute shard.txt before Compile so the image prefetch overlaps compilation (#4026)
The first prefetch-images.sh call ran before shard.txt existed, so it always hit the readability guard and exited silently; only the second call, right before the tests, did any work. Derive the shard include list from src/test/java instead of target/test-classes, so shard.txt is available before Compile. Every test is a top-level class in src/test/java, so the source file name equals the class name and the resulting shard.txt is byte-identical for all four shards. Prefetch once, right after the shard is computed, and drop the second call. Make the script log when it exits at the readability guard so a no-op call shows up in the job log instead of being silent. Closes #3995 |
||
|
|
3c23fff607 |
ci: prefetch the Postgres, k3s, InfluxDB and Firelens images the shards pull inline (#4181)
Every shard pulled these images inline during the test run. Prefetch them in the step that already warms the lambda and docdb images, matched on the shard's own test list so a shard only pulls what it runs: postgres:15-alpine for redshift and cloudformation, postgres:16.3-alpine for rds, influxdb:2.7, rancher/k3s and the fluent-bit and busybox pair for ecs. The rds tag is hardcoded on purpose, since imageForEngine adapts the configured default to the requested EngineVersion and there is no single config line to read. |
||
|
|
4753428567 |
fix(rds): bind PostgreSQL IAM tokens to the published endpoint and authorize rds-db:connect (#4100)
* fix(rds): bind PostgreSQL IAM tokens to the published endpoint The PostgreSQL proxy validated IAM auth tokens with the two-argument validator, so a token generated for any host, port or region was accepted as long as the signature and DBUser matched. The MySQL proxy already checked the token against the endpoint it publishes. Thread the same binding into the PostgreSQL handler and validate against it. * fix(rds): carry account and resource ids in the proxy binding RdsService now builds the proxy binding itself at every relay start (instances, clusters, RDS Proxy relays and restart restores) from the published endpoint, port, region, account and DbiResourceId or DbClusterResourceId, so the auth proxy has everything rds-db:connect is scoped to. The convenience startProxy overload that re-derived the region from the relay key is gone along with it. * feat(rds): authorize rds-db:connect when IAM enforcement is on After the token signature checks out, the auth proxy now asks IAM whether the token's principal may perform rds-db:connect on arn:aws:rds-db:<region>:<account>:dbuser:<resource-id>/<db-user>, the same check AWS runs. It only applies when services.iam.enforcement-enabled is on; a caller IAM does not know keeps the filter's bypass. The client still sees the engine's generic authentication failure, and the denial is logged in AWS's wording so the cause is visible server-side. * refactor(rds): rename RdsMysqlBinding to RdsProxyBinding Both engines, Aurora clusters and RDS Proxy relays now validate IAM tokens against it, so the MySQL-specific name was misleading. * docs(rds): describe IAM token endpoint binding and rds-db:connect * test(rds): cover a replayed IAM token in the JDBC compat suite * fix(rds): accept IAM tokens generated for the loopback name of the endpoint Floci advertises the name containers reach it by (host.docker.internal natively, its own address in Docker), while a client on the host connects to the same proxy over the loopback interface and generates its token for localhost or 127.0.0.1. Binding tokens strictly to the advertised host therefore refused every native client; the published port still has to match, so a token for another instance on the same host is still refused. The compatibility workflow sets FLOCI_SERVICES_RDS_ENDPOINT_HOST=floci as it already does for Redshift, so the tests' tokens name what the containerised Floci publishes. * feat(rds): make the PostgreSQL IAM token endpoint binding opt-in Refusing a PostgreSQL token generated for another hostname, port or region matches RDS but breaks clients whose tokens name a different host than the endpoint publishes, so the check now sits behind services.rds.iam-token-endpoint-binding (FLOCI_SERVICES_RDS_IAM_TOKEN_ENDPOINT_BINDING), off by default. MySQL and MariaDB keep requiring the endpoint as before, and the rds-db:connect check still runs whenever IAM enforcement is on. The compatibility workflow turns the flag on so the replayed-token case stays covered. * fix(rds): refuse an IAM token that reaches the validator without a binding Every proxy publishes a binding, so a token without one has nothing to be checked against; validating its signature alone was a fail-open path. The signature-only validate(token, user) overload and the MySQL handleAuth overloads that passed no binding are removed; production only ever used the ones that pass it. * fix(rds): sanitize the rds-db resource named in the refused connection warning The database user is part of that resource and comes straight from the client's startup message, so it is stripped of control characters like the other client-controlled values in the warning. * docs(rds): call a refused IAM token the engine's ordinary authentication failure The exact message differs per engine, and RDS PostgreSQL words it differently from Floci's handler today, so the docs no longer promise one wording. * docs(rds): move the IAM token binding row into the RDS variables table The row had landed above the page heading, where it rendered as a stray one-row table; it now follows FLOCI_SERVICES_RDS_ENDPOINT_HOST as it does on the RDS page. * fix(rds): bind PostgreSQL IAM tokens to the endpoint by default A stock Floci still accepted a PostgreSQL token generated for another endpoint, the replay this change set out to close, and PostgreSQL and MySQL disagreed about it in a way RDS never has. The endpoint check is now on for every engine. services.rds.iam-token-endpoint-binding (FLOCI_SERVICES_RDS_IAM_TOKEN_ENDPOINT_BINDING=false) stays as the escape hatch for clients that generate tokens for a container name or DNS alias the endpoint does not publish. The compatibility workflow no longer needs to turn the check on. * chore(ci): rerun after a Docker Hub rate limit failed shard 1 |
||
|
|
27633bf94d |
feat(appsync): execute APPSYNC_JS resolvers via a Node sidecar (#3422)
* feat(appsync): execute APPSYNC_JS resolvers via a Node sidecar A field with a resolver resolved to null: no data fetchers were registered, so graphql-java fell through to its property fetcher on an empty root. This runs the resolver instead, for UNIT and PIPELINE alike, over NONE, AWS_LAMBDA, RELATIONAL_DATABASE and AMAZON_DYNAMODB data sources. Resolver JavaScript runs in a Node sidecar container rather than in process. Floci's published image is a Mandrel native executable, which carries no Truffle languages, so there is no in-process JavaScript to embed; running real Node also means a bundle executes as written, ES modules and all. @aws-appsync/utils is a shim the sidecar writes at boot rather than the published package, so a resolver call never depends on npm being reachable. The pipeline follows AppSync's: ctx.stash threads through every stage, each stage sees the last as ctx.prev.result, runtime.earlyReturn stops everything, util.error fails the field with the type the resolver chose, and util.appendError returns its errors beside the data. A data source failure does not fail the field on its own: the stage's response() handler is called with ctx.error set and decides whether to re-raise or suppress, which is why resolvers carry an explicit if (ctx.error) branch. VTL mapping templates are not executed. A VTL stage fails its field saying so rather than resolving to null, since a null that means "not implemented" is indistinguishable from a null that means "no rows". Carries model/FunctionConfiguration and AppSyncService so it builds and tests standalone; both are identical to the copies in the AppSync CloudFormation change and collapse on merge. * feat(appsync): enforce the APPSYNC_JS subset before evaluating resolver code The sidecar is real Node, so it accepted JavaScript AWS rejects: async functions, promises, classes, try/catch, while loops, this, and imports of Node builtins. For an emulator that is the worst failure available, since a local run green-lights resolver code that cannot deploy. Imports are restricted by a module resolve hook rather than a source scan, so a dynamic import of a builtin cannot slip past either. An async handler is caught before it runs and a handler returning a promise after. The remaining constructs are found by scanning the source with comments, strings and template text blanked first, so the same keywords inside them are not flagged. A rejected resolver fails its field with errorType UnsupportedFeature and the line. Enforcement is on by default and can be turned off with floci.services.appsync.js-runtime.enforce-appsync-subset, which exists only so a false positive cannot block someone whose code AWS does accept. Checking real resolvers against it found a gap of the same kind in the other direction: @aws-appsync/utils/dynamodb is a real module the shim did not provide, so valid code was being rejected. It now implements get, put and remove; the helpers that compile a condition or update expression throw by name rather than returning something the data source would mishandle. Also from review: cap the /evaluate request body, keep integer precision in the DynamoDB NS branch as the N branch already did, reject two SQL parameters bound to the same name instead of letting the Data API report it, drop the container id and close the log follower in reset(), and bound the docker probe in the integration test so an unresponsive daemon cannot hang CI. * feat(appsync): add the js-runtime url knob and stop the sidecar through ContainerTeardown Follows the sidecar contract the other managed containers use. floci.services.appsync. js-runtime.url points the runtime at a Node server that is already running, in which case ensureStarted skips container management entirely: nothing is created, adopted or stopped, and the URL is probed with the short adopt budget so a wrong one says so instead of holding the first resolver for the full start timeout. Same shape and meaning as floci.services.duck.url. NodeAppSyncJsRuntime now implements ContainerTeardown, so EmulatorLifecycle stops the sidecar with the other process-bound containers at a deterministic point rather than only through @PreDestroy, which the interface documents as running too late for the final storage flush. Teardown is a no-op for a pre-configured URL, since that server is not ours to stop. * fix(appsync): serialize reset() and stop the sidecar it gives up on reset() touched started, baseUrl, containerId and logStream without holding the monitor that ensureStarted() and stopManagedContainers() both take. A failed evaluation could therefore clear those fields in the window after a container had been created and its id recorded but before started was set, dropping the only handle to a live container: teardown then saw a null id, treated the sidecar as never started, and the container was leaked rather than stopped. reset() is now synchronized on the same monitor, and reentrant so the callers already holding it are unaffected. The failure path in post() goes through discardSidecar(), which stops and removes the container before clearing the fields instead of forgetting it, since forgetting is what leaks: nothing else holds the id. A pre-configured url owns no container, so teardown there stays a no-op. The regression races eight failing evaluations against startup and asserts every container the runtime created was also stopped. It needs a transport-level failure to reach the path: a 500 is rethrown as an AwsException before it, so the stub drops the connection instead. Against the previous reset() it fails with expected <[container-1]> but was <[]>. * refactor(appsync): run resolvers through the GraphQL sidecar callback out of Floci, which left this branch building DataFetchers for a schema that no longer has any. Resolver execution moves onto the sidecar's batched resolver callback instead, so the engine stays in the sidecar and the resolvers, the data sources and the Node runtime stay here. /v1/execute now carries a resolve block naming every planned coordinate that has a resolver, with a callback URL and a token minted for that one operation. The sidecar batches each execution level into one POST /appsync-resolve, which runs the field's resolver and answers with a value or an error. denyFields still win, so a denied coordinate is never listed and never reaches a resolver, and the token stops working as soon as the operation returns. AppSyncResolverExecutor takes a ResolverInvocation record instead of a DataFetchingEnvironment. Every value it read off the environment is on the record, so the pipeline, the data source invokers and the JS runtime are unchanged. ResolverDataFetcher is gone: fields with no resolver are the sidecar's own property fetcher again, and a resolver that disappears mid-operation falls back to the source property rather than failing. One AppSync behaviour does not fit the callback response, which carries a value or an error per field and never both. util.appendError means report this and keep the data, so those errors come back on the operation's session and are merged into the response envelope, which keeps data and appended errors together as AppSync returns them. Also gives the sidecar container host.docker.internal on Linux, since it now has to reach Floci back, moves the JS runtime image pin into application.yml so CI prefetches it the way it does the sidecar pins, and puts the Docker integration test on the shared AppSyncGraphqlSidecarProfile so it is namespaced and gated like the other AppSync integration tests. * ci(appsync): prefetch the Node image only on the shard that starts it The js-runtime prefetch matched /appsync/, so all four shards pulled node:22-alpine although only the shard carrying AppSyncJsResolverDockerIntegrationTest starts that container. Every other test in the package is a unit test. Matching the class name instead is three fewer Docker Hub pulls per run, which is what this script exists to avoid. * fix(appsync): keep null arguments and move the resolver callback under _floci Two review points from #3422. ResolverInvocation copied arguments and variables with Map.copyOf, which rejects a null value, so getMessages(nextToken: null) threw out of the callback and answered 500. That failed every field in the batch, not only the field carrying the null. Both copies are now null tolerant, and an explicit null stays distinguishable from an absent argument: it is present in ctx.args and null, where an absent one is not there at all. The callback moves from /appsync-resolve to /_floci/appsync/resolve, with the EKS webhooks. A bare path is reachable as a path-style S3 request for a bucket of that name, and an S3 bucket name cannot begin with an underscore, so the prefix cannot be shadowed. The null case is covered both ways: a unit test in ResolverCallbackResourceTest that fails with a NullPointerException against the previous code, and three queries in the Docker round trip covering an explicit null, its value reaching ctx.args, and an absent argument for contrast. |
||
|
|
b1e0751764 | ci: prefetch the SQL Server image for the shard that runs RdsAwsIntegrationTest (#3970) | ||
|
|
c2611038a4 |
fix: distinguish a failed verification API call from an unsigned commit (#3840)
If the `gh api` call to fetch a commit's verification status fails (rate limit, transient API error), the old code left `verification` empty and reported the commit as unsigned with a blank reason, sending a contributor off to re-sign a commit that may already be signed. Guard the call and annotate an API failure as its own distinct error instead. The end-of-job signing/rebase guidance is now gated on a separate UNSIGNED flag rather than the general FAILED flag, so an API failure no longer triggers the "re-sign and force-push" instructions, which previously contradicted the per-commit "not a signature failure" annotation. Verification lookups are now batched through a single call to the PR-commits endpoint, falling back to the existing per-commit call for any sha it doesn't cover (over its 250-commit cap, or any other reason), so the git-log-derived commit set stays authoritative either way. Follow-up from #3812, flagged by hectorvent in review. |
||
|
|
918a09f54a |
fix(appsync): move the GraphQL engine to a sidecar, out of the native image (#3534)
graphql-java (~3.8MB with transitive deps) was an unconditional dependency, so it and its schema/execution/parser classes were reachable in every native image regardless of whether AppSync was ever used (issue #2917), the same systemic pattern already fixed for Kubernetes (#2914) and Kafka (#2916). Schema parsing and query execution now run in floci/floci-sidecar-graphql, published from floci-io/floci-sidecars, the same model #3799 already moved Cedar onto: GraphqlSidecarManager lazily starts the pinned image and checks the contract version it reports on /health, refusing a sidecar speaking another contract major with a message naming the image and the variable to change. GraphqlSidecarClient talks to it over plain HTTP. graphql-java is no longer a dependency of this repository at all, not even test-scoped: its schema/execution/parser classes, the query planner, and the 17 AWS scalar coercions now live entirely in the sidecar's own repository. The sidecar itself carries zero AppSync-specific knowledge, and zero AWS vocabulary: its scalars are generic named coercion kinds a caller maps its own scalar names onto, so SidecarSchemaCompiler now sends a scalars mapping (AWSDateTime -> date-time, and so on for all 17) alongside every SDL, or AWS scalar validation would silently degrade to pass-through coercion. It exposes three endpoints: schema validate/compile, a query planner that lists every (typeName, fieldName) coordinate a query would visit plus the directives on each (with zero interpretation of what they mean), and execute, which accepts an opaque denyFields list and nulls those coordinates out with the caller-supplied error. All @aws_auth/IAM/ Cognito/Lambda-authorizer interpretation stays in Floci (SidecarFieldAuthorizationPlanner, AppSyncAuthRequirements), computed from the planner's output before /v1/execute is ever called, so a query the planner can't fully analyze fails closed (refuses the request) instead of silently running unauthorized. SidecarSchemaCompiler replaces AppSyncSchemaParser: it still injects AppSync's directive declarations and the 17 scalar type declarations into the customer's SDL (pure string work) before handing the SDL to the sidecar. While the scalar coercion logic was still being ported to the sidecar's repository, testing surfaced a real bug: every scalar's parseLiteral() delegated to parseValue(), which throws CoercingParseValueException; graphql-java's literal validator only catches CoercingParseLiteralException, so an invalid literal argument (as opposed to an invalid variable) escaped as an unhandled exception instead of a spec-correct GraphQL ValidationError. Fixed in the sidecar before it was ever published. QueryRegistry, QueryExecutor, AuthFieldWrapper, AuthorizationDataFetcher's live DataFetcher wrapper, and AppSyncFieldUnauthorizedException are deleted: their in-process execution role no longer exists. The directive interpretation half of AuthorizationDataFetcher survives as AppSyncAuthRequirements, now taking generic data instead of live graphql-java objects, shared rather than duplicated. Verified end to end against the published image: pulled floci/floci-sidecar-graphql:0.2.0 fresh and ran the full AppSync suite (190 integration tests across schema lifecycle, auth, and execution) through the real GraphqlSidecarManager, including the sidecar starting and stopping as a real sibling container over the mounted Docker socket. |
||
|
|
530d1a54d8 |
ci: fail unsigned commits with a specific, actionable reason (#3812)
Branch protection already requires signed/verified commits before merge, but that only surfaces as a generic red status on the merge button. This adds a check that reads the same verification field GitHub's merge gate uses and annotates the exact commit(s) that need signing, with the fix command, before a contributor ever reaches the merge button. |
||
|
|
892927ceb5 |
feat(verifiedpermissions): run Cedar from the floci-sidecar-cedar image (#3799)
* feat(verifiedpermissions): run Cedar from the floci-sidecar-cedar image The Cedar sidecar now comes from floci-io/floci-sidecars as floci/floci-sidecar-cedar, pinned to an exact version because a cached :latest is never re-pulled. CedarSidecarManager reads the contract JSON that the image's /health returns: a sidecar speaking another contract major is refused immediately with a message naming the image and the FLOCI_SERVICES_VERIFIEDPERMISSIONS_CEDAR_IMAGE and _CEDAR_URL settings to change, instead of polling for thirty seconds or failing later on a request. A pre-configured URL is probed the same way. A sidecar whose health body is not JSON predates the contract and is accepted with a one-time warning. * test(verifiedpermissions): exercise the published Cedar image VerifiedPermissionsIntegrationTest no longer boots the in-tree sidecar in process: CedarSidecarManager starts the pinned image through Docker, the same path production takes, under a vp-test resource namespace so the manager's remove-before-start cannot kill a developer's live sidecar. It is skipped without Docker, and locally when the image is not present; in CI a missing image fails. VerifiedPermissionsServiceTest keeps its reject-before-persist coverage against a fake sidecar answering 400, and CedarSidecarClientTest pins the request shapes and the 200/400/other mapping Floci owns. * chore(build): drop the in-tree Cedar sidecar sidecars/cedar now lives in floci-io/floci-sidecars as cedar/ with its history. The build-helper test source root and the test-scoped cedar-java dependency existed only to boot that server inside the test JVM; the tests now run against the published image, so both go, along with the .dockerignore allowlist entry that let the sidecar Dockerfile see its sources from the repository root context. * ci: stop publishing the Cedar sidecar from this repository The release, nightly and reusable image workflows no longer build a Cedar image or record it in the provenance manifest; the sidecar is released from floci-io/floci-sidecars on its own cadence. The compatibility workflow no longer builds and starts the sidecar by hand: Floci pulls the pinned image itself over the mounted socket onto compat-net, exactly as it already does for floci-duck. The unit-test shards prefetch the pinned image, reading the tag from application.yml so the two cannot drift. The floci/floci:*-cedar tags stop at this change; whether the next release cut retags the sidecar image under the old name for a deprecation window is a release decision, not a workflow default. * docs(verifiedpermissions): document the external Cedar sidecar image The Verified Permissions page names floci/floci-sidecar-cedar, why it is pinned to an exact version, how to pre-pull it, where its API and the sidecar contract are documented, and what a contract mismatch looks like. The README's Docker integration table gains the Verified Permissions row it never had. AGENTS.md records the sidecar rule: own repository, no tag suffix on the Floci image, no :latest default, the sidecar releases first, and how a sidecar is tested from here. |
||
|
|
32594a9dd5 |
ci: bound each terraform bats file and keep partial results on a cancelled compat job (#3720)
The arm64 compat-terraform job hangs about once in thirty runs and dies at the workflow's 20-minute timeout-minutes with nothing to show for it: the runner kept every per-file log and JUnit report in a temp dir inside the container until all files had finished, so a cancel discarded them, and the floci log was only dumped on failure, which a cancel is not. Three such timeouts in the last hundred runs, all with the same blank log. Each bats file now runs under timeout (BATS_FILE_TIMEOUT, default 12m, against a healthy run of about 6.5 minutes), without --foreground so the terraform children die with bats. A file that hits the limit exits 124 with a line naming it appended to its log, each file's report is published as soon as that file ends, a progress line per file reaches the console, and the floci log is dumped on cancel as well. Both suites' runners stay identical. |
||
|
|
17245081f1 | chore(release): document the ordering invariant behind the baseline native/ wipe (#3528) | ||
|
|
341736fc39 |
ci: fix false first-PR welcome for issue-less repeat contributors (#3502)
actions/first-interaction@v3.1.0's isFirstPullRequest() never filters by author, and the action only skips the greeting when neither isFirstIssue nor isFirstPullRequest is true. A contributor who has never filed an issue trips a vacuously-true isFirstIssue, which alone opens the gate regardless of their real PR history. Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> |
||
|
|
e0d43189f7 | fix(build): publish arm64 baseline release image (#3461) | ||
|
|
75a5111f6e |
docs: standardize Java code style rules (#3451)
* docs: standardize Java code style rules AGENTS.md becomes the canonical Code Style source, regrouped into General, Types and names, Imports, conventions the codebase already follows, and Tests. Two new rules: write explicit types rather than var, and import classes rather than writing fully-qualified names inline. Both are stated with the reason they matter here, that the concrete type at a call site is usually what a wire contract reviewer needs to see, and with the one exception each: record deconstruction patterns for var, and genuine same-file name collisions for qualified names. The rest is existing practice written down so it stays true. Each claim was measured against src/main and src/test: no printStackTrace, no logger field named anything but LOG, no Calendar and no SimpleDateFormat. The System.out rule exempts CLI entry points under tools/, which is its one real use. The empty-catch rule now blesses naming the variable ignored or expected, the convention the code already uses. Two conventions are stated with the exceptions the tree actually contains rather than as absolutes. java.util.Date survives where a third-party signature forces it, in the BouncyCastle certificate builder and the JAX-RS HttpHeaders.getDate() override, so the rule is java.time on Floci's side and conversion at that boundary. Tab indentation is banned as such, since a JSON text block may legitimately contain a tab as string content. CONTRIBUTING.md and docs/contributing.md had no code style section at all, and copilot-instructions.md had no code style content, so PR review could not flag either new rule. The Copilot entry also lists the collisions it must not flag. Existing code does not satisfy these everywhere. The rules are documentation only: nothing in CI enforces them, and no Java file changes here. * docs: correct the measured claims in the code style section Review on #3451 caught that System.out is not confined to the tools CLI: four test files print too. Checking the rest of the section the same way found five more claims that do not survive a measurement, so this corrects all six rather than only the reported one. The section's whole value is that a reader can trust it without re-measuring. System.out and System.err are now scoped to src/main, the way the wildcard import rule already splits src/main from tests. The exception is named by its real coordinates: AmiImageTool sits in the Java package io.github.hectorvent.floci.tools.ami, not in the top-level tools/ directory, which holds only tools/docs. printStackTrace stays absolute, since that one holds: zero in src/main and src/test. The Date rule listed two forced boundaries and there are three. BouncyCastle's certificate builder and the JAX-RS HttpHeaders.getDate() override are joined by JDBC's java.sql.Date, which extends java.util.Date and which the old wording read as prohibiting, in RdsDataFieldMapper and RdsDataSqlParameters. Optional is split, because half the claim was true. Never a field is exact, there are none. Never a parameter was wrong: Quarkus threads @ConfigProperty Optional<T> values through parameters in ResolvedServiceCatalog, ContainerBuilder, DockerClientProducer and LaunchedContainerAwsEnv. The three Tests rules each asserted something false. testX is not absent, it names 291 methods across 52 files, so it is described as the older pattern not to copy rather than as something that never happens. AssertJ is not absent either, it is a declared test dependency used by the six Lambda launcher tests. @DisplayName is genuinely rare in src/test, 13 files of 1455, but it is the norm in compatibility-tests at 183 of 208, as is AssertJ at 197 of 208. That module has the opposite idiom, so the Tests rules now say they describe src/test and point a contributor at the module they are in. Documentation only. No Java file changes here. |
||
|
|
2d51259120 |
feat(verifiedpermissions): add full service emulation (#3128)
* feat(verifiedpermissions): add full service emulation * fix(verifiedpermissions): harden OIDC and schema validation * test(verifiedpermissions): add service layer coverage * fix(verifiedpermissions): support native Cedar runtime * fix(verifiedpermissions): package Cedar native FFI * fix(verifiedpermissions): register Cedar deserializers for native * fix(verifiedpermissions): bound JWKS refreshes * fix(verifiedpermissions): avoid Cedar entity reflection * fix(verifiedpermissions): register Cedar native reflection * fix(verifiedpermissions): refresh rotated OIDC keys safely * fix(verifiedpermissions): retry failed JWKS refreshes * refactor(verifiedpermissions): isolate Cedar in sidecar * fix(verifiedpermissions): harden Cedar sidecar runtime * fix(verifiedpermissions): build cedar sidecar in compatibility CI * fix(verifiedpermissions): remove stale cedar jni config * fix(verifiedpermissions): recover cedar sidecar * fix(verifiedpermissions): bound OIDC document responses * fix(verifiedpermissions): start cedar sidecar in native sdk CI |
||
|
|
051a2f09db |
fix(github-actions): continue Docker compatibility tests after failures (#3351)
* fix: report compatibility suite failures * test: cover all compatibility suites after build failure * test: run Docker failure aggregation in CI |
||
|
|
cbfa034470 |
feat(identity-center): complete IAM Identity Center emulation (#3331)
* feat(ssoadmin): add region operation * feat(ssoadmin): attach customer managed policies * feat(ssoadmin): create applications * feat(ssoadmin): create application assignments * feat(ssoadmin): create account instances * feat(ssoadmin): create ABAC configuration * feat(ssoadmin): create trusted token issuers * feat(ssoadmin): delete account assignments * feat(ssoadmin): delete applications * feat(ssoadmin): delete application access scopes * feat(ssoadmin): delete application assignments * feat(ssoadmin): delete application authentication methods * feat(ssoadmin): delete application grants * feat(ssoadmin): delete identity center instances * feat(ssoadmin): list principal account assignments * feat(ssoadmin): provision permission sets * feat(ssoadmin): list provisioned permission sets * feat(ssoadmin): list accounts for provisioned permission set * feat(ssoadmin): describe permission set provisioning status * feat(ssoadmin): list permission set provisioning status * feat(ssoadmin): describe account assignment deletion status * feat(ssoadmin): list account assignment creation status * feat(ssoadmin): list account assignment deletion status * feat(ssoadmin): delete permission sets * feat(ssoadmin): detach customer managed policy references * feat(ssoadmin): list customer managed policy references * feat(ssoadmin): get inline permission set policies * feat(ssoadmin): put permission set boundaries * feat(ssoadmin): get permission set boundaries * feat(ssoadmin): delete permission set boundaries * feat(scim): create groups * feat(scim): create users * feat(scim): delete groups * feat(scim): delete users * feat(scim): get groups * feat(scim): get users * feat(scim): list groups * feat(scim): list users * feat(scim): get schemas * feat(scim): list schemas * feat(scim): list resource types * feat(scim): add service provider config * feat(scim): patch groups * feat(scim): patch users * feat(scim): put users * feat(ssoadmin): delete ABAC configuration * feat(ssoadmin): delete trusted token issuers * feat(ssoadmin): describe applications * feat(ssoadmin): describe application assignments * feat(ssoadmin): describe instances * feat(ssoadmin): describe ABAC configuration * feat(ssoadmin): describe regions * feat(ssoadmin): describe trusted token issuers * feat(ssoadmin): describe application providers * feat(ssoadmin): list application assignments * feat(ssoadmin): list principal application assignments * feat(ssoadmin): list applications * feat(ssoadmin): list application providers * feat(ssoadmin): list regions * feat(ssoadmin): list trusted token issuers * feat(ssoadmin): put application access scopes * feat(ssoadmin): get application access scopes * feat: support listing application access scopes * feat(ssoadmin): get application assignment configuration * feat(ssoadmin): put application assignment configuration * feat(ssoadmin): get application authentication methods * feat(ssoadmin): put application authentication methods * feat(ssoadmin): list application authentication methods * feat(ssoadmin): get application grants * feat(ssoadmin): put application grants * feat(ssoadmin): list application grants * feat(ssoadmin): get application session configuration * feat(ssoadmin): put application session configuration * feat(ssoadmin): list resource tags * feat(ssoadmin): tag resources * feat(ssoadmin): untag resources * feat(ssoadmin): remove regions * feat(ssoadmin): update applications * feat(ssoadmin): update instances * feat(ssoadmin): update ABAC configuration * feat(ssoadmin): update trusted token issuers * feat(ssooidc): register clients * feat(ssooidc): start device authorization * feat(ssooidc): create public client tokens * feat(ssooidc): create IAM-authenticated tokens * feat(ssoportal): list assigned accounts * feat(ssoportal): list assigned account roles * feat(ssoportal): issue assigned role credentials * feat(ssoportal): invalidate portal sessions * docs(ssoadmin): report complete operation count * fix(identity-center): repair CI validation * fix(identity-center): harden auth and native build * fix(ssooidc): disambiguate RestAssured query parameter * fix(identity-center): resolve CI compatibility failures * fix(identity-center): address maintainer review * fix(ssoadmin): preserve application provider partition * fix(identity-center): repair Java compatibility tests * fix(identity-center): trust local TLS in browser flows * fix(identity-center): register refresh token grant in SDK test |
||
|
|
3af6f47bf8 |
ci: enforce required pull request template sections (#3187)
Several open PRs have had sections of the pull request template deleted entirely (Summary, Type of change, Checklist) rather than filled in, and nothing catches this unless a reviewer happens to notice. Fail PR checks when a required section header is missing from the PR body. AWS Compatibility is deliberately excluded: many PRs (chores, refactors, non-AWS-behavior fixes) have nothing to say there. This applies to every open PR immediately, including ones opened before this rule existed: they start failing on their next push, edit, or reopen until the description is fixed up. |
||
|
|
50836bbdc8 |
chore(deps): update to Quarkus 3.39.2 and refresh pinned libraries (#3175)
* chore(deps): update to Quarkus 3.39.2 and refresh pinned libraries Quarkus platform 3.37.4 -> 3.39.2 (BOM and plugin), Jackson 2.22.2, wire 6.4.7, bcprov 1.85.2, graphql-java 26.1, swagger-parser 2.1.48, assertj 3.27.7, neo4j-java-driver 6.2.1, maven-compiler-plugin 3.16.0, maven-surefire-plugin 3.6.0. Vert.x 4.5.33, Netty 4.1.137, REST Assured 6.0.1 and the Kubernetes client move with the BOM. Two pins are kept deliberately. httpclient5 stays at 5.5.1: 5.6 adds transparent content decoding through commons-compress, and its XZ codec references org.tukaani.xz, which is not on the classpath, so the native build fails at link time through docker-java's FrameReader. The Quarkus 3.39 BOM manages 5.6.3, so the explicit pin is what keeps it out. protobuf-java 3.25.9 and proto-google-common-protos 2.49.0 stay for apicurio 2.6.13, the same mixed-classpath native failure that blocks #2906; apicurio 3.x is the real fix and is its own change. Verified: full test suite (14190 + 3479 tests, no new failures; the two RuntimeApiServerTest races reproduce on main), native image on GraalVM 25.0.3 builds and serves STS GetCallerIdentity. * chore(ci): keep single-callsite inlining off for Mandrel native builds Quarkus 3.39 enables -H:+AOTSingleCallsiteInline by default on Mandrel 25.0.4+ (quarkusio/quarkus#55482). The generated Quarkus REST invokers for AwsQueryController.dispatch and AwsJson11Controller.handle are each the single call site of a very large method, so the inliner folds it in and the aarch64 build fails in the compile step with BranchTargetOutOfBoundsException: conditional branches on AArch64 reach +/-1 MB and the inlined method is larger. The amd64 build survives only because x86 branches reach further, and its compile step still grew from about 60 s to 250 s. The opt-out flag exists only on Mandrel (Oracle GraalVM 25.0.3 rejects it as an unrecognized option), so it is appended in the workflows that build with Mandrel rather than in application.yml, keeping local builds on any GraalVM distribution working. * fix(deps): pin httpcore5 to the version httpclient5 5.5.1 declares The Quarkus 3.38+ BOM manages httpcore5 at 5.4.3, where the 3.37 BOM left it to httpclient5, which declares 5.3.6. httpcore5 5.4 changed SocketConfig's defaults: soKeepAlive is on and tcpKeepIdle is 5 seconds, where 5.3 had them off. docker-java copies SocketConfig.DEFAULT for the Docker socket, so httpclient5 now sets TCP_KEEPIDLE on it through SocketSupport.setOption, which looks up Socket.setOption and jdk.net.ExtendedSocketOptions by reflection. In the native image that reflection is unregistered, the lookup throws, and every Docker request fails with "Failure setting extended socket option": the native compat suites lost ECR, ECS, RDS, Redshift and the CDK bootstrap on both architectures while the JVM shards stayed green. docker-java is the only consumer of httpcore5 in the tree. Pinning httpcore5 and httpcore5-h2 to 5.3.6 restores the pair httpclient5 5.5.1 was built with. Verified on a local native build: the binary boots on Quarkus 3.39.2 and ECR GetAuthorizationToken starts the backing registry container over the Docker socket. Bisected: 3.37.4 clean, 3.38.3 and 3.39.2 fail without the pin. |
||
|
|
024bfa0a5c |
feat(docker): containers Floci launches trust the Floci CA (#3091)
* feat(tls): write a CA bundle for launched containers at boot
Containers Floci launches need to trust Floci's HTTPS endpoint from any runtime
without losing access to public HTTPS. A bundle that carries the JVM's public
roots followed by Floci's trust anchor makes that possible: the variables that
replace a runtime's trust store (SSL_CERT_FILE and friends) can then point at
it safely.
ContainerCaBundle writes {persistent-path}/tls/floci-ca-bundle.pem from the
JVM's default trust anchors plus the certificates in the anchor file: the local
CA, or the user-provided certificate file in custom-certificate mode. Only
certificates are copied out of that file, so a combined certificate-and-key
file never leaks its key into a container. The file is swapped in atomically
from a uniquely named temporary file. TlsConfigSource writes it in both
certificate modes; a failure is logged and never stops the boot.
hostPath(config) resolves the bundle in the directory the bootstrap used, so a
persistent path set only in application.yml cannot point it elsewhere, and
appendEnv(env) adds SSL_CERT_FILE, CURL_CA_BUNDLE, REQUESTS_CA_BUNDLE,
NODE_EXTRA_CA_CERTS and AWS_CA_BUNDLE without overriding a key the caller set.
The bootstrap now records its TLS directory in every TLS-on mode, not only when
it issues the leaf, so the CA producer and the bundle lookup read from the
directory the boot wrote to even when a persistent path is set in
application.yml alone. A missing bundle is reported once per process.
* feat(docker): every launched container gets the CA bundle and the trust variables
ContainerLifecycleManager.create is the single path every emulator-created
container passes through, so injecting trust there covers Lambda, ECS, MWAA,
Flink, RDS, ElastiCache, Batch and the rest at once.
With TLS on and the bundle present, create appends the five trust variables
after the spec's own environment (a value from a task or function definition
wins) and copies the bundle to /etc/floci-ca-bundle.pem in the created, not
yet started, container. A copy rather than a bind mount, because when Floci
itself runs in Docker its persistent path is not a host path the daemon can
mount. A failed copy is logged with its consequence and the container still
starts. With TLS off, or without a bundle, nothing changes.
* refactor(lambda): take container CA trust from the lifecycle manager bundle
The Lambda launcher no longer resolves, copies or announces the CA itself: the
lifecycle manager does that for every container. Its append-only policy
(NODE_EXTRA_CA_CERTS and AWS_CA_BUNDLE only, never SSL_CERT_FILE) existed
because a bare CA would have cut a function off from public HTTPS; the bundle
carries the public roots, so the policy and the test that guarded it go.
The Kubernetes launcher publishes the bundle in its ConfigMap instead of the
bare CA, mounts it at /etc/floci-ca-bundle.pem, and appends the trust
variables after the function's own environment so a function value wins, as
in the Docker launcher.
* test(docker): a launched container trusts Floci and public roots through the bundle
The unit tests pin the variables and the copy, not that a runtime reading them
actually trusts Floci and still reaches public HTTPS. A python:3.12-alpine
container launched through the lifecycle manager, with the image's own root
directory pointed away so only the bundle can supply roots, fetches
https://host.docker.internal:<port>/_floci/ca.pem and https://public.ecr.aws/
with no setup of its own. Skipped without a Docker daemon, like the other
*DockerIntegrationTest classes; the image is prefetched in CI with the
others.
* docs(tls): containers Floci launches trust the Floci CA
Describe the bundle every launched container receives, the five variables that
point at it, that a value set on the function or task definition wins, and
that the JVM ignores these variables so a Java workload still needs its own
trust store.
* fix(docker): recreate a container without the trust variables when the bundle cannot be copied
SSL_CERT_FILE, CURL_CA_BUNDLE and REQUESTS_CA_BUNDLE replace a runtime's trust
store, so a container whose bundle copy failed (an image without /etc) used to
start pointing them at a file that was not there, and lost every HTTPS
connection instead of only the ones to Floci. The lifecycle manager now removes
that container and creates it again without the variables, so it keeps the
image's own trust store. The host configuration, and with it any dynamic host
port, is built once and reused.
* fix(tls): serve only the certificate blocks of a user-provided file from ca.pem
In custom-certificate mode GET /_floci/ca.pem returned the configured
certificate file byte for byte, so a combined certificate-and-key file, the
form OpenSSL tooling produces, handed the server's private key to any caller.
The endpoint now goes through the same certificate-only parsing the container
bundle uses. TlsUserCertIntegrationTest boots on a combined file and asserts
the response holds the user certificate and the local CA and no key.
* test(cloudformation): wait for DeleteStack to finish before asserting on deleted resources
DeleteStack hands the work to an executor and answers at once. Seven tests in
CloudFormationIntegrationTest asserted on the deleted resources right after the
answer; one of them, deleteStack_ecs_leavesNoOrphans, failed shard 1 of this
pull request's CI 44 ms later with the cluster still ACTIVE, while the same
shard had passed on the previous push.
A shared awaitStackDeleted polls DescribeStacks until the stack reports
DELETE_COMPLETE or no longer exists, fails on DELETE_FAILED or after ten
seconds, and replaces the three inline copies of that loop as well.
* docs(tls): restore the learned-hostnames section and the ACM wording that #3079 dropped
#3079's docs commit (
|
||
|
|
b0b153c6a8 |
ci(compat): wait on the container's health status before running the suites (#3107)
The readiness step curled the port, so the image's HEALTHCHECK never ran under CI: a malformed probe would leave the container unhealthy while every suite passed against the open port. The step now polls docker inspect for the health status, exits on healthy and fails with the health log and the container logs on unhealthy, so both arches exercise the native image's bash /dev/tcp probe before any suite starts. Checked on a CI-built arm64 image: healthy after 5 s; with the app forced onto another port, unhealthy is reported after 26 s and the step fails. |
||
|
|
64f06e090f |
perf(docker): shrink image by 28% using ubi9-micro (109 MB to 78 MB compressed) (#3085)
* perf(docker): move the native image to ubi9-micro The binary needs only libc, and since #3037 the entrypoint needs only bash and coreutils. ubi9-micro has both at 7 MB compressed instead of ubi9-minimal's 40 MB. Measured on arm64 with the nightly-09042026 binary: 109 MB to about 78 MB compressed, 313 MB to 229 MB uncompressed. ubi9-micro has no useradd and no curl, so the user is one /etc/passwd line and the healthcheck is a bash /dev/tcp probe. Dockerfile.native gets the same runtime stage and loses its unused gosu tools stage. Dockerfile.compat needs microdnf, so it now starts from ubi9-minimal and copies /app out of the native image. * chore(docker): share the health probe and split the compat tools stage The bash health probe is now docker/healthcheck.sh, used by all three Dockerfiles. Dockerfile.compat gets a version independent tools stage; the aws CLI shim test and the cache warm job build target: tools, so they pull no floci image and their cached layers stay stable. ARG VERSION and the native RUN steps move so only the binary copy changes between builds. * fix(docker): copy healthcheck.sh into the compat image from the build context * ci(compat): build the whole compat image on pull requests and check it starts healthy |
||
|
|
c55733c49e |
ci(compat): run the suites on the arm64 image and keep one amd64 leg (#3039)
#2940 widened the compatibility workflow to build the native image for both published architectures and run all eight suites on both, sixteen suite jobs per PR. What the suites check is arch-neutral, and with several PRs in flight the jobs sat queued for the shared runner pools for longer than they take to run. The suites now run against the arm64 image only. Both native images are still built, so each published architecture is proven to link and package, and one amd64 suite stays: sdk-test-python now carries a Firehose compression delivery test, mirroring the Java one, that proves the x86_64 snappy JNI library survived the native build. That is the one resource registered per platform, and the proof moves from the slowest leg to the fastest. The two Snappy variants are container formats around raw Snappy blocks: the xerial snappy-java stream and Hadoop's block framing, neither of which has a Python reader without native system libraries. The test parses the framing itself, following Floci's writer, and decodes the raw blocks with cramjam, which ships wheels for both architectures. The results artifact carries the architecture in its name so the two Python uploads are distinguishable. |
||
|
|
aa455fbba0 |
ci(compat): record the native build size in the job summary and keep the stats JSON (#3016)
Quarkus passes -H:BuildOutputJSONFile to every native build, so the build-output stats (code area, image heap, resources, total image size, reachable types and methods) already exist next to the native source jar and were thrown away. Read them after the quick build, append them to the job summary for each architecture together with the gzip size of the binary, which tracks the compressed layer Docker Hub reports, and upload the JSON as an artifact for 30 days. This is the measurement every dependency-removal PR needs on amd64, which cannot be built locally on an Apple Silicon machine, and the first half of a size gate: nothing fails yet, the numbers just become visible per PR. |
||
|
|
eb0472fccc |
docs: fix stale image tags, release model, service nav and contributor checklists (#2980)
The getting-started and contributor docs had drifted from what the workflows and the code actually do: - quick-start and CONTRIBUTING pointed users at a `latest-jvm` image that the release pipeline never publishes; both now name the `-compat` image, and `make docs-check` greps the docs for any `-jvm` tag - the CONTRIBUTING branching model now matches the workflows: `main` is published as the nightly channel, a maintainer runs the Release Cut workflow to tag a release, and the tag triggers the publish; PR builds produce compat images but never publish them - README and the docs landing page carried a hand-maintained service count and a second copy of the service table, both stale; they now link to the Services Overview - the Service Matrix gains the ELB Classic row it was missing, with an `elb` alias so the check no longer resolves the Classic key to the v2 page, and check_service_matrix.py now also fails on a docs/services page that has no row - the README category table lists 16 documented services it omitted - mkdocs nav gains 11 service pages that were unreachable from the site, drops a duplicate CloudTrail entry, and the docs job now runs `mkdocs build --strict` with nav and link validation so a page without a nav entry fails CI - AGENTS.md, CONTRIBUTING.md and docs/contributing.md told contributors to register a service in ServiceRegistry, which has no registration API; all three now point at ResolvedServiceCatalog and list the config, storage, native-image, docs, tooling and compat-suite touchpoints a new service needs |
||
|
|
73411043e1 |
ci: pin every GitHub Action to a commit SHA (#2979)
Replaces the 38 floating tag refs left across ci, compatibility, doc-style, docs, docs-actions, conventional-commits, nightly, release and welcome with the SHA plus version comment style already used by release-cut and build-images. Floating majors are pinned to their current release (upload-artifact v7.0.1, download-artifact v8.0.1, setup-python v7.0.0, amazon-ecr-login v2.0.1). Every SHA was checked against the tag it annotates. |