Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At TowerArchiver resolve envar paths relative to baseDir #3438

Merged
merged 3 commits into from
Nov 29, 2022

Conversation

jordeu
Copy link
Collaborator

@jordeu jordeu commented Nov 25, 2022

Description

When archiving files defined in an environment variable, we should assume that they are relative paths to baseDir no to the current working directory.

Example

Given NXF_ARCHIVE_DIR="/scratch,s3://fusionfs/archived" when running a normal pipeline with Tower we have for example this variable NXF_OUT_FILE=nf-3rvDYTUlUhJ1Ge.txt that here it ends resolved to this absolute path /3rvDYTUlUhJ1Ge.txt because the launcher is running at / folder. But then here it is discarded because baseDir is /scratch (extracted from NXF_ARCHIVE_DIR). Notice that both files (/3rvDYTUlUhJ1Ge.txt and /scratch/3rvDYTUlUhJ1Ge.txt) exists because the saveCacheFiles has copied them.

@jordeu
Copy link
Collaborator Author

jordeu commented Nov 29, 2022

I've realized that previous solution was wrong because I was assuming that binDir == workDir, but that's not necessarily true. Now it is explicitly looking for the Nextflow log files at the working directory. Also I've added a test.

@jordeu jordeu requested a review from pditommaso November 29, 2022 10:53
@pditommaso pditommaso merged commit 46af18e into master Nov 29, 2022
@pditommaso pditommaso deleted the tower_archive_basedir_fix branch November 29, 2022 15:00
pditommaso pushed a commit that referenced this pull request Nov 29, 2022
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