mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
* refactor(cloudformation): move AWS::S3::* into its own provisioner (#2754) Migrates AWS::S3::Bucket and AWS::S3::BucketPolicy out of the switch. Behaviour-preserving: bodies are ported verbatim apart from the mechanical rewrites onto ProvisionContext, so the bucket name, the five Fn::GetAtt attributes and the CORS XML are unchanged. The CORS and versioning helpers move with the slice; all four of appendCorsRuleElements' call sites are inside applyBucketCorsConfiguration, so nothing is left behind. Unlike the leaf slice, s3Service stays on the monolith: Lambda code from an S3 location and the ApiGatewayV2 OpenAPI body both still read through it. Only the two switch arms and the provisioning methods leave. Delete keeps its shape. A bucket policy has nothing to remove, and a non-empty bucket still raises BucketNotEmpty so the stack reports DELETE_FAILED as AWS does, rather than reporting a clean delete. * refactor(cloudformation): move AWS::Logs::LogGroup into its own provisioner Behaviour-preserving move of the log group's provision and delete paths. Unlike the earlier slices this one carries a real update path: the body decides between reconciling in place and replacing, from the prior physical id and the recorded FlociLogGroupNameMode, and it infers that mode from the physical id's shape for stacks persisted before the attribute existed. Uses ctx.priorPhysicalId() rather than reading it back off the StackResource. The two are equal on entry, but the method assigns the new physical id before it finishes, so a context-captured value cannot be invalidated by a later edit to the body. UPDATE_ROLLBACK_RESTORED_ATTR moves to CfnRollback, which exists for exactly this: it was package-private on the monolith and so unreachable from the provisioners package. The monolith's constant now delegates there, leaving CloudFormationService's two references untouched. reconcileLogGroup moves with the slice. isGeneratedName and its prefix helper are copied, because a type that has not migrated yet still calls them, and logsService leaves the monolith entirely. CloudFormationLogGroupProvisionerTest keeps testing through the dispatcher, now with the provisioner registered. That is load-bearing rather than decoration: with an empty registry the type would reach the stub arm and the test would assert against a synthetic id. Going through the dispatcher also covers the plumbing this migration changed, that existingPhysicalId and existingAttributes reach ProvisionContext.