Skip to content

Conversation

jorgee
Copy link
Contributor

@jorgee jorgee commented Oct 7, 2025

When using k8s without Fusion the .command.log file is only saved if a task fails. However, Platform tries to get .command.log for all tasks executed. So for non-failed tasks it is unable to find the log file.

This PR changes the container command to include the redirection of .command.run outputs to .command.log when Fusion is not enabled. It replaces #6451 because getting .command.log from the pod logs for all tasks overload the Kubernetes API with large number of tasks.

See also #2782

Tested with local K3d cluster:

$ nextflow kuberun -head-image jorgeejarquea/nextflow:25.08.0-edge-2765d4a69 hello -v nextflow-pvc:/mnt/data/launch
Pod started: focused-noyce
N E X T F L O W  ~  version 25.08.0-edge
Pulling nextflow-io/hello ...
 downloaded from https://github.com/nextflow-io/hello.git
Launching `https://github.com/nextflow-io/hello` [focused-noyce] DSL2 - revision: 2ce0b0e294 [master]
[33/9aad8c] Submitted process > sayHello (2)
[31/17e511] Submitted process > sayHello (3)
[23/a4f15c] Submitted process > sayHello (1)
[4a/9738de] Submitted process > sayHello (4)
Ciao world!

Hello world!

Bonjour world!

Hola world!


/tmp/k3d-storage/jorgee/work/33/9aad8c9e9711ce00bd30f7a383f3ce$ ls -lart
total 28
drwxr-xr-x 3 root root 4096 oct  7 15:45 ..
-rw-r--r-- 1 root root 3163 oct  7 15:45 .command.run
-rw-r--r-- 1 root root   35 oct  7 15:45 .command.sh
-rw-r--r-- 1 root root    0 oct  7 15:46 .command.begin
-rw-r--r-- 1 root root    0 oct  7 15:46 .command.err
-rw-r--r-- 1 root root   12 oct  7 15:46 .command.out
-rw-r--r-- 1 root root   12 oct  7 15:46 .command.log
-rw-r--r-- 1 root root    1 oct  7 15:46 .exitcode
drwxr-xr-x 2 root root 4096 oct  7 15:46 .

Copy link

netlify bot commented Oct 7, 2025

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit 1fed07f
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/68ee8fab4aaed300081c6a3e
😎 Deploy Preview https://deploy-preview-6455--nextflow-docs-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jorgee jorgee changed the title Add .command.log redirection in K8s continer command when no Fusion Add .command.log redirection in K8s container command when no Fusion Oct 7, 2025
@jorgee jorgee changed the title Add .command.log redirection in K8s container command when no Fusion Add .command.log redirection in K8s container command when Fusion is not enabled Oct 7, 2025
Copy link
Member

@pditommaso pditommaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would better still trying to fetch the logs via the API in case of failure

@jorgee
Copy link
Contributor Author

jorgee commented Oct 14, 2025

I have reverted the savePodLogsOnError part.

@jorgee jorgee requested a review from pditommaso October 14, 2025 18:05
@bentsherman bentsherman added this to the 25.10 milestone Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants