-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache all uploads and downloads to GCS (#639)
* Cache all uploads and downloads to GCS Currently, when using local apk artifacts, Flank always uploads every app/test apk pair even if the app apk has already been uploaded. This is also true for pulling the old JUnitReport from GCS for smart flank where every test apk re-downloads the results. To fix this we simply cache uploads and downloads in a ConcurrentHashMap where the key is the GCS path for downloads and the filename for uploads. This change also fixes a bug where local test apks would be uploaded and then re-downloaded parse their tests. The sharding loop now loops over the local AppTestPair where it uploads them if necessary and scans for tests on the local test apk. All in all this shaves almost 4 minutes off of shard generation for a project with 20+ modules. There is also likely more work that can be done to parallelize matrix creation (uploading apks, parsing tests, creating the shard), but it is out of scope of this change. * Ensure resources used to download from GCS are closed Make sure that when an exception is ignored, we still close our file system resources (ReadChannel/FileOutputStream). Also rename some variables and methods to better describe what they are and how they are used.
- Loading branch information
1 parent
8c235ee
commit c021274
Showing
4 changed files
with
73 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters