diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml index 2ca169f..181ed31 100644 --- a/.github/workflows/publish-nuget.yml +++ b/.github/workflows/publish-nuget.yml @@ -201,17 +201,20 @@ jobs: # A package must never ship without its tests having run, on every framework it ships for. # The package targets net9.0 and net10.0. The test project picks its framework from - # UmbracoVersion (16 is net9.0, 17 and 18 are net10.0), so one run per framework: 16.5.1 - # for net9.0 and 17.6.1 for net10.0, the same versions ci.yml pins. Each run must produce + # UmbracoVersion (16 is net9.0, 17 and 18 are net10.0), so one run per Umbraco major: 16.5.1 + # for net9.0, 17.6.1 and 18.1.0 for net10.0, the same versions ci.yml pins. Each run must produce # a trx with at least 65 passing tests (the floor ci.yml uses) and a bin folder for the - # framework it claims, so zero discovered tests or a wrong framework fails the publish. + # framework it claims, so zero discovered tests or a wrong framework fails the publish. The + # bin folder and results are deleted before each run, so a folder left by an earlier leg + # cannot satisfy the check. - name: Test the package on every shipped framework run: | - for LEG in 16.5.1:net9.0 17.6.1:net10.0; do + for LEG in 16.5.1:net9.0 17.6.1:net10.0 18.1.0:net10.0; do UMBRACO=${LEG%%:*} FRAMEWORK=${LEG##*:} - RESULTS="$GITHUB_WORKSPACE/testresults/$FRAMEWORK" + RESULTS="$GITHUB_WORKSPACE/testresults/$UMBRACO" echo "::group::Umbraco $UMBRACO on $FRAMEWORK" + rm -rf tests/BaryoDev.Umbraco.ReadAloud.Tests/bin "$RESULTS" dotnet test tests/BaryoDev.Umbraco.ReadAloud.Tests \ --configuration Release \ -p:UmbracoVersion=$UMBRACO \ @@ -224,7 +227,7 @@ jobs: echo "::error::Expected $FRAMEWORK test output for Umbraco $UMBRACO" && exit 1 } scripts/assert-tests-ran.sh "$RESULTS/results.trx" 65 || { - echo "::error::The $FRAMEWORK test run did not meet the floor." && exit 1 + echo "::error::The Umbraco $UMBRACO test run did not meet the floor." && exit 1 } done diff --git a/CHANGELOG.md b/CHANGELOG.md index 44468d6..4550ca5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,25 @@ and [semantic versioning](https://semver.org). ## [Unreleased] +### Added + +- Failure backoff. After a synthesis fails, the same text skips the speech service for + `FailureBackoffSeconds` (30). A rejected Azure key backs off every request for + `AuthFailureBackoffSeconds` (300), and a 429 for its Retry-After (capped at 300 seconds) or + `FailureBackoffSeconds`. Both validated at startup, 0 turns them off. New public + `SynthesisRejectedException` and `SynthesisFailureKind` let an engine report these cases. +- Opt-in cache sweep. `CacheMaxAgeDays` (unset by default) deletes cached audio last written + longer ago than that, once a day, in batches. New optional `IAudioCacheSweep`, implemented by + `DiskAudioCache`. `IAudioCache` is unchanged (#5). `CacheMaxAgeDays` is capped at 36500. +- Saving or removing the Azure key in the backoffice clears every failure backoff, so the new key + is tried on the next request. + +### Changed + +- A cancelled synthesis that is not a shutdown (an engine's HTTP timeout) now counts as a failure + for backoff. A reader closing the tab still records nothing. +- The publish workflow also tests Umbraco 18.1.0, as ci.yml does. + ### Fixed - Text extraction no longer takes quadratic time on a page with many unclosed `