feat: dashboard perf and config - #8
Merged
Merged
Conversation
- Added JobRetentionOptions to configure cleanup of terminal jobs. - Introduced IJobRetentionStore interface for managing job retention. - Implemented ShedduellerJobRetentionService and DashboardJobRetentionService for background cleanup tasks. - Created CancelQueuedJobsRequest and related operations for canceling queued jobs in the store. - Developed PostgresJobRetentionOperation and CancelQueuedJobsOperation for PostgreSQL backend. - Enhanced tests for job retention and cancellation, including contract tests for job retention store. - Updated RegistrationTests to ensure proper registration of retention services.
…nd pagination support
…s for claimed jobs
- Introduced new tables: `metrics_buckets`, `metrics_histogram_bins`, and `metrics_rollup_state` to track job metrics. - Implemented logic for recording job events and updating metrics in the database. - Added cleanup functionality to remove old metrics data based on retention policy. - Created a caching mechanism for dashboard metrics to improve performance. - Added tests to ensure metrics rollup and caching work as expected.
- Implemented a new Settings.razor component for managing cleanup settings in the Sheddueller dashboard. - Introduced ShedduellerCleanupConfiguration, JobRetentionCleanupConfiguration, JobEventCleanupConfiguration, and MetricsCleanupConfiguration records to encapsulate cleanup settings. - Created IShedduellerCleanupConfigurationStore interface for storing and retrieving cleanup configurations. - Developed PostgresCleanupConfigurationOperation for handling cleanup configuration operations in PostgreSQL. - Added unit tests for cleanup configuration operations and job retention service to ensure correct functionality. - Updated PostgresMigrationTests to verify the creation of the settings table in the database. - Enhanced PostgresRegistrationTests to include checks for the new cleanup configuration store.
- Added support for setting and clearing concurrency group default limits. - Introduced new operations: SetConcurrencyDefaultLimitOperation and ClearConcurrencyLimitOverrideOperation. - Updated the database schema to include effective_limit and default_limit columns in the concurrency_groups table. - Modified existing operations and queries to utilize effective_limit instead of configured_limit. - Enhanced the IConcurrencyGroupManager interface with methods for managing default limits. - Updated related tests to cover new functionality and ensure correct behavior of concurrency limits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds database-backed operational configuration and dashboard controls for cleanup settings, concurrency group limits, queued-job
cancellation, and metrics inspection.
Changes
IJobManager.CancelQueuedJobsAsync.effective_limit = coalesce(configured_limit, default_limit, 1)13.Notes
This includes a Postgres migration adding settings, metrics rollup storage, and concurrency-group default/effective limit columns. Startup
code should use
SetDefaultLimitAsync(...)for concurrency limits so dashboard overrides survive redeploys.Verification
dotnet build Sheddueller.slnx --configuration Releasedotnet test --solution Sheddueller.slnx --configuration Releasedotnet format Sheddueller.slnx --verify-no-changes --verbosity minimal