Commit Graph
2394 Commits
Author SHA1 Message Date
mvdbeek af2f401e35 Add admin docs for SSE-driven real-time updates
Cover how the SSE pipeline is wired (HistoryAuditMonitor +
galaxy-sse-monitor + control-task fan-out + per-worker connection
manager), how to configure it, what statsd metrics to watch, and
how to set up nginx so /api/events/stream is not buffered.

Wire the new page into the admin toctree and add cross-references
from the nginx and scaling guides where SSE has operational impact.
2026-04-28 19:15:24 +02:00
mvdbeek bbb4cdc5f1 Collapse SSE feature flags into single enable_sse_updates
Replace enable_sse_history_updates and enable_sse_entry_point_updates
with a single enable_sse_updates. The two flags shared the same SSE
connection plumbing (events/stream + dispatcher), and only the
HistoryAuditMonitor lifecycle has real per-process cost — entry-point
dispatch is event-driven and effectively free. One knob admins can flip.

Updates schema, sample config, server (app, configuration manager,
history_audit_monitor, sse_monitor), client stores and their tests,
integration tests, and the regenerated admin docs.
2026-04-28 19:15:24 +02:00
mvdbeek 6e5eada944 Add SSE entry-point channel, dispatch observability, declare-queue cache
Three related additions to the SSE notification pipeline, bundled here
because they share ``SSEEventDispatcher._send`` as their modification
point:

1. Interactive-tool entry-point SSE channel
   - ``entry_point_update`` dispatcher method + queue-worker handler.
   - ``InteractiveToolManager.configure_entry_points`` dispatches a
     wake-up event after the DB commit; the client refetches
     ``/api/entry_points`` on receipt (no payload).
   - Frontend: new SSE event type, store subscription with XOR polling
     fallback via ``enable_sse_entry_point_updates`` config flag.
   - Integration + selenium tests.

2. Queue and SSE observability metrics
   - Counters, timers, and periodic gauges for SSE dispatch, control-queue
     task execution, control-queue depth (via kombu passive declare),
     active SSE connections, dropped events, and active WorkerProcess
     rows. Flow through the existing ``galaxy_statsd_client`` — no new
     infra. Gauges are scheduled via Celery beat at ``queue_metrics_interval``
     seconds (default 15). All instrumentation no-ops when statsd isn't
     configured.
   - Sub-emitter failures log once at WARNING and bump a
     ``galaxy.queue_metrics.error`` counter tagged by emitter so broken
     emitters are visible in metrics without log spam.

3. Active-worker control-queue cache
   - 30 s TTL cache on ``all_control_queues_for_declare`` with RLock
     stampede protection. At 1000+ events/s this eliminates ~30 DB
     round-trips/s per webapp for data that only changes on 60 s
     heartbeat cadence. Empty results are not cached — would otherwise
     silently drop every SSE event during the startup window.
2026-04-28 17:18:07 +02:00
mvdbeek 06cdb3a444 Replace notification polling with Server-Sent Events (SSE)
Add real-time notification delivery via SSE to replace the 30-second
polling interval. The SSE endpoint streams notification_update,
broadcast_update, and notification_status events to connected clients.

Backend:
- New SSEConnectionManager (lib/galaxy/managers/sse.py) maps user IDs
  to asyncio queues with thread-safe push via call_soon_threadsafe
- SSE streaming endpoint at GET /api/notifications/stream with
  Last-Event-ID catch-up support and 30s keepalive
- Kombu control tasks (notify_users, notify_broadcast) fan out events
  across all Galaxy worker processes
- Existing polling API unchanged for backward compatibility

Frontend:
- New useNotificationSSE composable using EventSource with auto-reconnect
- notificationsStore tries SSE first, falls back to polling after 5+
  consecutive errors

Tests:
- API integration tests for SSE event delivery, broadcasts, and reconnect
- Selenium E2E tests for notification appearance and bell indicator

Add SSE-based real-time history update notifications

Replace aggressive 3-second history polling with Server-Sent Events
driven by database change detection, configurable via admin setting.

Backend:
- Add pg_notify() to PostgreSQL audit triggers for instant LISTEN/NOTIFY
- New HistoryAuditMonitor: PG LISTEN/NOTIFY with SQLite polling fallback
- New /api/events/stream SSE endpoint (uses StructuredApp, not MinimalManagerApp)
- Kombu control task "history_update" with message TTL (expiration=10s)
- Config: enable_sse_history_updates, history_audit_monitor_poll_interval

Frontend:
- Generalize useNotificationSSE → useSSE composable with event type filtering
- historyStore connects SSE for history_update events, triggers immediate refresh
- notificationsStore updated to use /api/events/stream and useSSE
- Polling kept as fallback at existing intervals

