Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ConfigurationSchemaGenerator to use correct TimeSpan format #3320

Merged
merged 4 commits into from
Apr 2, 2024

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented Apr 1, 2024

ConfigurationBinder source generator uses TimeSpan.Parse(value, CultureInfo.InvariantCulture) to parse TimeSpans.

'duration' isn't an acceptable description of how to represent a TimeSpan. Instead use a custom regular expression to represent TimeSpan formats.

Microsoft Reviewers: Open in CodeFlow

eerhardt added 2 commits April 1, 2024 11:43
'duration' isn't an acceptable description of how to represent a TimeSpan. Instead use a custom regular expression to represent TimeSpan formats.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-integrations Issues pertaining to Aspire Integrations packages label Apr 1, 2024
@eerhardt eerhardt merged commit 3a5094b into dotnet:main Apr 2, 2024
8 checks passed
@eerhardt eerhardt deleted the FixConfigSchemaTimeSpan branch April 2, 2024 18:59
@eerhardt
Copy link
Member Author

eerhardt commented Apr 2, 2024

/backport to release/8.0

Copy link
Contributor

github-actions bot commented Apr 2, 2024

Started backporting to release/8.0: https://github.com/dotnet/aspire/actions/runs/8528020180

radical pushed a commit to radical/aspire that referenced this pull request Apr 3, 2024
…et#3320)

* Fix ConfigurationSchemaGenerator to use correct TimeSpan format

'duration' isn't an acceptable description of how to represent a TimeSpan. Instead use a custom regular expression to represent TimeSpan formats.

* Add tests for the timespan regex.

* Fix outdated JSON config schema tests

* Fix more tests
@github-actions github-actions bot locked and limited conversation to collaborators May 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants