-
Notifications
You must be signed in to change notification settings - Fork 119
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
Move shards.json to results directory #1475
Comments
Makes sense. Thanks for catching this. |
#1475 Save shards.json in the results directoryChange save the location of MotivationCurrently, Flank always saves shards file in the current directory. This behavior can cause overriding this file when the user runs Flank multiple times at the same time. GoalsThe main goal is avoiding inconsistency between DesignCurrently in private fun AndroidMatrixTestShards.saveShards(obfuscateOutput: Boolean) = saveShardChunks(
shardFilePath = ANDROID_SHARD_FILE,
shards = this,
size = size,
obfuscatedOutput = obfuscateOutput
)
fun IosArgs.dumpShards(
shardFilePath: String = IOS_SHARD_FILE,
)
The dump shard file should be saved to the current execution result directory. APIAndroidprivate fun AndroidMatrixTestShards.saveShards(obfuscateOutput: Boolean) = saveShardChunks(
shardFilePath = Paths.get(path_to_result_dir,ANDROID_SHARD_FILE).toString(),toString(),
shards = this,
size = size,
obfuscatedOutput = obfuscateOutput
)
Flank should also check if the results directory currently exists and create if not. iOSBehavior should be similar to private fun IosArgs.dumpShardsIfXcTest() = takeIf { isXcTest }?.let {
createSHards().saveShardChunks(
shardFilePath = Paths.get(path_to_result_dir,IOS_SHARD_FILE).
shards = rawShards,
size = size,
obfuscatedOutput = obfuscateDumpShards
)
if (disableResultsUpload.not())
GcStorage.upload(IOS_SHARD_FILE, resultsBucket, resultsDir)
} ResultsFlank was saving DependenciesThe ticket is not blocked. Ticket improve quality and reduce data inconsistency. TestingDump shards file should be saved to result in directory instead of execution directory for android and ios. Android
iOS
disable-results-upload
|
Fixes #1475 ## Test Plan > How do we know the code works? 1. Run flank with android or ios test 1. Wait until ```results-directory``` is created 1. Open the results directory and check ```*_shards.json``` exists 1. If ```disable-results-upload``` not set, check shards file exists in gcloud bucket 1. Flank shouldn't upload shards file to gcs if ```disable-results-upload``` set ## Checklist - [X] Documented [(SDD in ticket comment)](#1475 (comment)) - [x] Unit tests updated - [X] Integration tests updated
Describe the bug
Currently, flank always saves shards file in the current directory. This behavior can cause overriding this file when user run flank multiple times at the same time.
Expected behavior
When we run tests we should save shards file to result directory. This behavior can cause overriding this file when user run flank multiple times at the same time.
The text was updated successfully, but these errors were encountered: