Skip to content

Commit b491d93

Browse files
committed
Merge branch 'master' into rename-preview-types-flag
2 parents d5ee442 + 5304510 commit b491d93

105 files changed

Lines changed: 2993 additions & 1092 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
26.03.3-edge
1+
26.03.4-edge
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# `hints` process directive for executor-specific scheduling hints
2+
3+
- Authors: Rob Syme
4+
- Status: accepted
5+
- Deciders: Paolo Di Tommaso, Ben Sherman, Rob Syme
6+
- Date: 2026-03-23
7+
- Tags: directive, executor, scheduling
8+
9+
## Summary
10+
11+
Introduce a `hints` process directive for executor-specific scheduling hints that don't map to existing directives.
12+
13+
## Problem Statement
14+
15+
Many executors can be configured in various ways on a per-task basis. For example:
16+
17+
- AWS Batch jobs can use *consumable resources* to limit concurrent job execution based on non-standard resources such as software license seats.
18+
19+
- Google Batch jobs can specify a *provisioning model* to control the use of spot vs on-demand VMs on a per-task basis.
20+
21+
- Seqera Scheduler supports a variety of resource and scheduling settings, including spot/on-demand provisioning.
22+
23+
These settings can be exposed by Nextflow as executor-specific config options, such as `google.batch.spot`, but config options are applied globally. In order to apply a setting to specific processes or tasks, it must be exposed as a process directive.
24+
25+
Process directives in Nextflow aim to provide a common vocabulary for executing tasks in many different environments. Directives such as `cpus`, `memory`, and `time` have broadly the same meaning across most executors, making it easier for users to write portable pipelines.
26+
27+
At the same time, many executors have custom settings not shared by other executors, and it is not practical to create a new process directive for every new setting. There are over 40 [process directives](https://docs.seqera.io/nextflow/reference/process#directives) at the time of writing, and every new directive adds cognitive load when a user is trying to find the right directive for a given situation.
28+
29+
There exist a few generic process directives already:
30+
31+
- The `clusterOptions` directive can be used to specify command-line arguments, primarily for HPC schedulers
32+
- The `ext` directive supports arbitrary key-values, but is designed primarily to customize the task script (e.g. tool arguments), not executor behavior
33+
- The `resourceLabels` directive also supports arbitrary key-values, but is intended for tagging and tracking resources, not controlling them
34+
35+
A new directive is needed to support executor-specific settings at a per-task level in a structured manner, without bloating the process directives for every new custom setting.
36+
37+
## Goals
38+
39+
- Provide a way to apply executor-specific settings to individual processes or tasks
40+
41+
- Avoid the proliferation of narrow, executor-specific directives (e.g. `consumableResources`, `schedulingPolicy`, etc.)
42+
43+
- Provide a single extension point that executors can consume selectively
44+
45+
- Allow settings to be specified as key-values, providing validation where possible
46+
47+
## Non-goals
48+
49+
- Replacing existing directives (`cpus`, `memory`, `accelerator`, `queue`) — those remain the right place for standard resources
50+
51+
## Decision
52+
53+
Introduce a `hints` process directive with namespaced keys. Executors consume the hints they understand and silently ignore the rest.
54+
55+
## Core Capabilities
56+
57+
### Syntax
58+
59+
The `hints` directive accepts a map of key-value pairs:
60+
61+
```groovy
62+
// process definition
63+
process runDragen {
64+
cpus 4
65+
memory '16 GB'
66+
hints consumableResources: ['my-dragen-license': 1, 'other-license': 2]
67+
68+
script:
69+
"""
70+
dragen --ref-dir /ref ...
71+
"""
72+
}
73+
```
74+
75+
```groovy
76+
// process config
77+
process {
78+
withName: 'runDragen' {
79+
hints = [
80+
consumableResources: ['my-dragen-license': 1, 'other-license': 2]
81+
]
82+
}
83+
}
84+
```
85+
86+
Keys are strings. Values may be any raw data type: strings, numbers, booleans, lists, or maps. Executors are responsible for defining which hints they recognize and what value type each hint expects.
87+
88+
In the above example, the `consumableResources` hint is given as a map of resource name to quantity. The AWS Batch executor supplies it to each job request using `ConsumableResourceProperties`.
89+
90+
### Namespacing
91+
92+
Keys can use dot-separated scopes to namespace settings as needed:
93+
94+
```groovy
95+
hints consumableResources: ['my-dragen-license': 1]
96+
hints 'scheduling.priority': 10
97+
hints 'scheduling.provisioningModel': 'spot'
98+
```
99+
100+
Keys can be routed to specific executors by prefixing with the executor name and a slash (`/`):
101+
102+
```groovy
103+
hints 'awsbatch/consumableResources': ['my-dragen-license': 1]
104+
hints 'seqera/scheduling.provisioningModel': 'spot'
105+
hints 'k8s/nodeSelector': 'gpu=true'
106+
```
107+
108+
The executor prefix gives pipeline developers the ability to target specific executors and have assurance that it won't accidentally apply to other executors (e.g. if another executor adds support for the same hint in the future).
109+
110+
### Validation
111+
112+
Nextflow should validate hints to the best of its ability, to catch errors such as typos:
113+
114+
- **Prefixed hints** can be validated against the set of hints declared by the corresponding executor. Unrecognized hints should be reported as errors.
115+
116+
- **Unprefixed hints** can be validated against the union of hints declared by all executors. Since unprefixed hints might be supported by executors that aren't currently loaded, unrecognized hints should be reported as warnings.
117+
118+
### Multiple hint resolution
119+
120+
The `hints` directive uses *replacement semantics* when specified multiple times, meaning that each `hints` setting completely replaces any previous settings:
121+
122+
```groovy
123+
process {
124+
// generic hint
125+
hints = [provisioningModel: 'spot']
126+
127+
// specific hint replaces generic hint
128+
withLabel: 'dragen' {
129+
hints = [consumableResources: ['my-dragen-license': 1]]
130+
}
131+
}
132+
```
133+
134+
Within a process definition, the `hints` directive uses *accumulation semantics*, meaning that subsequent `hints` directives are accumulated:
135+
136+
```groovy
137+
process runDragen {
138+
// multiple separate hints
139+
hints provisioningModel: 'spot'
140+
hints consumableResources: ['my-dragen-license': 1, 'other-license': 2]
141+
142+
// equivalent to...
143+
hints (
144+
provisioningModel: 'spot',
145+
consumableResources: ['my-dragen-license': 1, 'other-license': 2]
146+
)
147+
148+
// ...
149+
}
150+
```
151+
152+
This behavior is consistent with other directives such as `pod` and `resourceLabels`. In practice, this means that a given `hints` setting should specify all relevant hints for the given context.
153+
154+
For example, the `withLabel` selector above should also specify the `provisioningModel` hint if the intention is to preserve that hint for the selected processes:
155+
156+
```groovy
157+
process {
158+
hints = [provisioningModel: 'spot']
159+
160+
withLabel: 'dragen' {
161+
hints = [provisioningModel: 'spot', consumableResources: ['my-dragen-license': 1]]
162+
}
163+
}
164+
```
165+
166+
While this approach may lead to duplication, it gives users and developers more control over which hints are applied in a given context.
167+
168+
### Initial hint catalog
169+
170+
The following hints should be supported initially:
171+
172+
| Hint name | Value type | Executors | Use case |
173+
|--|--|--|--|
174+
| `consumableResources` | `Map<String, Integer>` | AWS Batch | License-aware scheduling ([#5917](https://github.com/nextflow-io/nextflow/issues/5917)) |
175+
| `scheduling.priority` | `Integer` | AWS Batch | Job scheduling priority ([#6998](https://github.com/nextflow-io/nextflow/issues/6998)) |
176+
| `scheduling.provisioningModel` | `String` | Google Batch | Spot VM scheduling ([#3530](https://github.com/nextflow-io/nextflow/issues/3530)) |
177+
178+
## Links
179+
180+
- [Community issue](https://github.com/nextflow-io/nextflow/issues/5917)

changelog.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
NEXTFLOW CHANGE-LOG
22
===================
3+
26.03.4-edge - 25 Apr 2026
4+
- Abort execution when platform telemetry error (#6827) [b1ad3f720]
5+
- Add $schema ref to generated module spec (#7056) [c40d742f3]
6+
- Add Apple container engine support (#7073) [2f7a3c455]
7+
- Add hints process directive for executor-specific scheduling hints (#7034) [406358e03]
8+
- Add Seqera NIO filesystem for datasets and refactor TowerClient/TowerObserver (#6946) [433b10a1f]
9+
- Add workspaceId/computeEnvId to nf-seqera auto labels (#7059) [5e8276c00]
10+
- Allow `-with-docker` to be used without a default container image (#7054) [41759d36e]
11+
- Allow module run to run modules with local path (#7057) [e2c77c6b7]
12+
- Default NXF_FUSION_TRACE to false (#7071) [5b4c8f0c1]
13+
- Fix IllegalArgumentException when process.resourceLabels is a closure (#7068) [944977e3f]
14+
- Fix resolution of params in resolved config text (#7072) [cb7133def]
15+
- Propagate task.containerPlatform through Fusion container command (#7074) [b58a590bd]
16+
- Remove arch config option from Seqera MachineRequirement (#7063) [da06e9a9d]
17+
- Replace current cloud info URL call with cloudInfo client (#7065) [629184251]
18+
- Restructure modules docs as a section and add registry steps (#7030) [29370f4bc]
19+
- Update workflow outputs tutorial (#7060) [68d144b9c]
20+
- Use toUriString for paths in work-dir and FilesEx error messages (#7075) [b535377cc]
21+
- Bump nf-amazon@3.9.0
22+
- Bump nf-google@1.27.2
23+
- Bump nf-seqera@0.19.0
24+
- Bump nf-tower@1.26.0
25+
- Bump nf-wave@1.20.0
26+
327
26.03.3-edge - 20 Apr 2026
428
- Add -files-from option to lint command to avoid ARG_MAX limit (#6858) [5a3cd830c]
529
- Add 26.04 migration docs (#7000) [89ec31bbf]

docs/cli.md

Lines changed: 8 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -250,149 +250,26 @@ $ nextflow drop nextflow-io/hello
250250

251251
See {ref}`cli-drop` for more information.
252252

253-
### Secret management
254-
255-
The `secrets` command manages secure pipeline secrets.
256-
257-
Use this to store credentials securely, reference them in pipelines without exposing values, and manage sensitive data centrally across your organization.
258-
259-
```console
260-
$ nextflow secrets list
261-
$ nextflow secrets set AWS_ACCESS_KEY_ID
262-
$ nextflow secrets delete AWS_ACCESS_KEY_ID
263-
```
264-
265-
See {ref}`cli-secrets` for more information.
266-
267253
## Module management
268254

269255
:::{versionadded} 26.04.0
270256
:::
271257

272-
The `module` command enables working with reusable, registry-based modules. The Nextflow module system allows you to install, run, search, and publish standardized modules from registries, eliminating duplicate work and sharing improvements with the community.
273-
274-
Use these commands to discover modules in registries, install them into your project, run them directly without creating a workflow, and publish your own modules for others to use.
275-
276-
### Searching for modules
277-
278-
The `module search` command queries the module registry to discover available modules by keyword or name.
279-
280-
Use this to find modules for specific tasks, explore available tools, or discover community modules.
281-
282-
```console
283-
$ nextflow module search alignment
284-
$ nextflow module search "quality control" -limit 10
285-
$ nextflow module search bwa -output json
286-
```
287-
288-
Results include module names, versions, descriptions, and download statistics. Use `-limit` to control the number of results and `-output json` for JSON-formatted output.
289-
290-
See {ref}`cli-module-search` for more information.
291-
292-
### Installing modules
293-
294-
The `module install` command downloads modules from a registry and makes them available in your workflow. Modules are stored locally in the `modules/` directory. An additional `.module-info` file is created during to store installation information such as the module checksum at installation and the registry URL.
295-
296-
Use this to add reusable modules to your pipeline, manage module versions, or update modules to newer versions.
297-
298-
```console
299-
$ nextflow module install nf-core/fastqc
300-
$ nextflow module install nf-core/fastqc -version 1.0.0
301-
```
302-
303-
The installed module will be available in `modules/nf-core/fastqc`.
304-
305-
Use the `-force` flag to reinstall a module even if local modifications exist.
306-
307-
See {ref}`cli-module-install` for more information.
308-
309-
### Listing modules
310-
311-
The `module list` command displays all modules currently installed in your project, showing their versions and integrity status.
312-
313-
Use this to review installed modules, check module versions, or detect local modifications.
314-
315-
```console
316-
$ nextflow module list
317-
$ nextflow module list -output json
318-
```
319-
320-
The output shows each module's name, installed version, and whether it has been modified locally. Use `-o json` for JSON-formatted output.
258+
The `module` command allows you to discover, install, and run modules through a centralized module registry. See {ref}`using-modules-page` and the {ref}`cli-module` command reference for more information.
321259

322-
See {ref}`cli-module-list` for more information.
260+
## Secret management
323261

324-
### Viewing module information
325-
326-
The `module view` command displays detailed metadata and usage information for a specific module from the registry.
327-
328-
Use this to understand module requirements, view input/output specifications, see available tools, or generate usage templates before installing or running a module.
329-
330-
```console
331-
$ nextflow module view nf-core/fastqc
332-
$ nextflow module view nf-core/fastqc -version 1.0.0
333-
$ nextflow module view nf-core/fastqc -output json
334-
```
335-
336-
The output includes the module's version, description, authors, keywords, tools, input/output channels, and a generated usage template showing how to run the module. Use `-json` for machine-readable output suitable for programmatic access.
337-
338-
See {ref}`cli-module-view` for more information.
339-
340-
### Running modules directly
341-
342-
The `module run` command executes a module directly from the registry without requiring a wrapper workflow. This provides immediate access to module functionality for ad-hoc tasks or testing.
343-
344-
Use this to quickly run a module, test module functionality, or execute one-off data processing tasks.
345-
346-
```console
347-
$ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz'
348-
$ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz' -version 1.0.0
349-
```
350-
351-
The command accepts all standard Nextflow execution options (`-profile`, `-resume`, etc.):
352-
353-
```console
354-
$ nextflow module run nf-core/salmon \
355-
--reads reads.fq \
356-
--index salmon_index \
357-
-profile docker \
358-
-resume
359-
```
360-
361-
Process inputs can be specified like params on the command line. For example, `--reads reads.fq` corresponds to the `reads` input in the `nf-core/salmon` module. Run `nextflow module view nf-core/salmon` to see the available params for the module.
362-
363-
See {ref}`cli-module-run` for more information.
364-
365-
### Removing modules
366-
367-
The `module remove` command deletes modules from your project, removing local files and configuration entries.
368-
369-
Use this to clean up unused modules, free disk space, or remove deprecated modules from your pipeline.
370-
371-
```console
372-
$ nextflow module remove nf-core/fastqc
373-
$ nextflow module remove nf-core/fastqc -keep-files
374-
```
375-
376-
By default, both local files and configuration entries are removed. Use `-keep-files` to remove the configuration entry and `.module-info` while keeping local files.
377-
378-
See {ref}`cli-module-remove` for more information.
379-
380-
### Publishing modules
381-
382-
The `module publish` command uploads modules to a registry, making them available for others to install and use.
262+
The `secrets` command manages secure pipeline secrets.
383263

384-
Use this to share your modules with the community, contribute to module libraries, or distribute modules within your organization.
264+
Use this to store credentials securely, reference them in pipelines without exposing values, and manage sensitive data centrally across your organization.
385265

386266
```console
387-
$ nextflow module publish myorg/my-module
388-
$ nextflow module publish myorg/my-module -dry-run
267+
$ nextflow secrets list
268+
$ nextflow secrets set AWS_ACCESS_KEY_ID
269+
$ nextflow secrets delete AWS_ACCESS_KEY_ID
389270
```
390271

391-
Publishing requires authentication via the `NXF_REGISTRY_TOKEN` environment variable or the `registry.apiKey` config option. The module must include `main.nf`, `meta.yml`, and `README.md` files.
392-
393-
Use the {ref}`cli-module-spec` and {ref}`cli-module-validate` commands to prepare and validate a module before publishing.
394-
395-
See {ref}`cli-module-publish` for more information.
272+
See {ref}`cli-secrets` for more information.
396273

397274
## Configuration and validation
398275

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
'flux.md': 'tutorials/flux.md',
5959
'developer/plugins.md': 'plugins/developing-plugins.md',
6060
'plugins.md': 'plugins/plugins.md',
61-
'channel.md': 'workflow.md'
61+
'channel.md': 'workflow.md',
62+
'module.md': 'modules/modules.md'
6263
}
6364

6465
# Add any paths that contain templates here, relative to this directory.

0 commit comments

Comments
 (0)