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

Bump qulice to 0.18.5 #886

Merged
merged 2 commits into from
Dec 12, 2018
Merged

Bump qulice to 0.18.5 #886

merged 2 commits into from
Dec 12, 2018

Conversation

victornoel
Copy link
Contributor

For #880

I had to change a test (RqMtFakeTest.closesAllParts) because of the rule AvoidFileStream that made me to use a different implementation for some stream and thus changed some of the exception thrown.

Apart from that, it is only cosmetics.

@0crat
Copy link
Collaborator

0crat commented Dec 8, 2018

Job #886 is now in scope, role is REV

@codecov-io
Copy link

codecov-io commented Dec 8, 2018

Codecov Report

Merging #886 into master will decrease coverage by 0.03%.
The diff coverage is 65.38%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #886      +/-   ##
============================================
- Coverage     75.48%   75.44%   -0.04%     
+ Complexity      981      980       -1     
============================================
  Files           220      220              
  Lines          4724     4725       +1     
  Branches        369      372       +3     
============================================
- Hits           3566     3565       -1     
  Misses         1003     1003              
- Partials        155      157       +2
Impacted Files Coverage Δ Complexity Δ
src/main/java/org/takes/rq/RqGreedy.java 87.5% <ø> (ø) 2 <0> (ø) ⬇️
...ain/java/org/takes/facets/fallback/TkFallback.java 50% <ø> (ø) 5 <0> (ø) ⬇️
src/main/java/org/takes/rq/RqChunk.java 75% <ø> (ø) 3 <0> (ø) ⬇️
src/main/java/org/takes/rq/RqHeaders.java 83.92% <ø> (ø) 0 <0> (ø) ⬇️
src/main/java/org/takes/facets/auth/PsBasic.java 85.71% <ø> (ø) 6 <0> (ø) ⬇️
src/main/java/org/takes/rq/RqWithHeaders.java 93.33% <ø> (ø) 3 <0> (ø) ⬇️
src/main/java/org/takes/facets/auth/PsByFlag.java 96.77% <ø> (ø) 13 <0> (ø) ⬇️
src/main/java/org/takes/rq/RqHref.java 66.66% <ø> (ø) 0 <0> (ø) ⬇️
src/main/java/org/takes/rq/RqSimple.java 66.66% <ø> (ø) 1 <0> (ø) ⬇️
src/main/java/org/takes/rq/RqFake.java 95.23% <ø> (ø) 8 <0> (ø) ⬇️
... and 59 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 47ed1e8...cd1e411. Read the comment docs.

Copy link
Contributor

@paulodamaso paulodamaso left a comment

Choose a reason for hiding this comment

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

@victornoel Please take a look

src/main/java/org/takes/http/MainRemote.java Show resolved Hide resolved
src/main/java/org/takes/http/Options.java Show resolved Hide resolved
src/main/java/org/takes/http/Options.java Show resolved Hide resolved
src/main/java/org/takes/rs/Body.java Show resolved Hide resolved
ex.getMessage(),
Matchers.containsString(closed)
ex,
Matchers.instanceOf(ClosedChannelException.class)
Copy link
Contributor

Choose a reason for hiding this comment

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

@victornoel Let's use new IsInstanceOf instead Matchers.instanceOf

@victornoel
Copy link
Contributor Author

@paulodamaso I didn't replace the new FileInputStream and co for fun ;)

It is caused by this PMD rule: https://pmd.github.io/latest/pmd_rules_java_performance.html#avoidfilestream

Maybe @krzyk can tell us more about the expected fix for this rule in qulice?

@paulodamaso
Copy link
Contributor

@victornoel I see. Well, let's use cactoos' classes where possible then, to deal with these input and output streams

@victornoel
Copy link
Contributor Author

@paulodamaso can you point to me which class should be used? If we end up using classes that wrap FileInputStream and such, is that a good or bad thing for quality? I would say bad :)

@paulodamaso
Copy link
Contributor

@victornoel Why? I think that we should enforce and promote EO programming in takes, and officially we have cactoos with a lot of classes that do this file and input / outputstream work. Why not use them?

@victornoel
Copy link
Contributor Author

@paulodamaso sorry, I guess I wasn't clear. I am 100% for EO style things. The question is: do we have actual classes that properly implements File-based InputStream as explained in the PMD link there: https://pmd.github.io/latest/pmd_rules_java_performance.html#avoidfilestream

If yes, then great, if not, it means we are just postponing solving this issue, because it means that the cactoos classes we would use are susceptible to the problems described in the PMD link.

If qulice integrated this rule, it means that it is important for quality to follow it.

Anyway, I'm ok with using any cactoos class there, I will make the change. In the end you are the one responsible as ARC, so it's good to me :P

@paulodamaso
Copy link
Contributor

@victornoel You are right and I agree with you. I've checked cactoos and we do not have file-based inputstream access which prevents the problems that you showed on the link. Actually we use the "wrong way" there, and as cactoos qulice version is older too, this problems does not appear in quality checks for that project.

I've already notified @llorllale in cactoos project about this (yegor256/cactoos#891 (comment)), but we can't use this potentially unsafe code in our project. So I'll ask you to let all these file readers and input/output streams the way you made before (so they comply with qulice checks) and please put a puzzle somewhere so we do not forget about this and can fix this once cactoos updates its libraries. How about that?

