-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Issue #620 PR2 break dependency on httpclient and replace with okhttp3 #2595
Issue #620 PR2 break dependency on httpclient and replace with okhttp3 #2595
Conversation
# Conflicts: # README.md
… implements OpenRosaHttpInterface.
* master: Continue image load on orientation change (#2482)
Hi @xsteelej, @lognaturel is on leave now; can you leave a note here when you believe you have addressed all of her outstanding questions and comments, and then I'll take a final look? |
Hi @zestyping, thanks for your note and nice to meet you (virtually 😄).. I'm just looking at the final bug which she spotted, which will also answer the question about my understanding of the caching as it's related. Thanks |
…ssword string equals methods Fixed bug with credentials being cached.
Hi @zestyping, I've completed the code updates and I feel it is ready for a review. Just a couple of points:
|
Hi @jd-alexander, do you have any time to take another look? |
@xsteelej I tried downloading blank forms & sending finalized forms using the default aggregate server and that worked perfectly. |
Thanks for testing @shobhitagarwal1612 |
@zestyping do you have some time for reviewing? |
@shobhitagarwal1612 |
Yes, I did and it looks pretty clean to me. |
Thanks! |
Hi folks! No need to review this one because I've asked @seadowg to review it. He is very familiar with OkHttp and once he looks at it, we can make a decision. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @xsteelej! I managed to have a look a this this evening. My interpretation of the aim of this PR is to switch the implementation of OpenRosaHttpInterface
from HttpClientConnection
to a new OkHttpConnection
(that uses OkHttp). Given that goal I couldn't spot any problems in the code and the addition of OkHttp looks good. There are two thing I'd like to suggest though:
-
It is quite hard to to be confident that no minor changes in behavior have been introduced as there were no existing tests at an HTTP integration level for
HttpClientConnection
as far as I can see. I'll look into adding these so we can verify there are no minor differences between the two implementations of the interface. Given this I think what makes most sense is to change this PR so it doesn't remove the ol'HttpClientConnection
(or its uses) but simply adds the newOkHttpConnection
(which will be unused for the moment). -
The Git commit history contains quite a lot of merge commits. Would it be possible to try and clean these up? I'd imagine it's possible to squash the commits down so the history is more readable and then force push the branch. As always SO to the rescue: https://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git
Hi @seadowg, thanks for the review!
Thanks |
@xsteelej I think merging unused for now is the right approach. It just gives us more flexibility as far as when exactly we turn it on. As to cleaning up the commits, you can make a branch off this current one to play around with with interactive rebasing. https://robots.thoughtbot.com/git-interactive-rebase-squash-amend-rewriting-history has a pretty good guide. https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History is also pretty good. |
@xsteelej I'd like to get the requested changes merged a few weeks before our Feb 20th code freeze. Is that possible? |
Hi @yanokwa, it should be yes - I've managed to squash most of the merge upstream/master commits on a branch, just looking at the latest conflicts and then i'll put back the httpConnection. Thanks |
To remove all the "Merge remote-tracking branch 'upstream/master'" commits I have created a new pull request: #2849 which replaces this one. The new PR adds okhttp3 but it is not currently used. |
closed in favor of #2849 |
Closes #620
What has been done to verify that this works as intended?
I've tested this on a local VM Aggregate instance with both Digest and Basic authentication.
However, this has not yet been tested with an Ona server and therefore I'm not sure if this implementation suffers the same issue as described in this issue #2592.
Why is this the best possible solution? Were any other approaches considered?
The use of okhttp3 seemed to be the most obvious choice due to its popularity and ease of use. Most of the ground work has been done with #2257
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
This change should not have any affect on users.
Do we need any specific form for testing your changes? If so, please attach one.
No
Does this change require updates to documentation? If so, please file an issue here and include the link below.
Before submitting this PR, please make sure you have:
./gradlew checkAll
and confirmed all checks still pass OR confirm CircleCI build passes and run./gradlew connectedDebugAndroidTest
locally.