Commit Graph
1188 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
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 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
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
Nicola Soranzo 0c6fe6e9a9 Add `+psycopg` to PostgreSQL connect string in remaining places 2026-03-25 20:18:38 +00:00
Martin Cech 14962b077c Set proxy_ssl_server_name for GTN proxy on CloudFlare due to SNI
source: https://github.com/galaxyproject/infrastructure-playbook/commit/262b572f21aa0ab06edd4af9961afc90618a19bb
2026-03-24 17:24:14 +01:00
Dannon Baker 71de8f565f Add sentry_client_traces_sample_rate for client-side performance tracing
Separate from the server-side sentry_traces_sample_rate so admins can
independently control browser performance trace sampling. Defaults to 0
(no client performance traces).
2026-03-23 12:35:51 -04:00
Dannon de419dd52e Merge pull request #21997 from jmchilton/agent_docs
Add admin docs for AI agent configuration
2026-03-13 18:39:07 -04:00
John ChiltonandClaude Opus 4.6 b5dbfe5364 Remove unused enable_beta_workflow_modules config option
Dead option - nothing reads it, pause module always available regardless of setting. Add deprecation handler so existing configs don't error on upgrade.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:29:35 -04:00
Dannon Baker e523b61190 Revise agent docs to lead with inference_services
The deprecated ai_api_key/ai_model/ai_api_base_url keys were front and
center in the original doc. This flips the emphasis to inference_services
as the recommended config path, demoting the deprecated keys to a note.
Also removes dataset_analyzer (no implementation exists) and the agents
enabled/disabled config section (not wired up yet).
2026-03-06 11:32:29 -05:00
John ChiltonandClaude Opus 4.6 aa6d1f7b2d Add admin docs for AI agent configuration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 09:30:33 -05:00
Nicola Soranzo d7633277fc Use `os.path.join() or pathlib.Path` instead of f-strings for filesystem paths
More portable and idiomatic.

Also:
- Replace `os.path.abspath(f"{dir}/../..")` with `os.path.dirname()`
  calls.
- Add test for `get_alternative_versions()` with `recipes_path`
  argument specified.
2026-02-27 19:48:46 +00:00
davelopez 8f541383d9 Updates config rebuild changes 2026-02-26 14:28:01 +00:00
Ahmed Awan 7004522c38 Merge remote-tracking branch 'upstream/release_26.0' into merge_26.0_into_dev_feb 2026-02-24 15:07:26 -06:00
Nicola Soranzo 720fae9afd Merge branch 'release_25.1' into release_26.0 2026-02-24 13:12:42 +00:00
Nicola Soranzo 60f6185138 Merge branch 'release_25.0' into release_25.1 2026-02-24 13:11:18 +00:00
Marius van den Beek e868036496 Merge pull request #21733 from mvdbeek/expiry_time_docs
Add documentation for Celery result expiration and short-term storage
2026-02-13 20:12:24 +01:00
mvdbeek d19083dff4 Add documentation for Celery result expiration and short-term storage
Document configuration options needed for handling large history exports:
- Celery result_expires setting to prevent task results from expiring
- Short-term storage duration settings for export file retention
- Combined configuration example for large history export scenarios

Fixes: https://github.com/galaxyproject/galaxy/issues/21701
2026-02-13 12:16:49 +01:00
davelopez 71df52c74c Clarifies rules for template variable requirements in docs 2026-02-11 10:04:11 +01:00
davelopez 0a1df430ed Fix docs format
Removes extra spaces after comment symbols in config docs
2026-02-11 10:04:10 +01:00
Marius van den Beek ad39d779cf Merge pull request #21335 from jmchilton/wes_implementation
Implement GA4GH WES API
2026-01-27 14:43:29 +01:00
Marius van den Beek d6e7db8437 Merge pull request #20924 from davelopez/explore_url_fetch_with_headers
Add Support for HTTP Headers in URL Fetch Requests with Secure Storage for Landing Requests
2026-01-27 14:21:38 +01:00
davelopez a12a082a74 Adds docs for enabling HTTP headers in fetch 2026-01-27 11:31:35 +01:00
Marius van den Beek 26e7bd959a Merge pull request #21594 from bernt-matthias/ext-file-source-templates
Unify extensions of file source templates
2026-01-21 13:11:35 +01:00
davelopez d93f093005 Rebuild config 2026-01-21 10:29:49 +01:00
Matthias Bernt 56391f903d also update doc references 2026-01-20 21:47:49 +01:00
John ChiltonandClaude 9271e56062 Implement GA4GH WES API with task logs & comprehensive test coverage
Implement full Workflow Execution Service (WES) API support for running Galaxy
workflows via the GA4GH standard. Includes complete core functionality with run
submission, status tracking, cancellation, input/output handling, and task logs.

Core WES Features:
- 6 WES API endpoints (service-info, runs CRUD, cancel, status)
- Support for both workflow_url and workflow_attachment input methods
- Support for gxworkflow:// URI scheme for direct database workflow references
- Automatic history creation with optional custom naming
- Full workflow support: gx_workflow_ga and gx_workflow_format2
- DRS URI generation for all workflow outputs
- State mapping between Galaxy invocation states and WES states
- Cursor-based pagination for run listings

Task Log Features:
- /api/jobs/{job_id}/stdout - Job stdout as plain text
- /api/jobs/{job_id}/stderr - Job stderr as plain text
- /ga4gh/wes/v1/runs/{run_id}/tasks - Paginated task list
- /ga4gh/wes/v1/runs/{run_id}/tasks/{task_id} - Task details
- Build TaskLogs from workflow invocation steps
- Populate RunLog with task_logs list and task_logs_url

Implementation Highlights:
- Auto-generated Pydantic models from GA4GH WES OpenAPI spec
- FastAPI CBV router following Galaxy API patterns
- Service layer with full workflow submission/execution pipeline
- Shared GA4GH utilities for DRS code reuse
- Reduced test duplication with helper functions

Files Added:
- lib/galaxy/schema/wes/__init__.py - Generated Pydantic models
- lib/galaxy/webapps/galaxy/api/wes.py - WES API router
- lib/galaxy/webapps/galaxy/services/wes.py - WesService
- lib/galaxy/webapps/galaxy/services/ga4gh.py - Shared GA4GH utilities
- WES_PLAN.md - Implementation plan

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-20 13:54:01 -05:00
Nicola Soranzo eb9fde1dcd Drop support for Python 3.9 2026-01-19 18:39:16 +00:00
Nicola Soranzo ace6cdbbc1 Rebuild config samples and docs
with `make config-rebuild`
2026-01-18 18:51:57 +00:00
Nicola Soranzo 1c211faff6 Merge branch 'release_25.1' into dev 2026-01-17 12:19:00 +00:00
Marius van den Beek 8be6cfce90 Merge pull request #21563 from bernt-matthias/citation_bibtex_quotes
[25.1] Use quotes for Galaxy citation bibtex
2026-01-15 09:44:09 +01:00
Matthias Bernt 49ddccee28 update docs 2026-01-14 10:04:36 +01:00