Skip to content

feat: add optional platform and token_env fields to input samplesheet - #120

Merged
FloWuenne merged 3 commits into
devfrom
edmund/se-107-add-optional-platform-field-to-nf-aggregate-input
Apr 14, 2026
Merged

feat: add optional platform and token_env fields to input samplesheet#120
FloWuenne merged 3 commits into
devfrom
edmund/se-107-add-optional-platform-field-to-nf-aggregate-input

Conversation

@edmundmiller

Copy link
Copy Markdown
Contributor

Summary

Adds optional platform and token_env columns to the input samplesheet so runs from different Seqera Platform instances can be mixed in a single nf-aggregate benchmark.

Closes SE-107

Problem

nf-aggregate uses a single --seqera_api_endpoint and TOWER_ACCESS_TOKEN for all runs. This makes it impossible to benchmark runs that span multiple Platform instances (e.g. prod + staging) in a single report.

Changes

File What
assets/schema_input.json Add optional platform (API URL) and token_env (env var name) fields
lib/SeqeraApi.groovy fetchRunData uses per-run endpoint/token when provided, falls back to globals
workflows/nf_aggregate/main.nf Preserve platform/token_env in output JSON; document SEQERA_RUNS_DUMP limitation
subworkflows/local/utils_nf_aggregate/main.nf Comment confirming nf-schema auto-picks up new meta fields

Usage

id,workspace,group,platform,token_env
5Tm3PrXwO0gryh,scidev/testing,batch_plain,https://api.cloud.seqera.io,TOWER_PROD_TOKEN
3TOIc7mG6Qw2K9,unified-compute/sched-testing,sched_plain,https://api.cloud.dev-seqera.io,TOWER_DEV_TOKEN

Both columns are optional — omitting them preserves existing behavior (--seqera_api_endpoint + TOWER_ACCESS_TOKEN).

Limitations

  • Only the benchmark report path (SeqeraApi.fetchRunData) honours per-row overrides
  • SEQERA_RUNS_DUMP (used for MultiQC/Gantt) still uses the global endpoint/token

@edmundmiller
edmundmiller changed the base branch from main to dev April 14, 2026 16:00
@edmundmiller
edmundmiller requested a review from FloWuenne April 14, 2026 16:00
@edmundmiller edmundmiller self-assigned this Apr 14, 2026
… (SE-107)

Allow mixing runs from different Seqera Platform instances in a single
benchmark by adding two optional columns to the input CSV:

- platform:  Seqera Platform API URL override (falls back to --seqera_api_endpoint)
- token_env: env-var name holding the bearer token (falls back to TOWER_ACCESS_TOKEN)

Both fields are fully backward-compatible. The per-row overrides are
honoured in the benchmark report path (SeqeraApi.fetchRunData); the
tw CLI path (SEQERA_RUNS_DUMP) still uses global config.
@FloWuenne
FloWuenne force-pushed the edmund/se-107-add-optional-platform-field-to-nf-aggregate-input branch from b3cfa56 to 4ea8d52 Compare April 14, 2026 16:10
FloWuenne and others added 2 commits April 14, 2026 12:29
Existing fetch tests mocked httpx.get but the code migrated to urllib;
fix by patching urlopen instead. Add tests for alternate API endpoints,
HTTP error propagation (401/500/503/URLError), and end-to-end pipeline
with per-row platform/token_env metadata fields.

Co-Authored-By: Claude <noreply@anthropic.com>
The default accent was updated to #065647 during the brand refresh
but the test assertion still expected the old #087F68.

Co-Authored-By: Claude <noreply@anthropic.com>
@FloWuenne
FloWuenne marked this pull request as ready for review April 14, 2026 17:57
@FloWuenne
FloWuenne merged commit 1dfdbd4 into dev Apr 14, 2026
13 checks passed
@FloWuenne
FloWuenne deleted the edmund/se-107-add-optional-platform-field-to-nf-aggregate-input branch April 14, 2026 17:57
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.

2 participants