Skip to content

feat: DH-24452: Improve slack notify w/ markdown - #447

Merged
stanbrub merged 7 commits into
deephaven:mainfrom
stanbrub:improve-slack-notify
Nov 23, 2026
Merged

stanbrub merged 7 commits into
deephaven:mainfrom
stanbrub:improve-slack-notify

Conversation

@stanbrub

@stanbrub stanbrub commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Slack notification (PublishNotification, publish.py)

  • Posts each table as a native Slack table block instead of a code block. Text wrapping is turned off explicitly, because the Android app wrapped rows when it was left at the default. Benchmark names use code style.
  • Each table is 20 rows (was 10). The table title is in the first header (Benchmark (Worst Scores by Scr)), replacing the separate headings.
  • Columns are Benchmark | Δ5d | Rate | Δ42 | Scr | σ5d | pval. ScrProb is now pval, since it is a two-sided p-value. The query keeps ASCII names (Dif5d, DifRls, Var5d) and Java adds the symbols, because non-ASCII characters in the script were garbled on the way into the Deephaven server's Python.
  • The release column header shows the major version actually compared against (e.g. Δ42), from a new one-row nightly_release table. It falls back to ΔRls when the window has no older version.
  • The payload is built with proper JSON escaping, sent as UTF-8, and Slack's full response is logged so "ok":false errors are visible.

Data window and loading (publish.py, benchmark_tables.dh.py, remote-benchmarks.yml)

  • The nightly window is 200 sets (was 45), so the previous major version's runs are included.
  • Listing and downloads run 16 at a time. Downloads retry up to 3 times, time out after 60s, reject responses shorter than Content-Length, and are written to a .part file and renamed, so a failed download never reaches the cache.
  • A .gz that fails to download is now an error instead of falling back to reading the remote .gz as plain CSV, which caused a confusing "Can't escape a non-ASCII character" failure. A file missing in both forms is reported clearly.
  • Cached .gz files are read directly instead of after a failed .gz.gz read.
  • New benchmark_load_metrics_arg (default True). Publish sets it to False, since it never uses metrics, which removes a third of the files.
  • remote-benchmarks.yml restores and saves data/deephaven-benchmark with actions/cache around the publish step. Benchmark CSVs never change once uploaded, so each night only downloads new runs.

Test Completed

  • Local publish to a personal Slack channel, 200 sets: 17m04s cold / 3m04s warm before; 1m44s cold / 1m39s warm with the new benchmark_tables.dh.py.
  • Checked the posted tables on desktop and on an Android phone (rows stay on one line).
  • PublishNotificationTest covers the table block JSON, escaping and header names.
  • Download code run against the bucket (1 vs 16 threads: 43.5s vs 2.5s for 240 files) and against a local server returning truncated responses (retried, nothing cached).
  • The workflow cache can only be verified in CI.

@stanbrub stanbrub self-assigned this Nov 19, 2026
Copilot AI balanced review requested due to automatic review settings November 19, 2026 19:20
@stanbrub stanbrub changed the title feat: DH-24452: Improve slack notify feat: DH-24452: Improve slack notify w/ markdown Nov 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Slack payload’s heading-only fallback text hides both benchmark tables and the report link from screen-reader users and needs to include that content, with the test expectation updated accordingly.

1 open issue
What changed in this PR

This PR changes nightly benchmark notifications from tabbed text to Markdown tables and expands the best/worst summaries to 20 rows each.

Changes:

  • Generate Markdown tables and send them in Slack message blocks.
  • Add JSON escaping and log Slack response bodies.
  • Update tests for Markdown output and payload formatting.
File Description
src/​test/​java/​io/​deephaven/​benchmark/​run/​PublishNotificationTest.java Tests Markdown tables, escaping, and Slack payload formatting.
src/​main/​resources/​io/​deephaven/​benchmark/​run/​profile/​queries/​publish.py Increases both nightly summary tables from 10 to 20 rows.
src/​main/​java/​io/​deephaven/​benchmark/​run/​PublishNotification.java Generates Markdown, builds Slack blocks, and improves request handling.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The title-only Slack fallback text hides both benchmark tables and the dashboard link from screen-reader users, creating an accessibility regression.

1 open issue

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the Slack notification formatting update.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@stanbrub
stanbrub requested a review from cpwright November 19, 2026 20:01
Copilot AI balanced review requested due to automatic review settings November 20, 2026 23:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Downloads are cached without verifying the advertised Content-Length, allowing truncated files to bypass retries and be reused by subsequent publishes.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 20, 2026 23:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the benchmark notification and data-loading changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@stanbrub
stanbrub requested a balanced review from Copilot November 23, 2026 21:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .github/workflows/remote-benchmarks.yml Resolved
Comment thread .github/workflows/remote-benchmarks.yml Resolved
Copilot AI balanced review requested due to automatic review settings November 23, 2026 22:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 22:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new name-length limit rejects an existing 57-character benchmark name, causing Bench.setName() to throw before its query executes.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 23, 2026 23:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the Slack notification and benchmark-loading improvements.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@stanbrub
stanbrub merged commit 96d3f70 into deephaven:main Nov 23, 2026
2 checks passed
@stanbrub
stanbrub deleted the improve-slack-notify branch November 23, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants