Files
floci/src/main/java/io/github
Alex Banna 3fe7a60a58 feat(stepfunctions): add state machine version APIs (Publish/List/DeleteStateMachineVersion) (#1562)
* feat(stepfunctions): add state machine version APIs

Add PublishStateMachineVersion, ListStateMachineVersions, and
DeleteStateMachineVersion, plus publish-on-create support (publish=true). The
Terraform AWS provider calls ListStateMachineVersions after creating an
aws_sfn_state_machine; Floci previously returned UnsupportedOperation, failing
both apply and destroy. Versions are tracked per state machine
(<arn>:<n>). Integration-tested; verified end-to-end with terraform apply +
destroy of an aws_sfn_state_machine against Floci.

* fix(stepfunctions): return a defensive copy from listStateMachineVersions

Greptile review on #1562: listStateMachineVersions returned the StateMachine's
internal list directly, exposing it to external mutation and concurrent-modification
hazards. Return List.copyOf(...) instead.

* fix(stepfunctions): ListStateMachineVersions newest-first and InvalidArn for missing SM

AWS lists state machine versions newest first (descending by creationDate, tie-broken on
the version number since creationDate is only second-resolution); returning insertion order
made the Terraform provider latch onto the wrong version ARN once more than one version
existed. Listing versions for a non-existent state machine now returns InvalidArn rather
than StateMachineDoesNotExist, which is not a declared error for this operation. Adds a
two-version ordering test and a missing-state-machine InvalidArn test.
2026-07-01 22:35:10 -05:00
..