Commit Graph
7 Commits
Author SHA1 Message Date
Hector Ventura 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.
2026-09-16 07:07:30 -04:00
Niels Kootstra c5e1a7f7ac fix(cdk): parse CDK endpoint URLs safely (#3352)
* fix: parse compatibility test endpoints safely

* fix(compat): parse CDK endpoint URLs safely

* test(compat): run endpoint regression coverage
2026-09-10 15:29:24 -04:00
Hector Ventura b3465ec94b ci(compat): run the Terraform and OpenTofu bats files concurrently (#3282)
* ci(compat): run the Terraform and OpenTofu bats files concurrently

compat-terraform is the slowest leg of the compatibility workflow and the job
that ends it: its test step is flat at 13m18s to 13m32s across recent runs, while
every other leg finishes several minutes earlier. The six bats files ran as a
single `bats test/` process, so they executed one after another even though each
is an independent root module with its own state and identifiers.

Their cost is dominated by the AWS provider's own waiters rather than by floci:
Neptune and ElastiCache sleep 30s before the first poll on create and delete, and
RDS sleeps 60s. Nothing can shorten those, only overlap them.

Each test/*.bats file now runs in its own process, reaped with wait, writing one
junit-<file>.xml. bats' own --jobs needs GNU parallel or rush, neither of which is
in the image, so the files are forked directly. Output is collected per file and
replayed in a fixed order, because six interleaved streams are unreadable.
BATS_PARALLEL_FILES=0 restores sequential execution for isolating a failure. Both
run.sh wrappers and the justfile recipes delegate to the same runner, so a local
run and a CI run execute identical logic.

The provider plugin cache is warmed once before forking: every fixture deletes its
lock file in setup_file and the AWS provider unpacks to 770 MB, so six concurrent
inits would otherwise pull about 4.6 GB. The warm-up is sequential because that
cache is safe for concurrent readers but not writers, and a failure there is
logged and tolerated rather than fatal.

Also adds the .dockerignore both suites were missing. Each directory can hold a
local .terraform/ of several hundred megabytes plus stray state, none of which
exists in a CI checkout, so image builds were copying roughly 1.4 GB of host state
and behaving differently from CI.

Measured locally on the same image, all 84 tests passing either way: sequential
1130s, concurrent 260s.

* ci(compat): clear stale JUnit reports before running the suites

The runner created the results directory but never cleared it, and the per-file
reports do not replace everything an earlier run could have left: a renamed or
removed bats file keeps its old XML, and so does a run that stops before writing
all of them. Every consumer globs the directory, so those linger in the summary.

CI never saw this, since it starts from a fresh checkout with an empty
test-results. Locally the directory persists in the working tree, and the case is
already live: both suites still hold the single junit.xml the previous sequential
runner wrote, which the junit-<file>.xml names could never overwrite. A local run
mixed months-old results into the current ones, including in the timing numbers
this change was measured with.

Raised by the review on this PR.

* fix(compat): stop the report cleanup reaching other suites' results

The cleanup added in the previous commit globbed junit*.xml, which is wrong
wherever the results directory is shared. docker/run-docker-tests.sh mounts one
test-results directory for all eight suites and runs them in order, so the glob
deleted compat-terraform's six reports when compat-opentofu started, and both
suites deleted the junit.xml that sdk-test-awscli and compat-cdk had already
written. It destroyed results rather than tidying them.

The deletion now names the reports this run is about to write, taken from the
bats files already enumerated above it, so it cannot reach a filename this suite
does not own. That keeps the reason the cleanup exists, a run that stops before
rewriting every report leaving the survivors behind, without the reach.

One case is deliberately given up: a report whose bats file was renamed or
removed is no longer cleared, because nothing in the current run names it. A
lingering stale report is cosmetic; deleting another suite's results is not.

Raised by the review on this PR.
2026-09-09 09:44:38 -04:00
kotov228andPriamo 8765cde6dd test(terraform): expand Floci IaC compatibility coverage (#1834)
* test(terraform): expand Floci IaC compatibility coverage

* fix(terraform): use current S3 backend path style option

* fix(terraform): route ElastiCache provider calls to Floci

* fix(compat): resolve Firehose name collision, drop resources with live Floci gaps

- aws_kinesis_firehose_delivery_stream.compat collided with main's
  .events stream (both named floci-compat-firehose); renamed to
  floci-compat-firehose-basic.
- Removed aws_codebuild_project, aws_cloudtrail, and aws_opensearch_domain
  from both suites: running the suite end-to-end surfaced real Floci gaps
  behind them (BatchGetProjects ARN lookup, CloudTrail ListTags, OpenSearch
  CognitoOptions nil deref crashing the provider) that only show once
  Terraform gets past apply into the post-create refresh. Tracked as
  #2799, #2800, #2801.
- Updated test counts in README to match (70/44/2,582).

* fix(compat): force_destroy the compat bucket, drop resources with live teardown gaps

- aws_s3_bucket.app now sets force_destroy = true: the CUR report now
  actually emits into this bucket (format=Parquet finally lets the
  report definition get created), so terraform destroy needs to be
  able to clear a non-empty bucket.
- Removed aws_transfer_server: Floci's DeleteServer wrongly requires
  OFFLINE state, which isn't real AWS behavior (confirmed against the
  API reference and terraform-provider-aws's own delete logic, which
  never calls StopServer first). Tracked as #2802.
- Removed aws_batch_compute_environment: UpdateComputeEnvironment
  (called by terraform destroy to disable it first) isn't implemented
  at all, so the request falls through to an HTML error page instead
  of a modeled error. Tracked as #2803.
- Updated test counts in README to match (68/42/2,578).

* fix(compat): drop aws_api_gateway_rest_api pending Floci apiStatus fix

CI (native / compat-terraform) showed terraform apply deterministically
timing out on aws_api_gateway_rest_api: terraform-provider-aws waits for
the REST API's apiStatus field to reach AVAILABLE, and Floci never sets
it (confirmed apiStatus is a real, current field in the apigateway wire
model). Removed from both suites; tracked as #2804.

Updated test counts in README to match (67/41/2,576).

* fix(compat): drop redundant ECS containerInsights setting causing drift

CreateCluster silently drops the settings field on Floci (confirmed:
handleCreateCluster never parses req.path("settings"), unlike the
update handlers), so a subsequent plan always proposes re-adding it -
permanent drift on the suite's "re-planning reports no changes" check.
containerInsights=disabled is AWS's actual default, so the block was
functionally redundant; dropped it rather than block on a Java fix.
Tracked as #2806.

---------

Co-authored-by: Priamo <pgermosen@gmail.com>
2026-08-30 22:44:33 -04:00
Hector Ventura c22aa88905 chore(compat): remove sdk-test-rust suite and refresh test counts (#1717)
The Rust suite is dropped from the compatibility matrix: the suite
directory, its justfile recipes (test-rust, setup-rust, test-all and
setup aggregates), README rows, and gitignore entry. The Rust SDK client
example in the README stays since the wire protocols remain
language-agnostic.

The README compatibility table had also drifted ~33% behind the real
suites; counts are refreshed from the Jul 2 runtime totals (java 1326,
node 449, python 311, terraform 22, opentofu 16, cdk 20) and static
counts (go 157 subtests, awscli 205 bats tests), with the headline
updated from 1,969 to 2,506 tests across 5 SDKs and 3 IaC tools.
2026-07-03 02:01:01 -05:00
Conor Heine 13916913e8 fix: handle base64-encoded ACM cert imports (#248) 2026-04-07 13:20:27 -05:00
Conor Heine eeefb729c4 test: move compatibility tests into this repo (#225)
* test: move compatibility tests into this repo
* fix: add StatisticValues parsing to CloudWatchMetricsJsonHandler
* fix: add missing required abstract methods to EmulatorConfig in EventBridgeSchedulerIntegrationTest
* test: add sdk tests for multipart S3 copy coverage
* fix: cover and fix smithy cbor and multipart s3 copy regressions
* test: migrate more test coverage to new folder
* test: add missing ec2 expectation in healthcheck test
* docs: update READMEs in `./compatibility-tests`
2026-04-06 09:35:53 -05:00