Tests:
- 5 integration tests: endpoint, dataset upload event, history ID in payload,
  cross-user isolation, polling backward compatibility
2026-04-28 15:54:28 +02:00
David López 28d4acf834 Merge pull request #22477 from PlushZ/migrate-webdav-to-fsspec
Migrate WebDAV file source to fsspec/webdav4
2026-04-27 12:36:43 +02:00
Nate Coraor d6329175b6 Add enable_statsd_middleware option so that backend execution timing can be sent to statsd without enabling web request timing. 2026-04-24 13:25:01 -04:00
PlushZ ada2d2b437 avoid duplicate webdav url migration logic 2026-04-23 12:50:06 +10:00
Marius van den Beek d67adb69af Merge pull request #22507 from jmchilton/yaml_schema_harden
Narrow YAML schema
2026-04-21 15:44:58 +02:00
Arash dbe7d362f1 doc: add missing value examples and Flux XML filter example 2026-04-17 12:16:53 +02:00
Arash 543975205e doc: add huggingface shared data table schema to admin/data_tables
Documents the 7-column `huggingface` data table schema, column
conventions, controlled vocabularies for pipeline_tag/domain, XML
filter patterns, and an example .loc entry.

Announced in galaxyproject/galaxy-hub#3923.
2026-04-17 12:11:25 +02:00
John ChiltonandClaude Opus 4.6 ec5cfe6cce narrow YAML tool parameter schema for UserToolSource
Introduce lib/galaxy/tool_util_models/yaml_parameters.py with a narrow
YamlGalaxyToolParameter union (extra=forbid) used for UserToolSource.inputs
and ToolSourceBase.inputs. v1 supports boolean, integer, float, text, select,
color, data, data_collection, conditional, repeat, section. XML-only fields
(truevalue, falsevalue, argument, is_dynamic, hidden, parameter_type) and
unsupported types (hidden, drill_down, data_column, genomebuild, group_tag,
baseurl, rules, directory) now reject at parse time.

to_internal() maps each YAML model onto the existing internal parameter
metamodel so no downstream pipeline needs to change shape. Production path
keeps re-parsing via YamlToolSource (plan option a).

UserToolSource envelope also gets extra=forbid - stray top-level keys like
argument: at the tool level fail fast. Regenerated ToolSourceSchema.json is
32KB (was 77KB); Monaco no longer autocompletes the leaked fields.

runtimeify() gains yaml_origin flag; evaluation.py passes it based on
tool_source.parse_class(). assert_yaml_v1_parameters() hard-fails on any
out-of-v1 type inside a YAML-origin bundle, recursing through whens/repeat/
section. XML path untouched.

doc/source/admin/user_defined_tools.md documents the supported set and
rejected types. 34 new tests in test_yaml_parameters.py cover red cases,
green round-trips, structural groups, the runtimeify guard, and a snapshot
blacklist on the published schema. test_parsing.py still green (83 tests).

