Skip to content

Conversation

@dscpinheiro
Copy link
Contributor

Fixes #4243

Description

The TransactWriteConfig class introduced in V4 for DynamoDB did not include the SkipVersionCheck option, requiring customers to use the overloads that accept a DynamoDBOperationConfig instead (which have been marked as deprecated).

Testing

Dry-run: DRY_RUN-89adcabb-d0d4-44a9-bdad-31823b3e6f9d

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

Copilot AI review requested due to automatic review settings December 23, 2025 20:43
@dscpinheiro dscpinheiro added the v4 label Dec 23, 2025
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note but this class is getting out of hand, there's almost 5k lines... Before the test refactoring is done, I'll see if I can clean up this a little bit (for example, by moving the DynamoDBTable classes to their own files).

@dscpinheiro dscpinheiro linked an issue Dec 23, 2025 that may be closed by this pull request
1 task
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses issue #4243 by adding the missing SkipVersionCheck property to the TransactWriteConfig class. Previously, customers had to use deprecated overloads that accept DynamoDBOperationConfig to skip version checks in transactional writes. This change brings TransactWriteConfig into alignment with other configuration classes like SaveConfig, DeleteConfig, and BatchWriteConfig, which already support this property.

Key Changes:

  • Added SkipVersionCheck property to TransactWriteConfig class
  • Updated the property mapping in ToDynamoDBOperationConfig() method
  • Improved error message clarity by removing reference to DynamoDBContextConfig
  • Added comprehensive integration test to verify the fix

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactWriteConfig.cs Added SkipVersionCheck property with documentation and integrated it into the config conversion method
sdk/src/Services/DynamoDBv2/Custom/DataModel/TransactWrite.cs Updated error message to be more accurate now that SkipVersionCheck is available on TransactWriteConfig
sdk/test/Services/DynamoDBv2/UnitTests/Custom/DataModelOperationSpecificConfigTests.cs Updated property count assertion from 5 to 6 to reflect the new property
sdk/test/Services/DynamoDBv2/IntegrationTests/DataModelTests.cs Added integration test to verify SkipVersionCheck functionality works correctly with TransactWriteConfig
generator/.DevConfigs/fde42955-138d-44dc-8373-e98e836b33e3.json Added dev config file with patch version bump and changelog entry

Copy link
Contributor

@ashishdhingra ashishdhingra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New CreateTransactWrite method enforces version check

3 participants