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

Adding -loglevel error for large files #82

Merged
merged 7 commits into from
Dec 19, 2019
Merged

Adding -loglevel error for large files #82

merged 7 commits into from
Dec 19, 2019

Conversation

dannylamb
Copy link
Contributor

GitHub Issue: Part of the fix for Islandora/documentation#1278

What does this Pull Request do?

Adds -loglevel error to every ffmpeg command so that large files can be processed.

How should this be tested?

See Islandora/documentation#1278

Interested parties

@Islandora/8-x-committers @kayakr @antbrown

@codecov
Copy link

codecov bot commented Oct 24, 2019

Codecov Report

Merging #82 into dev will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev      #82      +/-   ##
============================================
+ Coverage     94.77%   94.85%   +0.08%     
  Complexity      168      168              
============================================
  Files             9        9              
  Lines           689      700      +11     
============================================
+ Hits            653      664      +11     
  Misses           36       36
Impacted Files Coverage Δ Complexity Δ
Homarus/src/Controller/HomarusController.php 100% <100%> (ø) 13 <0> (+1) ⬆️
Gemini/src/UrlMinter/UrlMinter.php 100% <0%> (ø) 2% <0%> (-1%) ⬇️
Milliner/src/Service/MillinerService.php 99.2% <0%> (ø) 54% <0%> (ø) ⬇️
Gemini/src/Controller/GeminiController.php 98.24% <0%> (+0.03%) 19% <0%> (ø) ⬇️
Milliner/src/Controller/MillinerController.php 94.93% <0%> (+0.27%) 19% <0%> (ø) ⬇️

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 8ccf1e4...2b71096. Read the comment docs.

@antbrown
Copy link

I've tested this on a handful of environments and can concur a quiet ffmpeg is a happy ffmpeg (esp. for processing large files where stdout can get clogged up by ffmpeg giving a running commentary of what's going on)

@whikloj
Copy link
Member

whikloj commented Dec 17, 2019

I'm not against this change, just wondering if we will ever want a more verbose logging?

Also what happens if I provide -loglevel info in the context reaction, such that my args end up as -loglevel info -loglevel error?

Should we do a more complex check for existing -loglevel arguments and (perhaps) add a warning to the homarus log if more verbose than error? Or document that logging is locked to the error state.

I'll try and pull this down and test some of these possibly problematic issues I'm noting here.

@dannylamb
Copy link
Contributor Author

@whikloj Wasn't thinking about that 🤦‍♂️ Since any client could pass along an X-Islandora-Args header, I should sanitize here to catch all cases. After that we'll need to run a custom validator to throw things back at you if you try to set the loglevel in the action's form.

@dannylamb
Copy link
Contributor Author

@whikloj eh how about we just reject any message that tries to set log level? that's honestly the cleanest way to handle it. i'll update the action to reject form submissions that try to set loglevel in the arguments field.

Copy link
Member

@whikloj whikloj left a comment

Choose a reason for hiding this comment

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

👍

@whikloj whikloj merged commit 879c9b7 into dev Dec 19, 2019
@whikloj whikloj deleted the issue-1278 branch December 19, 2019 14:20
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.

3 participants