@victornoel
Copy link
Contributor Author

@paulodamaso I have updated the commits, thanks!

@victornoel
Copy link
Contributor Author

@paulodamaso wait sorry, there is some conflicts to be resolved

@victornoel
Copy link
Contributor Author

@paulodamaso this time it should be good :)

@paulodamaso
Copy link
Contributor

@victornoel Almost there, please take a look at the comment I've made before: https://github.com/yegor256/takes/pull/886/files#r240299333

@paulodamaso
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Dec 11, 2018

@rultor merge

@paulodamaso OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Dec 11, 2018

@rultor merge

@paulodamaso @victornoel Oops, I failed. You can see the full log here (spent 18min)

	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: apply returned: 255
around Ant part ...<apply failonerror="true" executable="xcop">... @ 10:51 in /home/r/repo/target/antrun/build-main.xml
	at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:342)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
Caused by: /home/r/repo/target/antrun/build-main.xml:10: apply returned: 255
	at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:643)
	at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:410)
	at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
	at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:435)
	at org.apache.tools.ant.Target.performTasks(Target.java:456)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
	at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:313)
	... 22 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
container 8aace8568a1d270c4bc6ca6b851cb5828ad98eafc2d09ea733a5e810b60d68ae is dead
Tue Dec 11 21:03:45 CET 2018

@victornoel
Copy link
Contributor Author

@paulodamaso I think my todo was properly formatted or something like that, I've pushed again

@paulodamaso
Copy link
Contributor

@victornoel It's still failing, please take a look

@paulodamaso
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Dec 11, 2018

@rultor merge

@paulodamaso OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Dec 11, 2018

@rultor merge

@paulodamaso @victornoel Oops, I failed. You can see the full log here (spent 8min)

++ curl -K ../curl-appveyor.cfg https://ci.appveyor.com/api/projects/yegor256/takes/build/3161
+ status=running
+ '[' running == null ']'
+ '[' running == success ']'
+ '[' running == failed ']'
+ echo 'waiting for AppVeyor build 3161: running'
waiting for AppVeyor build 3161: running
+ sleep 5s
+ true
++ jq -r .build.status
++ curl -K ../curl-appveyor.cfg https://ci.appveyor.com/api/projects/yegor256/takes/build/3161
+ status=running
+ '[' running == null ']'
+ '[' running == success ']'
+ '[' running == failed ']'
+ echo 'waiting for AppVeyor build 3161: running'
waiting for AppVeyor build 3161: running
+ sleep 5s
+ true
++ jq -r .build.status
++ curl -K ../curl-appveyor.cfg https://ci.appveyor.com/api/projects/yegor256/takes/build/3161
+ status=running
+ '[' running == null ']'
+ '[' running == success ']'
+ '[' running == failed ']'
+ echo 'waiting for AppVeyor build 3161: running'
waiting for AppVeyor build 3161: running
+ sleep 5s
+ true
++ curl -K ../curl-appveyor.cfg https://ci.appveyor.com/api/projects/yegor256/takes/build/3161
++ jq -r .build.status
+ status=running
+ '[' running == null ']'
+ '[' running == success ']'
+ '[' running == failed ']'
+ echo 'waiting for AppVeyor build 3161: running'
waiting for AppVeyor build 3161: running
+ sleep 5s
+ true
++ curl -K ../curl-appveyor.cfg https://ci.appveyor.com/api/projects/yegor256/takes/build/3161
++ jq -r .build.status
+ status=running
+ '[' running == null ']'
+ '[' running == success ']'
+ '[' running == failed ']'
+ echo 'waiting for AppVeyor build 3161: running'
waiting for AppVeyor build 3161: running
+ sleep 5s
+ true
++ jq -r .build.status
++ curl -K ../curl-appveyor.cfg https://ci.appveyor.com/api/projects/yegor256/takes/build/3161
+ status=failed
+ '[' failed == null ']'
+ '[' failed == success ']'
+ '[' failed == failed ']'
+ echo 'see https://ci.appveyor.com/project/yegor256/takes/build/3161'
see https://ci.appveyor.com/project/yegor256/takes/build/3161
+ exit 1
container 0b1cb4051a95faeaa13e87d2e0ebd449d7b567ae22ca64c33599cede44127eff is dead
Tue Dec 11 21:58:53 CET 2018

@victornoel
Copy link
Contributor Author

@paulodamaso I'm not sure why there is a test not working in appveyor… strangely, I can't see the test being ran in the travis build.

@victornoel
Copy link
Contributor Author

@paulodamaso I rebased on master since there were conflicts

@paulodamaso
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Dec 12, 2018

@rultor merge

@paulodamaso OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit cd1e411 into yegor256:master Dec 12, 2018
@rultor
Copy link
Collaborator

rultor commented Dec 12, 2018

@rultor merge

@paulodamaso Done! FYI, the full log is here (took me 23min)

@victornoel victornoel deleted the 880-qulice branch December 12, 2018 19:57
@0crat 0crat removed the scope label Dec 12, 2018
@0crat
Copy link
Collaborator

0crat commented Dec 12, 2018

Job gh:yegor256/takes#886 is not assigned, can't get performer

@0crat
Copy link
Collaborator

0crat commented Dec 12, 2018

The job #886 is now out of scope

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

6 participants