No compat shim for existing beta DB rows that contain XML-only fields -
those will now fail validation on load and need to be recreated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 15:36:56 -04:00
Michael R. Crusoe dbfcdb8bc9 python packages: convert to pure namespace packages
only directories in `lib/galaxy` & `packages/*/galaxy`
All other files removed or moved to their own module
All references to those files updated, especially galaxy/version.py
2026-04-15 15:16:34 +02:00
mvdbeek b3f54e5553 Delete dead legacy tag controller
The `tag_autocomplete_data`, `add_tag_async`, and `remove_tag_async`
endpoints served a long-removed jQuery/YUI autocomplete widget and have
zero non-self references in the codebase. Modern tagging uses
`PUT /api/tags` (`FastAPITags.update`).
2026-04-11 12:24:01 +02:00
Nicola Soranzo 349a5daec1 Merge branch 'release_26.0' into dev 2026-04-10 18:08:40 +01:00
Ahmed Awan a69a4b6c94 [26.0] Release notes PRs update 2026-04-09 12:37:15 -05:00
guerler cd84b66ce4 Add 26.0 to docs index 2026-04-09 19:49:09 +03:00
David López 93db931a83 Merge pull request #22367 from PlushZ/add-onedrive-filesource
Add OneDrive file source
2026-04-09 14:25:23 +02:00
PlushZ c30d30f386 fixes after review 2026-04-09 17:20:51 +10:00
mvdbeek 2bd9be5bdd Merge branch 'release_26.0' into dev 2026-04-08 08:44:51 +02:00
Ahmed Awan d79ee8161f release notes update 04/07 2026-04-07 12:59:39 -05:00
Ahmed Awan 9edc985de4 release notes update 04/06 2026-04-07 12:24:50 -05:00
Ahmed Awan 6e116dcad3 update month to April 2026-04-07 12:24:50 -05:00
Ahmed Awan 0a388fd542 release notes update 03/31 2026-04-07 12:24:50 -05:00
Ahmed Awan 03a9888bc5 add admin note about the MIT license change 2026-04-07 12:24:50 -05:00
Ahmed Awan ee7c458cfc release notes update 03/23 2026-04-07 12:24:50 -05:00
Ahmed Awan e5a40755bd release notes update 03/12 2026-04-07 12:24:50 -05:00
guerler b7885edb7c Fix release references 2026-04-07 12:24:50 -05:00
Aysam GuerlerandDavid López 8eb94b12b5 Update doc/source/releases/26.0_announce_user.rst
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
2026-04-07 12:24:50 -05:00
Ahmed Awan 11ec595634 move PR numbers to same line for consistency with past notes 2026-04-07 12:24:50 -05:00
Ahmed Awan bff57544ea add developer notes for latest client changes 2026-04-07 12:24:50 -05:00
Ahmed Awan 1bfabbad5a add 26.0 configuration changes 2026-04-07 12:24:50 -05:00
Ahmed Awan af1fbda486 add latest PRs 02/19 2026-04-07 12:24:50 -05:00
Ahmed Awan 6c33d6fd94 try to style the "AI Comes to Galaxy" header a little better 2026-04-07 12:24:50 -05:00
Ahmed Awan 82c403584b conform to RST guidelines
Following https://bashtage.github.io/sphinx-material/rst-cheatsheet/rst-cheatsheet.html
2026-04-07 12:24:49 -05:00
Ahmed Awan bc9818b4f0 fix PR link 2026-04-07 12:24:49 -05:00
Ahmed Awan b4b7bf60ef add videos and image for 26.0 highlights 2026-04-07 12:24:49 -05:00
guerler 29af4202b0 Add video placeholders 2026-04-07 12:24:49 -05:00
guerler b50bb4f00f Add highlights 2026-04-07 12:24:49 -05:00
guerler 1ade6a1051 Sort names alphabetically, remove unused sections 2026-04-07 12:24:49 -05:00
guerler 0c8f6babe1 Release notes 2026-04-07 12:24:49 -05:00
mvdbeek a4f71294cd Rebuild sample config 2026-04-07 14:55:53 +02:00
mvdbeek 8ea70f4119 Document per-user rate limiting and concurrency limiting in production guide
Add comprehensive admin documentation covering both celery task
throttling mechanisms:

- Per-user rate limiting: configuration, two-phase slot reservation
  design (reserve once, retry until timeslot), DB backend differences
  (Postgres atomic upsert vs standard SELECT FOR UPDATE), and
  limitations (clock precision, no priority ordering, slot consumption
  on failure).
- Per-user concurrency limiting: configuration, admission control flow,
  after_return cleanup, periodic stale-row recovery via worker
  inspection, and limitations (retry polling interval, crash recovery
  window, DB overhead at scale).
- Combined usage: explains that rate limiting runs first (timeslot
  scheduling) then concurrency limiting (execution gating).
- Administrative operations: SQL recipes for clearing leaked slots and
  celery CLI commands for purging/revoking tasks.
2026-04-07 14:47:36 +02:00
PlushZ def4897043 remove mocking and add integration test instead, extend docs 2026-04-07 19:53:18 +10:00
PlushZ abfbf02517 add full-access drive mode, template and tests 2026-04-05 16:06:42 +10:00
PlushZ 5341612687 Add OneDrive file source 2026-04-05 12:04:50 +10:00
Dannon Baker 5392d04dc1 Config rebuild 2026-04-01 14:51:45 -04:00
mvdbeek a119eb650a Rebuild config 2026-03-30 12:27:05 +02:00
mvdbeek 74b6e24bea Add Hashicorp Vault token renewal support
Add a celery beat for renewal of Hashicorp Vault tokens.
This eliminates the need for manual token rotation when
using short-lived renewable tokens.

The approach:
- HashicorpVault checks token renewable status on startup (warning
  if not renewable)
- New `renew_vault_token` Celery Beat task calls renew-self
- Configured via `vault_token_renewal_interval` in galaxy.yml
  (default 0 = disabled)
- Requires Celery Beat to be running

Fixes https://github.com/galaxyproject/galaxy/issues/22187
2026-03-30 12:27:04 +02:00
mvdbeek 8b339780d8 Merge branch 'release_26.0' into dev 2026-03-28 11:20:58 +01:00
Marius van den Beek 112e83a5ad Merge pull request #22233 from dannon/feature/sentry-upgrade
Upgrade Sentry JS SDK to v10, add opt-in session replay
2026-03-28 11:10:49 +01:00