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

Deduplicate unnecessary upload requests for APK splits #248

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Jul 29, 2020

Goal

Deduplicates unnecessary upload requests for APK splits. For each APK split if the mapping file and version information is the same, then the upload is skipped if a request has already been enqueued.

Changeset

Added UploadRequestClient, which takes an AndroidManifestInfo and payload to calculate a unique request hash. If the request hash already exists, the enqueued request's response is retrieved. If no request already exists for a hash, a request is enqueued and its response is stored for future use.

A separate UploadRequestClient has been created for the Release/JVM/NDK APIs, to avoid the unlikely possibility of any hash collisions.

Tests

  • Added E2E scenario to check that releases/JVM mapping API send 2 rather than 58 requests for a project using APK splits.
  • Added unit test for UploadRequestClient

Base automatically changed from v5-fixture-dep-bump to v5 July 29, 2020 15:43
@fractalwrench fractalwrench force-pushed the v5-request-dedupe branch 4 times, most recently from 4d287d5 to 36bb403 Compare August 3, 2020 14:33
@fractalwrench fractalwrench changed the base branch from v5 to v5-auto-update-build-uuid August 3, 2020 14:35
@fractalwrench fractalwrench changed the title Dedupe unnecessary upload requests Deduplicate unnecessary upload requests for APK splits Aug 3, 2020
@fractalwrench fractalwrench marked this pull request as ready for review August 3, 2020 15:39
Base automatically changed from v5-auto-update-build-uuid to v5 August 4, 2020 09:37
@fractalwrench fractalwrench merged commit 0de5a4c into v5 Aug 4, 2020
@fractalwrench fractalwrench deleted the v5-request-dedupe branch August 4, 2020 09:37
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

2 participants