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

Limit loadContents/File literal contents length. #1048

Merged
merged 2 commits into from
Feb 5, 2019

Conversation

jmchilton
Copy link
Contributor

@jmchilton jmchilton commented Jan 25, 2019

We decided to limit these and cause a hard error if these buffer sizes were exceeded. We decided this would retro-actively apply to v1.0 - since silently failing (the unspecified but actual behavior of cwltool) seems to be the worst of all behaviors.

Corresponding PR to conformance tests at common-workflow-language/common-workflow-language#822.

@codecov
Copy link

codecov bot commented Jan 25, 2019

Codecov Report

Merging #1048 into master will decrease coverage by 4.14%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1048      +/-   ##
==========================================
- Coverage   78.82%   74.68%   -4.15%     
==========================================
  Files          30       30              
  Lines        6060     6071      +11     
  Branches     1506     1509       +3     
==========================================
- Hits         4777     4534     -243     
- Misses        896     1097     +201     
- Partials      387      440      +53
Impacted Files Coverage Δ
cwltool/command_line_tool.py 69.2% <100%> (-6.47%) ⬇️
cwltool/pathmapper.py 77.41% <40%> (-6.55%) ⬇️
cwltool/workflow.py 70.93% <50%> (-13.8%) ⬇️
cwltool/builder.py 65.97% <50%> (-18.24%) ⬇️
cwltool/checker.py 89.18% <0%> (-6.09%) ⬇️
cwltool/validate_js.py 80.35% <0%> (-5.36%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a94d751...d81cf05. Read the comment docs.

@codecov
Copy link

codecov bot commented Jan 25, 2019

Codecov Report

Merging #1048 into master will decrease coverage by 0.17%.
The diff coverage is 73.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1048      +/-   ##
==========================================
- Coverage   79.92%   79.74%   -0.18%     
==========================================
  Files          30       30              
  Lines        6096     6108      +12     
  Branches     1522     1525       +3     
==========================================
- Hits         4872     4871       -1     
- Misses        848      858      +10     
- Partials      376      379       +3
Impacted Files Coverage Δ
cwltool/workflow.py 85.24% <100%> (ø) ⬆️
cwltool/command_line_tool.py 79.56% <100%> (ø) ⬆️
cwltool/pathmapper.py 82.94% <40%> (-1.02%) ⬇️
cwltool/builder.py 88.85% <80%> (-0.44%) ⬇️
cwltool/sandboxjs.py 73.7% <0%> (-1.73%) ⬇️
cwltool/job.py 68.49% <0%> (-0.88%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 526f36f...3d641fb. Read the comment docs.

@jmchilton
Copy link
Contributor Author

This actually seemed to work first try modulo type linting issues (happy for advice on this if the Travis tells me it is still wrong).

Easy to test against this branch of CWL conformance v1.0 conformance tests common-workflow-language/common-workflow-language#822.

cwltest --test conformance_test_v1.0.yaml -n 198
cwltest --test conformance_test_v1.0.yaml -n 199
cwltest --test conformance_test_v1.0.yaml -n 200
cwltest --test conformance_test_v1.0.yaml -n 201
cwltest --test conformance_test_v1.0.yaml -n 202
cwltest --test conformance_test_v1.0.yaml -n 203

The controls pass with cwltool from pip but the active tests only pass with the changes in this PR.

We decided to limit these and cause a hard error if these buffer sizes were exceeded. We decided this would retro-actively apply to v1.0 - since silently failing seems to be the worst of all behavior.
@jmchilton jmchilton changed the title [WIP] Limit loadContents/File literal contents length. Limit loadContents/File literal contents length. Jan 25, 2019
@mr-c mr-c merged commit 691dea2 into common-workflow-language:master Feb 5, 2019
@mr-c
Copy link
Member

mr-c commented Feb 5, 2019

Thank you @jmchilton !

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.

None yet

3 participants