Skip to content

Feature request: AppConfigProvider to return the last valid value when the API returns empty value on subsequent calls #1363

Closed
@dreamorosi

Description

@dreamorosi

Use case

When retrieving a configuration profile from AppConfig, customers need to be mindful of the poll interval and to the fact that AppConfig returns empty responses for every subsequent call made after a successful retrieval and before the remote config has changed.

To provide a better DX, and to align with the implementation made in Powertools for Python, we should store the last valid configuration and return it instead of returning a response if users call the API again and the main cache was expired.

Solution/User Experience

Whenever a valid configuration profile is retrieve, store the value in the provider. Then, if the API is polled before the configuration has been refreshed (which would return an empty response), return the stored value instead of the empty response.

Alternative solutions

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityparametersThis item relates to the Parameters Utility

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions