Skip to content

Exitcode being ignored in k8s in some cases #6636

@BioWilko

Description

@BioWilko

Bug report

As the title says

Expected behavior and actual behavior

Currently a process can exit with a non-zero exit code (as stored in the .exitcode file) but the executor still calls it a 0 exit and looks for outputs.

Steps to reproduce the problem

I think this is an interaction between #6484 and #6597 where the resources are cleaned up by the garbage collector meaning that nextflow cannot get the exit code from the job but rather than falling back to checking the .exitcode file it is just falling back to 0 which is obviously a problem.

Steps to reproduce:

  • Start a k8s run with a short TTL (e.g. 60s) and many processes
  • Ensure at least some processes error out non-zero

nextflow (5).log

Environment

  • Nextflow version: 25.11.0-edge
  • Java version: openjdk 17.0.16 2025-07-15
  • Operating system: Linux
  • Bash version: GNU bash, version 5.1.16(1)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions