Skip to content

fix: register SpawnExecutor for ExecutorFactory discovery (#7) - #8

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/executor-discovery
Jun 2, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/executor-discovery

Conversation

@scttfrdmn

Copy link
Copy Markdown
Collaborator

Closes #7.

The plugin loaded (Plugin started [email protected]) but Nextflow's ExecutorFactory never discovered SpawnExecutor — Extension executors providers=[AwsBatchExecutor] with SpawnExecutor absent — so executor = 'spawn' failed with Unknown executor name: spawn.

Fix

pf4j extension discovery needs both of these, and the plugin had neither:

  • @Extension annotation on SpawnExecutor (added).
  • META-INF/extensions.idx listing io.nextflow.spawn.SpawnExecutor (added). The pf4j annotation processor doesn't run reliably under Groovy, so Nextflow core plugins ship this index file explicitly rather than relying on annotation processing.

Also fixed

META-INF/nextflow.plugins declared version=0.1.0 while the build was 0.1.2 (stale). Replaced the literal with an @version@ token filtered from project.version via processResources (ReplaceTokens), so the manifest version can't drift from build.gradle again.

Verified in the built jar

  • META-INF/extensions.idx → io.nextflow.spawn.SpawnExecutor
  • @Extension present as a RuntimeVisibleAnnotation (Lorg/pf4j/Extension;) on SpawnExecutor.class
  • META-INF/nextflow.plugins filtered to version=0.1.2

Builds clean via ./gradlew jar (Gradle 8.8 wrapper, JDK 17).

The plugin loaded but Nextflow's ExecutorFactory never discovered
SpawnExecutor, so `executor = 'spawn'` failed with "Unknown executor name:
spawn". pf4j extension discovery needs both:

- @extension on SpawnExecutor (the annotation; added).
- META-INF/extensions.idx listing io.nextflow.spawn.SpawnExecutor. The pf4j
  annotation processor doesn't run reliably under Groovy, so Nextflow core
  plugins ship this index file explicitly — added.

Also fix the stale plugin manifest: META-INF/nextflow.plugins had version=0.1.0
(build was 0.1.2). Replaced the literal with an @Version@ token filtered from
the build version via processResources, so it can't drift again.

Verified the built jar contains META-INF/extensions.idx, the @extension
RuntimeVisibleAnnotation on SpawnExecutor, and a manifest filtered to 0.1.2.
Closes #7.
@scttfrdmn
scttfrdmn merged commit 694c48c into main Jun 2, 2026
1 check passed
@scttfrdmn
scttfrdmn deleted the fix/executor-discovery branch June 2, 2026 18:54
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.

SpawnExecutor not discovered by ExecutorFactory — missing service descriptor

1 participant