-
Notifications
You must be signed in to change notification settings - Fork 659
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
Publishing a symlink when using fusion copies link (mock symlink) rather than link target #4967
Comments
Not sure this is worth supporting. Normally we detect fusion symlinks by checking if the output file is also an input, which is cheap because the list of inputs is in memory. But detecting this would require checking for Instead, I would recommend that you either copy the file or declare the input file as an output directly (e.g. |
This comment was marked as outdated.
This comment was marked as outdated.
However, this is introducing an increasing inconsistency between Fusion and non-fusion usage. Normally this is not a problem because the OS knows how to handle symlinks, which obviously is not the case for Fusion. I'm starting to think it should be the role of Fusion to concretize symlinks when referenced in the publishDir. Now that were are introducing the task meta-comment, it should be an easier task. Adding @jordeu for visibility |
I assume you mean the process outputs? Because we are decoupling the publishing from the task execution with the workflow publish So if a process output turns out to be a symlink -- whether because it was also an input or it was linked by the task, or some other reason -- Fusion should upload a copy to S3. Then Nextflow doesn't need to check for forwarded inputs when publishing files This is actually necessary with the workflow publish, because files published by the workflow don't know the task they came from, so they can't check if they are a forwarded input |
No, I mean only publish, because non-publish output files will be used by Fusion in downstream task and, I guess, Fusion is able to handle properly |
Well, if we use the workflow publish instead of publishDir then the task doesn't know which outputs will be published |
What is the "the workflow publish"? |
Workflow publish (i.e. output) definition: #4784 |
I was going to summarize the hybrid solution we discussed on the call, but thinking through it now I realize that it won't work. The workflow output definition makes it difficult for a task to know whether an output file will be published. I think the best thing we can do instead is (1) give Fusion the output file patterns and (2) Fusion should always upload a copy if a symlink is an output file. This will only happen when an output file is a symlink, which is relatively uncommon. We can also remove the Fusion symlink logic from Nextflow. |
it makes sense to me |
Giving Fusion the output patterns is a huge win because it provides the opportunity for Fusion to prioritize uploading particular files and potentially abandon the upload of non-output files when the task is complete. |
Distinguishing between input, intermediate, and output files in the working directory opens the door to many optimizations. But still, I'm not convinced that it is a good idea to "materialize" all the outputs as objects when they are symbolic links. Imagine, for example, that the output is a symbolic link to a folder with thousands of small files. Materializing all these thousands of files in an object store is a costly operation. |
Keep in mind that it only heeds to happen when the user creates such a link or forwards an input as an output. These cases are uncommon and can be easily avoided by writing the pipeline differently |
Bug report
Given a simple workflow that creates a file
... and configuration that sets fusion:
Expected behavior and actual behavior
I would expect the contents of the file published at
./results/symlink.json
to include the json document...but instead it is a text file containing:
Notes
The .fusion.symlinks document in the task working directory of the PublishIdCard task contains the text
symlink.json
, but Nextflow doesn't seem to follow the symlink when publishing.The text was updated successfully, but these errors were encountered: