This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #459
What has been done to verify that this works as intended?
I've used Chrome's inspector for all these tests with the "Disable cache" from the network tab enabled.
Version note blocking issues
localhost
and verify that I get the "you're up to date" note.Google maps JS blocking issues
Why is this the best possible solution? Were any other approaches considered?
First I tried to modify the client's JSNI implementation in
LayoutUtils.java
to handle errors related to the requests to GitHub's API, but I got to very complicated half-solutions due to conflicts between the blocking nature of GWT Java UI building and the asynchronous XMLHttpRequest.Then I decided to switch to an all-Java server-side solution. At the expense of having a new GWT service, now we completely avoid client-side JSNI code and the asynchronous interaction is entirely made through GWT RPC calls, which is results in much simpler client code.
Thanks to moving this code to the server, we're also able to throttle-control calls to GitHub's API (and avoid nasty temporary bans due to spamming it with requests). Now, instead the clients (potentially many) doing calls to GH, it's the server who does 1 request per 24 hours max.
Are there any risks to merging this code? If so, what are they?
None.
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 at https://github.com/opendatakit/docs/issues/new and include the link below.
No.