* feat: add specification and quality checklist for Shell Reload API endpoints * feat: implement Shell Reload API endpoints and associated documentation * feat: enhance Shell Reload API documentation and add tasks for implementation phases * feat: implement Shell Reload API features with endpoints, interface contracts, models, and component tests * feat: update Shell Reload API responses and tests to reflect changes in error handling and response structure * Fix shell reload follow-up review issues (#7354) * Initial plan * Address shell reload review feedback Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> * Dispose shell reload semaphore Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> * Harden shell reload follow-up fixes Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> * Update src/modules/Elsa.Workflows.Api/Endpoints/Shells/Reload/Endpoint.cs Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Potential fix for pull request finding 'Missed opportunity to use Where' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Update src/modules/Elsa.Workflows.Api/Endpoints/Shells/Reload/Endpoint.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2.2 KiB
2.2 KiB
Quickstart: Shell Reload API Endpoints
Goal
Implement and verify two administrative endpoints that refresh shell-backed configuration:
- reload all shells
- reload one requested shell while still using the current full-reload fallback
Implementation Steps
- Add the API module dependency required to consume
IShellManager,IShellSettingsProvider, andIShellSettingsCache. - Add a shell reload orchestration contract and implementation under
src/modules/Elsa.Workflows.Api/Contractsandsrc/modules/Elsa.Workflows.Api/Services. - Add endpoint folders under
src/modules/Elsa.Workflows.Api/Endpoints/Shells/ReloadAllandsrc/modules/Elsa.Workflows.Api/Endpoints/Shells/Reloadwith collocated request/response models. - Use the orchestration service to enforce:
- busy rejection
- unknown-shell validation
- targeted requested-shell strictness
- detailed per-shell results
- current full-reload fallback semantics for the targeted endpoint
- Add a new client resource under
src/clients/Elsa.Api.Client/Resources/Shellsso first-party consumers can call both endpoints. - Add component tests under
test/component/Elsa.Workflows.ComponentTests/Scenarios/RestApis/Endpoints/Shells.
Verification Scenarios
- Full reload returns
Completedwhen every affected shell refreshes successfully. - Full reload returns
Partialand shell-level detail when at least one shell remains unchanged because of invalid configuration. - Targeted reload returns
404when the requested shell is unknown. The404response does not include a JSON body. - Targeted reload returns
422with shell-level detail when the requested shell does not refresh successfully during the fallback full reload. - Either endpoint returns
409while another reload is already in progress. - Either endpoint returns
503when the configuration provider cannot supply usable shell settings.
Suggested Validation Commands
dotnet test test/component/Elsa.Workflows.ComponentTests/ --filter "FullyQualifiedName~Scenarios.RestApis.Endpoints.Shells" -p:CollectCoverage=false
If the component suite is too broad during iteration, run the project with a test filter targeting the new shell reload scenario names.