Apache Software Foundation / SeaTunnel
Merged upstreamMaintenanceMerged Sep 1, 2026

Validate DynamoDB retry configuration declaratively

Migrated the Amazon DynamoDB sink's non-negative `max_retries` constraint into SeaTunnel's declarative `OptionRule` validation contract.

apache/seatunnel · #11821

Configuration safety improvement

Negative DynamoDB retry counts now fail during SeaTunnel's static option validation instead of surfacing later during connector construction.

Problem

The connector rejected negative retry counts only inside `AmazonDynamoDBConfig`. Static dry-run validation does not construct connector runtime objects, so an invalid value could pass configuration validation and fail later during job submission with a wrapped construction error.

Approach

Declared `max_retries >= 0` in the sink factory's option rule, removed the duplicate imperative check, retained the optional default of 10, documented the accepted range in English and Chinese, and added coverage for defaults, valid and invalid values, and declared-option handling.

Impact and scope

  • Moves a runtime configuration failure into SeaTunnel's standard preflight validation path.
  • Returns a structured option error that identifies the invalid retry constraint before connector initialization.
  • Preserves all previously valid configurations and default behavior while removing duplicated validation logic.

Validation

  • Added seven connector tests covering the effective default, zero and positive values, negative rejection, unknown options, and declared-key behavior.
  • Passed Spotless, compilation, tests, packaging, and the complete final Apache Build.
  • The authored commits and GitHub-verified merge commit credit Goutam Adwant; multiple upstream approvals landed the contribution.