mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
* feat(dynamodb): add typed time-to-live operations to the table access DynamoDbTableAccess gains timeToLive and updateTimeToLive next to the stream operations. The native engine reads the TTL flag and attribute from the table definition and calls DynamoDbService.updateTimeToLive under the scope's account; the Local engine sends DescribeTimeToLive and UpdateTimeToLive. * fix(cloudformation): apply TimeToLiveSpecification on DynamoDB tables An AWS::DynamoDB::Table declaring TimeToLiveSpecification reached CREATE_COMPLETE while DescribeTimeToLive answered DISABLED, because the provisioner never read the property. The provisioner now reconciles TTL against what the table reports, so UpdateTimeToLive is called only when the setting differs: enabled turns it on, Enabled false or a block removed on an update turns it off with the current attribute name, and renaming an enabled attribute fails with the DynamoDB ValidationException before anything changes. Enabled with no AttributeName fails with ValidationError before the table is created. An in-place table update now records the tags, stream and TTL setting it replaces, and rollbackUpdate puts all three back, so a stack whose update fails on a later resource ends UPDATE_ROLLBACK_COMPLETE instead of UPDATE_ROLLBACK_FAILED. A restore that throws keeps the snapshot. * fix(cloudformation): roll back and clean up failed DynamoDB table provisions A table's in-place update that failed after its snapshot, for example on UpdateTimeToLive after the tags and the stream had changed, lost the snapshot: the engine put the previous resource back and reported UPDATE_ROLLBACK_COMPLETE with the changes still live. The provisioner now retains a failed attempt that carries its snapshot, so the engine hands it to rollbackUpdate. A failure before the snapshot changed nothing and still uses the engine's restore. A provision that failed after createTable left the new table behind, on create and on a replacing update alike. The provisioner now deletes a table this attempt created, tolerating ResourceNotFoundException, and never one it adopted or updates in place. A delete that fails is logged and leaves the physical id and the rollback ownership marker, so the stack's create rollback retries it. A table recreated because the update target was gone takes no snapshot, since it has no prior state. * fix(cloudformation): match the AWS status reasons for invalid TimeToLiveSpecification Renaming an enabled TTL attribute and enabling TTL without an AttributeName now fail with the handler message AWS CloudFormation reports, as measured in eu-west-1, and with its InvalidRequest handler error code. The resource status reason is the AWS inner text exactly; the type and logical id prefix are gone, since AWS does not include them. * fix(cloudformation): scope DynamoDB table TTL to the stack and validate Enabled - An update leaves TTL alone when neither the template nor the previous one declared TimeToLiveSpecification, so TTL enabled outside the stack survives, as on AWS. - A TimeToLiveSpecification without Enabled, or with a non-Boolean one, fails model validation before the table is created. - A replacing update whose created table cannot be deleted reports a rollback failure naming the table instead of leaving it untracked.