Skip to content

Comments

Add a config property descriptor along with a custom resolver and validators#642

Open
ubaskota wants to merge 2 commits intosmithy-lang:config_resolution_mainfrom
ubaskota:config_property
Open

Add a config property descriptor along with a custom resolver and validators#642
ubaskota wants to merge 2 commits intosmithy-lang:config_resolution_mainfrom
ubaskota:config_property

Conversation

@ubaskota
Copy link

Issue #, if available:

This PR adds a ConfigProperty descriptor that serves as the central instrument for configuration resolution. The descriptor is responsible for resolving config values from sources, applying custom resolvers for complex resolutions, validating values, caching them, and facilitating value updates.

The ConfigProperty descriptor implements the Python descriptor protocol to provide:

  • Lazy resolution
  • Validation
  • Caching
  • Custom resolver
  • Source tracking

Initial config variables:

  • region - demonstrates simple resolution
  • retry_strategy - demonstrates complex resolution (aggregates retry_mode and max_attempts)

These two variables ensure that the design handles both simple and complex resolution.

Tests

  • Verified that the unit tests for config property, validators and custom revolvers pass successfully.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ubaskota ubaskota requested a review from a team as a code owner February 24, 2026 05:29
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.

1 participant