-
-
Notifications
You must be signed in to change notification settings - Fork 237
Fix algorithm for generating output names when output names clash #1342
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
Fix algorithm for generating output names when output names clash #1342
Conversation
|
Some help would be appreciated interpreting the test failure - I don't see how it is related to the change that this PR introduces. |
|
@pvanheus that error is pretty obscure. I have restarted the build in case it was a transient failure: https://travis-ci.org/github/common-workflow-language/cwltool/jobs/725533973 |
|
Thanks @tetron - hit the same error again. I really don't get what this error means. |
|
I am going to try running it locally and see what happens but I haven't gotten to it yet. |
|
@tetron I tried to run the tests locally as per the README but |
|
Thank you @pvanheus for this! I think I fixed the build on our side. Can you add your example as a test case? |
Codecov Report
@@ Coverage Diff @@
## main #1342 +/- ##
==========================================
- Coverage 77.71% 75.48% -2.23%
==========================================
Files 41 41
Lines 7659 7658 -1
Branches 1949 1949
==========================================
- Hits 5952 5781 -171
- Misses 1215 1346 +131
- Partials 492 531 +39
Continue to review full report at Codecov.
|
1ae7a25 to
9733c5d
Compare
When a scatter step in a workflow is chosen as a step in an output, the output names will naturally clash. Here is an example workflow:
The current cwltool logic for this case is here and it results in names in a list like
output.txt,output.txt_2,output.txt_2_3as the logic appends a number to the proposed target name instead of incrementing the number. Eventually cwltool crashes with aFile name too longOSError exception. This patch changes the logic to always target the original target name (entry.target) and increment the number appended to the end so that names becomeoutput.txt,output.txt_2,output.txt_3etc. It also adds a little comment explaining the logic.