Skip to content

Update OKHTTP dependency #5

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

Merged
merged 3 commits into from
May 27, 2020
Merged

Update OKHTTP dependency #5

merged 3 commits into from
May 27, 2020

Conversation

tferr
Copy link
Contributor

@tferr tferr commented May 27, 2020

@gab1one, @ctrueden :
SNT uses okhttp a lot. We are currently using v4.7.2. There is a funky issue in some combinations of update sites (I really didn't have time to look into it: it was hard to understand how it was happening) the okhttp jar from our update site does not get downloaded: the updater considers the okhttp from scijava-io-http instead. This attempts to bring them into sync. Eitherway, you guys are using a 3year old release, so updating is certainly beneficial!

tferr added 3 commits May 26, 2020 23:03
While at it remove requirement for scijava-common version as it is managed
Signed-off-by: tferr <tiago.tferr@gmail.com>
@tferr tferr mentioned this pull request May 27, 2020
tferr added a commit to tferr/pom-scijava that referenced this pull request May 27, 2020
This requires scijava/scijava-io-http#5 to be accepted and merged!
@ctrueden ctrueden merged commit b567a4a into scijava:master May 27, 2020
@ctrueden
Copy link
Member

Good idea!

@ctrueden
Copy link
Member

@tferr Argh, I didn't notice that you bumped the version number. You shouldn't do this manually. Use the release-version.sh script to make releases, please! See https://imagej.net/Development_Lifecycle#Phase_3:_Released

@tferr
Copy link
Contributor Author

tferr commented May 27, 2020

@ctrueden , I did use the release-version.sh script: Forked the project. did the changes, ran release-version.sh, started the PR. How did I manage to screw up?

@ctrueden
Copy link
Member

The release-version.sh script won't work from a fork. It requires push access to the upstream. What it does is prepare the release and push it to the correct release tag, so that Travis CI picks it up and completes the release. The person running release-version.sh just needs push access to the origin repo.

Anyway, no worries—I cut the release myself, resetting the master branch's SNAPSHOT back to 0.2.2-SNAPSHOT again, so no harm done. 👍

@ctrueden
Copy link
Member

@tferr I did notice one worrisome thing, though: a java.io.IOException: HTTP connection failure, errorcode: 401:

[INFO] [INFO] Running org.scijava.io.http.HTTPHandleTest
[INFO] 2020-05-27 15:40:57.660:INFO::main: Logging initialized @1276ms to org.eclipse.jetty.util.log.StdErrLog
[INFO] 2020-05-27 15:40:57.865:INFO:oejs.Server:main: jetty-9.4.19.v20190610; built: 2019-06-10T16:30:51.723Z; git: afcf563148970e98786327af5e07c261fda175d3; jvm 1.8.0_222-b10
[INFO] 2020-05-27 15:40:57.932:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@15a2fddd{/,file:///private/var/folders/n2/5q09bjq11kv6xwpp0xlg4npc0000gq/T/http-handles-test6329757113197707243/,AVAILABLE}
[INFO] 2020-05-27 15:40:57.985:INFO:oejs.AbstractConnector:main: Started ServerConnector@146db8a6{HTTP/1.1,[http/1.1]}{0.0.0.0:56631}
[INFO] 2020-05-27 15:40:57.985:INFO:oejs.Server:main: Started @1602ms
[INFO] 2020-05-27 15:40:58.581:INFO:oejs.AbstractConnector:main: Stopped ServerConnector@146db8a6{HTTP/1.1,[http/1.1]}{0.0.0.0:0}
[INFO] 2020-05-27 15:40:58.582:INFO:oejsh.ContextHandler:main: Stopped o.e.j.s.h.ContextHandler@15a2fddd{/,file:///private/var/folders/n2/5q09bjq11kv6xwpp0xlg4npc0000gq/T/http-handles-test6329757113197707243/,UNAVAILABLE}
[INFO] 2020-05-27 15:40:58.585:INFO:oejs.Server:main: jetty-9.4.19.v20190610; built: 2019-06-10T16:30:51.723Z; git: afcf563148970e98786327af5e07c261fda175d3; jvm 1.8.0_222-b10
[INFO] 2020-05-27 15:40:58.586:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@2df0a4c3{/,file:///private/var/folders/n2/5q09bjq11kv6xwpp0xlg4npc0000gq/T/http-handles-test8172487496722347277/,AVAILABLE}
[INFO] 2020-05-27 15:40:58.587:INFO:oejs.AbstractConnector:main: Started ServerConnector@4d65fbad{HTTP/1.1,[http/1.1]}{0.0.0.0:56638}
[INFO] 2020-05-27 15:40:58.587:INFO:oejs.Server:main: Started @2204ms
[INFO] [ERROR] Could not create input stream:
[INFO] java.io.IOException: HTTP connection failure, errorcode: 401
[INFO] 	at org.scijava.io.http.HTTPHandle.result(HTTPHandle.java:184)
[INFO] 	at org.scijava.io.http.HTTPHandle.in(HTTPHandle.java:85)
[INFO] 	at org.scijava.io.handle.StreamHandle.close(StreamHandle.java:184)
[INFO] 	at org.scijava.io.http.HTTPHandleTest.testBasicAuth(HTTPHandleTest.java:127)
[INFO] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] 	at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
[INFO] 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[INFO] 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
[INFO] 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
[INFO] 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
[INFO] 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
[INFO] 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
[INFO] 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
[INFO] 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
[INFO] 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
[INFO] 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
[INFO] 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
[INFO] 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
[INFO] 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
[INFO] 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
[INFO] 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
[INFO] 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
[INFO] 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
[INFO] 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
[INFO] 	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
[INFO] 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
[INFO] 2020-05-27 15:40:58.604:INFO:oejs.AbstractConnector:main: Stopped ServerConnector@4d65fbad{HTTP/1.1,[http/1.1]}{0.0.0.0:0}
[INFO] 2020-05-27 15:40:58.605:INFO:oejsh.ContextHandler:main: Stopped o.e.j.s.h.ContextHandler@2df0a4c3{/,file:///private/var/folders/n2/5q09bjq11kv6xwpp0xlg4npc0000gq/T/http-handles-test8172487496722347277/,UNAVAILABLE}
[INFO] 2020-05-27 15:40:59.948:INFO:oejs.Server:main: jetty-9.4.19.v20190610; built: 2019-06-10T16:30:51.723Z; git: afcf563148970e98786327af5e07c261fda175d3; jvm 1.8.0_222-b10
[INFO] 2020-05-27 15:40:59.949:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@5d8c03cc{/,file:///private/var/folders/n2/5q09bjq11kv6xwpp0xlg4npc0000gq/T/scijava-http-test8897770806183787947/,AVAILABLE}
[INFO] 2020-05-27 15:40:59.951:INFO:oejs.AbstractConnector:main: Started ServerConnector@71ad1d0b{HTTP/1.1,[http/1.1]}{0.0.0.0:56643}
[INFO] 2020-05-27 15:40:59.951:INFO:oejs.Server:main: Started @3568ms
[INFO] 2020-05-27 15:40:59.957:INFO:oejs.AbstractConnector:main: Stopped ServerConnector@71ad1d0b{HTTP/1.1,[http/1.1]}{0.0.0.0:0}
[INFO] 2020-05-27 15:40:59.957:INFO:oejsh.ContextHandler:main: Stopped o.e.j.s.h.ContextHandler@5d8c03cc{/,file:///private/var/folders/n2/5q09bjq11kv6xwpp0xlg4npc0000gq/T/scijava-http-test8897770806183787947/,UNAVAILABLE}
[INFO] 2020-05-27 15:40:59.966:INFO:oejs.Server:main: jetty-9.4.19.v20190610; built: 2019-06-10T16:30:51.723Z; git: afcf563148970e98786327af5e07c261fda175d3; jvm 1.8.0_222-b10
[INFO] 2020-05-27 15:40:59.967:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@46c28400{/,file:///private/var/folders/n2/5q09bjq11kv6xwpp0xlg4npc0000gq/T/scijava-http-test7357290972967241085/,AVAILABLE}
[INFO] 2020-05-27 15:40:59.968:INFO:oejs.AbstractConnector:main: Started ServerConnector@27a8bfa1{HTTP/1.1,[http/1.1]}{0.0.0.0:56645}
[INFO] 2020-05-27 15:40:59.969:INFO:oejs.Server:main: Started @3585ms
[INFO] 2020-05-27 15:40:59.974:INFO:oejs.AbstractConnector:main: Stopped ServerConnector@27a8bfa1{HTTP/1.1,[http/1.1]}{0.0.0.0:0}
[INFO] 2020-05-27 15:40:59.974:INFO:oejsh.ContextHandler:main: Stopped o.e.j.s.h.ContextHandler@46c28400{/,file:///private/var/folders/n2/5q09bjq11kv6xwpp0xlg4npc0000gq/T/scijava-http-test7357290972967241085/,UNAVAILABLE}
[INFO] 2020-05-27 15:40:59.982:INFO:oejs.Server:main: jetty-9.4.19.v20190610; built: 2019-06-10T16:30:51.723Z; git: afcf563148970e98786327af5e07c261fda175d3; jvm 1.8.0_222-b10
[INFO] 2020-05-27 15:40:59.983:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@6f45a2fd{/,file:///private/var/folders/n2/5q09bjq11kv6xwpp0xlg4npc0000gq/T/scijava-http-test6865144054573910259/,AVAILABLE}
[INFO] [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.461 s - in org.scijava.io.http.HTTPHandleTest

However, it seems that version 0.2.0 also emits this exception. And it does not fail any tests. I don't suppose you looked at the code carefully enough to verify whether that's supposed to happen? @gab1one Do you remember? I generally try to avoid dumping exceptions to the console when they are expected, in favor of catching them...

@tferr
Copy link
Contributor Author

tferr commented May 28, 2020

@ctrueden, no I did not peruse the code. I looked for deprecations and tests completion. I also saw that exception but because it was also happening with the old okhttp version, I didn't think much of it.

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.

2 participants