Skip to content

Replace legacy DeleteItem params#4364

Open
aanton-git wants to merge 9 commits intoaws:developmentfrom
aanton-git:feature/replace-legacy-parameter-DeleteItem
Open

Replace legacy DeleteItem params#4364
aanton-git wants to merge 9 commits intoaws:developmentfrom
aanton-git:feature/replace-legacy-parameter-DeleteItem

Conversation

@aanton-git
Copy link
Copy Markdown
Contributor

@aanton-git aanton-git commented Mar 23, 2026

Description

DeleteAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType) ends up in DeleteHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType), which still uses legacy Expected and ConditionalOperator. AWS recommends ConditionExpression instead. Update delete request construction to use expression-based conditions.

Motivation and Context

• Context.Async.cs:184 → DeleteAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)
• Context.cs → DeleteHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)
• Table.cs → DeleteHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType) builds DeleteItemRequest

Testing

-feature branch mocked client benchmarks

image

-development branch mocked client benchmarks

image

Breaking Changes Assessment

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • [ x] I have added tests to cover my changes
  • [ x] All new and existing tests passed

License

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

Copy link
Copy Markdown
Contributor

@irina-herciu irina-herciu left a comment

Choose a reason for hiding this comment

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

make sure all changes are covered with unit tests

Comment thread sdk/src/Services/DynamoDBv2/Custom/DataModel/Context.cs Outdated
Comment thread sdk/src/Services/DynamoDBv2/Custom/DataModel/Context.cs Outdated
Comment thread sdk/src/Services/DynamoDBv2/Custom/DataModel/Context.cs

private Task DeleteHelperAsync<[DynamicallyAccessedMembers(InternalConstants.DataModelModeledType)] T>(T value, DynamoDBFlatConfig flatConfig, CancellationToken cancellationToken)
{
if (value == null) throw new ArgumentNullException("value");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

extract common logic for sync and async

Comment thread sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentOperationRequest.cs Outdated
Comment thread sdk/src/Services/DynamoDBv2/Custom/DocumentModel/DocumentOperationRequest.cs Outdated
Comment thread sdk/test/Services/DynamoDBv2/IntegrationTests/DataModelTests.cs Outdated
Comment thread generator/.DevConfigs/264e45e8-60ef-4e07-8f70-7fb4dc554187.json Outdated
@aanton-git aanton-git marked this pull request as ready for review April 1, 2026 07:34
@dscpinheiro
Copy link
Copy Markdown
Contributor

@irina-herciu @aanton-git I apologize but today's release included a massive refactoring of the SDK integration tests.

I updated them to: use xUnit for parallelism, target .NET 8 in addition to .NET Framework, and (for DynamoDB specifically) split the large document / data model tests into separate classes (new structure is https://github.com/aws/aws-sdk-net/tree/main/sdk/test/Services/DynamoDBv2/IntegrationTests).

Unfortunately you'll need to rebase your branches, but hopefully this change makes adding new tests / troubleshooting easier in the future (not to mention actually testing non net472 code paths).

@aanton-git aanton-git force-pushed the feature/replace-legacy-parameter-DeleteItem branch from 1459ec3 to 28d3796 Compare April 16, 2026 11:45
@aanton-git aanton-git force-pushed the feature/replace-legacy-parameter-DeleteItem branch from 28d3796 to f258868 Compare April 16, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants