Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- A "Blocked" tile on the Overview, so jobs held by a concurrency limit are part
of the backlog you can see at a glance.

### Fixed

- HTTP Basic credentials set in Rails credentials are now read correctly. Rails
Expand Down

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions app/assets/flightdeck/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"flightdeck.css": {
"file": "flightdeck-6f786a79a591.css",
"digest": "6f786a79a591",
"sha256": "6f786a79a591dcffffb20cff6b28c883f2b27931045037e7a181c47f9bbd386e",
"file": "flightdeck-ad6cd9e6c4b8.css",
"digest": "ad6cd9e6c4b8",
"sha256": "ad6cd9e6c4b8c1df7488915a2051938a78e267b03c1e79973d9e64958d321ec7",
"content_type": "text/css; charset=utf-8",
"size": 31519
"size": 31546
},
"flightdeck.js": {
"file": "flightdeck-8c7c4d4896b4.js",
Expand Down
14 changes: 13 additions & 1 deletion app/models/flightdeck/overview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def initialize(now: Time.current)
end

def tiles
[ processed_tile, failed_tile, ready_tile, scheduled_tile, in_progress_tile, oldest_ready_tile ]
[ processed_tile, failed_tile, ready_tile, blocked_tile, scheduled_tile, in_progress_tile,
oldest_ready_tile ]
end

def series(window: Metrics::Series::DEFAULT_WINDOW)
Expand Down Expand Up @@ -75,6 +76,7 @@ def failed_24h
end

def ready_now = @ready_now ||= counted("ready") { SolidQueue::ReadyExecution.all }
def blocked = @blocked ||= counted("blocked") { SolidQueue::BlockedExecution.all }
def scheduled = @scheduled ||= counted("scheduled") { SolidQueue::ScheduledExecution.all }
def in_progress = @in_progress ||= counted("in_progress") { SolidQueue::ClaimedExecution.all }

Expand Down Expand Up @@ -168,6 +170,16 @@ def ready_tile
Tile.new(label: "Ready now", value: number(ready_now), detail: "waiting to be claimed", trend: :flat, good: true)
end

def blocked_tile
Tile.new(
label: "Blocked",
value: number(blocked),
detail: blocked.zero? ? "nothing blocked" : "held by concurrency limits",
trend: :flat,
good: true
)
end

def scheduled_tile
detail =
if next_scheduled_at.nil? then "nothing scheduled"
Expand Down
6 changes: 4 additions & 2 deletions assets-src/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ table.fd-data td.fd-indent { padding-left: 28px; }
Overview: tiles
-------------------------------------------------------------------------- */

.fd-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.fd-tiles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 14px; }
.fd-tile { padding: 12px 14px; position: relative; min-width: 0; }
.fd-tile .lbl {
font: 500 10px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
Expand Down Expand Up @@ -1008,8 +1008,10 @@ table.fd-data td.fd-indent { padding-left: 28px; }
border-radius: 7px; background: var(--panel-2); font: 400 11px/1.5 var(--font-mono); color: var(--ink-2);
}

@media (max-width: 1320px) {
.fd-tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1080px) {
.fd-tiles { grid-template-columns: repeat(3, 1fr); }
.fd-grid-2, .fd-grid-2b { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
Expand Down
Binary file modified docs/screenshots/job-detail-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/jobs-failed-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/overview-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/overview-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/processes-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/queues-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions test/integration/nested_mount_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def assert_no_bare_mount_urls(body, context)
get_fd MOUNT

assert_response :success
assert_select ".fd-tile", count: 6
assert_select ".fd-tile", count: 7
assert_no_bare_mount_urls response.body, "the overview"
end

Expand Down Expand Up @@ -180,7 +180,7 @@ def assert_no_bare_mount_urls(body, context)
get_fd RENAMED_MOUNT

assert_response :success
assert_select ".fd-tile", count: 6
assert_select ".fd-tile", count: 7
assert_includes response.body, %(<meta name="turbo-root" content="#{RENAMED_MOUNT}/">)
end

Expand Down
4 changes: 3 additions & 1 deletion test/integration/overview_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Flightdeck::OverviewTest < FlightdeckIntegrationTest
get_fd "/flightdeck"

assert_response :success
assert_select ".fd-tile", count: 6
assert_select ".fd-tile", count: 7
assert_select "svg.fd-chart", count: 2
assert_select "#fd-overview-queues .fd-empty"
assert_select "#fd-overview-failures .fd-empty"
Expand All @@ -37,6 +37,7 @@ class Flightdeck::OverviewTest < FlightdeckIntegrationTest
3.times { create_failed_job }
4.times { create_ready_job(created_at: 90.seconds.ago) }
2.times { create_scheduled_job(scheduled_at: 10.minutes.from_now) }
5.times { create_blocked_job }
worker = create_worker(threads: 10)
create_claimed_job(process: worker)

Expand All @@ -46,6 +47,7 @@ class Flightdeck::OverviewTest < FlightdeckIntegrationTest
assert_select ".fd-tile", text: /Processed · 24h\s*12/
assert_select ".fd-tile", text: /Failed · 24h\s*3/
assert_select ".fd-tile", text: /Ready now\s*4/
assert_select ".fd-tile", text: /Blocked\s*5/
assert_select ".fd-tile", text: /Scheduled\s*2/
assert_select ".fd-tile", text: %r{In progress\s*1\s*/ 10 slots}
assert_includes response.body, "10% utilization"
Expand Down
2 changes: 1 addition & 1 deletion test/system/dashboard_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def reset_font_preference
create_finished_job(queue_name: "critical", finished_at: 10.minutes.ago)

visit "/flightdeck"
assert_selector ".fd-tile", count: 6
assert_selector ".fd-tile", count: 7

within("#fd-overview-queues") { click_link "View all" }
assert_current_path "/flightdeck/queues"
Expand Down