* Initial work on Sidekiq::Config
* Initial work on Sidekiq::Config
* reduce dependencies in deploy marks
* bare sidekiq and webapp
* Modify runtime to work with Capsules
* Cleanup
* Rename test files to remove test_ prefix
* Update test suite and standard rules to be more compliant
* Move constant definition outside code, per standard formatting
* Loads of changes for introduction of Capsules
* Remove Redis adapter abstraction
* update capsule overview
* Ensure Sidekiq.redis uses the correct pool for jobs running within a Capsule
* Use default_capsule for safety
* Slow down the beat to halve its Redis overhead
* move config fixtures into cfg/
* Add capsule middleware test
* use accessor
* Refactor job query
* First attempt at a histogram chart
* Explore a box plot chart
* Show 3 chart variations
* Outline boxes instead of solid boxes
* Remove box plot chart
* Use linear y-axis
This matches the axis for the metrics overview page, and it clarifies the data.
* Data tables for job metrics
* Add histogram totals chart
* Move things around
* Tooltip for histogram chart
* Fix deploy tooltip
* Extract marks query
* Extract chart base class
* Renaming
* Ensure a min radius for histogram bubbles
High job counts can result in a very small multiplier, which was making some of the bubbles too small to be visible.
* Round everything to two decimals for consistency
* styling for metrics headers
* Show emdash when timing info is n/a
* No job results found message
* No need for metrics header
* Add multi-line chart for total execution time by job
* Fiddling with the UX
* Refactor metrics `top_jobs` query
* debugging
* revert debugging
* revert debugging
* Add failed and avg time, just one data table
* Add color swatch in data table
* Measure in seconds
* Fix duplicate color
* standard style
* Rename for clarity
* Bring back empty metrics test
* Execution time is not consistent, assert processed counts instead
* Only include top 5 in chart, change swatch element to checkbox
* Wire up the checkboxes to show/hide each job class on the chart
* The checkboxes should not appear disabled
* Ensure seconds for y-axis to match table and UX improvements
- All data shown on metrics page is now in seconds
- Tooltip now includes "UTC" with the time
- Tooltip rounds the number of seconds and includes "seconds"
* Show deploy marks in metrics chart
* Fix annotation position when updating datasets
* Remove deploy labels on chart
We shouldn't assume the first word of the label is the git SHA, and the label annotations were hacky anyway.
* tweaks
Co-authored-by: Mike Perham <mperham@gmail.com>
* New execution stats data format, #5283
We store time and counts per-queue, per-class and totals, daily.
* break metrics into separate jobs and queues hashes
* tweak
* Move metrics tracking to middleware, start work on Query API
* Add support for labeled points in time
* Add fetch method for deploy marks
* rejigger metrics file layout
* fix tests
* Remove per-queue metrics, adds a lot of complexity with little value IMO
* store per-minute histograms
* Keep basic stats hardwired as is
The idea being that metrics are optional middleware as they have significantly more overhead in CPU time and Redis space.
* Implement top N metrics dashboard
* Add topN and job-specific metric pages
* Supply histogram data to job metrics page
* cant use local time as CI is in a different tz
* Add basic metrics graph, refactor dashboard JS to make Rickshaw reuseable
* prepare for public beta
* Sort processes in UI using natural sort order
* Rename variable for consistency
* Fix natural sort algorithm and add more test examples
* Don't sort processes unless all process have a hostname
* Object#present? is a Rails method, not a Ruby method
* Flush Redis database before each helper test
* Prepare for upcoming Sidekiq::Config redesign
Adjust the server internals to use a config object rather than refering directly to the Sidekiq module.
* Persist live poll status in browser localStorage
* Prefix localStorage variables with 'sidekiq'
* Minor fix for default handling in localStorage timeInterval parsing
* Simplify Web UI sessions
Remove all of the hacks and support infrastructure around Rack sessions. Rails provides this by default so we don't need it for 95% of users. The other 5% need to provide a Rack session.
This is a big change and has the potential to break installs so it deserves at least a minor version bump.
See also #4671, #4728 and many others.
1. Remove unused methods
2. Remove unused and unnecessary features
3. Add basic tests
The session token is stored server-side and never given to the client.
A masked token is generated for each request which can be inserted into forms to be POSTed.
* [COVID-19] Vendor rack-protection/authenticity_token middleware
* Include MIT license as required
* blasted rubocop
Co-authored-by: Mike Perham <mperham@gmail.com>
* Introduce the ability to pause queue from the UI
Considering sidekiq web UI allow to perform complex tasks with ease.
Having the ability to pause a queue during an emergency (or operational intense)
scenarios would come in quite handy.
This PR introduces a new button to under the "Actions" column on `sidekiq/queues` pages,
right next to the `Delete` button. Depending on the state of the queue, it will according
show the `Pause` or `Unpause` text, with appropriate form element that `POST`s to the same
endpoint. The endpoint logic is updated to handle the new cases. Added some relevant unit tests.
Adding mock `Sidekiq::Queue#pause!` and `Sidekiq::Queue#unpause!` functions to
the API, which I believe will be overridden by sidekiq pro.
* Remove confirmation text and switch ordering of new copy in en.yml
* Only allow pause/unpause operations from sidekiq pro
This means the button from UI is hidden and api route has validation
in place such that it will only perform the respective pause/unpause
operation on proper payload, in sidekiq pro.
Its using `Sidekiq::Pro` constant as a check to detect whether or
not pro is present.
* Initialize Queue only once in api router action