-
Notifications
You must be signed in to change notification settings - Fork 521
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
Fix part of #2691: Migrate compute affected tests script to Kotlin #3374
Fix part of #2691: Migrate compute affected tests script to Kotlin #3374
Conversation
@Sparsh1212 are you still hitting the problem we discussed in #3340? It might be nice to do a trial run on your PR, but that might be tricky since the code needs to be copied into the branch and uploaded to GitHub. Keeping this as a draft until I write tests, though keep in mind that tests are particularly hard for this script since it's highly dependent on a real Bazel environment. |
@BenHenning I copied the code from |
The parsing of the added |
Ah excellent--thanks @Sparsh1212. In that case, this just needs tests & can then go into review. |
Thanks! for the fix Ben! |
Fix some typos & realized bug in the script.
Added tests for the core script. Still need to refactor, added more documentation, and add tests for the test & script utilities. |
Also interesting: I changed the merge-base command to use |
See comment in PR for context.
Unfortunately the extra checkout action didn't work. We may need to pass the reference object for merge-base in as a parameter unfortunately. |
This splits up the test & script into multiple utility packages (for common & testing utilities), reorganizes the test to be in a proper javatests/ & java/ arrangement, and adds tests for checking the error conditions of the test.
This also refactors that function to be part of a class so that its operating conditions are configurable (namely the process timeout).
Also, fix a few small issues in the utility.
Also, fix some changed behaviors that broke the affected tests script.
I was able to isolate the problem. I've added context to bazelbuild/bazel#906. I might need to file a new issue since that one is old, but I'm really interested in seeing whether the isolated repository will make it easier to investigate the issue. In the meantime, I'll disable the test with a TODO to unblock this & downstream work. |
See #2691 for context.
Now that the test is ignored, I expect all remaining tests to pass. Will reassign once I confirm the failing suite in question is now passing on CI. |
BazelClientTest is now passing: https://github.com/oppia/oppia-android/pull/3374/checks?check_run_id=2976899202. Assigning this back over since the PR should have a fully green CI now. |
@Sparsh1212 / @anandwana001 PTAL at my follow-up comments & mark as resolved if you're happy with the changes made. |
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.
LGTM!
LGTM! |
Unassigning @Sparsh1212 since they have already approved the PR. |
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.
LGTM
Thanks all! I might follow up with a workaround to the issue with the query hanging (I have an idea that might mitigate it). |
* Fix #3290: Add support for generic regex pattern matching * Apply review suggestions for proto location * Delete main directory * Implment script logic and tests * CI setup part 1 * syntax fix in yaml file * import nits in dummy file * Use regex patterns from script in script test * Make PR suggestions into effect * Make PR suggestions into effect * Make PR suggestions into effect * Improve naming of script_assets variables * Make PR suggestions into effect * Make PR suggestions * Make PR suggestions * Revamp testing approach * nit fixes * Make nit suggestions * Apply review suggestions on PR * Refactor PR as per feedback recieved * Implement review suggestions * nits * Nit fixes * nit fix * Review suggestions part 1 * Implement review suggestions part 2 * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * nit fix * Implement review suggestions * bazel files nit fix * Introduce a library for the regex assets * Make directory structure same as that of #3374 * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * nit fix * nit fix * Apply review suggestions * ktlint fix * nit fix * Remove script constants * nit fix * add todo * nit fixes * add testOnly
* Fix #3290: Add support for generic regex pattern matching * Apply review suggestions for proto location * Delete main directory * Implment script logic and tests * CI setup part 1 * syntax fix in yaml file * import nits in dummy file * Use regex patterns from script in script test * Make PR suggestions into effect * Make PR suggestions into effect * Make PR suggestions into effect * Improve naming of script_assets variables * Make PR suggestions into effect * Make PR suggestions * Make PR suggestions * Revamp testing approach * Fix #3291: Add check for XML syntax correctness * nit fixes * Introduce XML syntax check in static checks workflow * Make nit suggestions * Make nit suggestions * Add if: always() * Apply review suggestions on PR * Make review suggestions from regex pattern checks * Refactor PR as per feedback recieved * Implement feedback suggestions * Implement review suggestions * Implement review suggestions * nits * Nit fixes * Nit fixes * nit fix * nit fix * Review suggestions part 1 * Implement review suggestions part 2 * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * nit fix * Do review suggestions * Implement review suggestions * Implement review suggestions * nit fix * bazel files nit fix * Introduce a library for the regex assets * Make directory structure same as that of #3374 * Make directory structure similar to #3374 * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * remove testonly attribute from tests * nit fix * nit fix * Apply review suggestions * ktlint fix * nit fix * Apply nit fixes * Remove script constants * nit fix * add todo * nit fixes * add test * add testOnly * nit fix
* Fix #3290: Add support for generic regex pattern matching * Apply review suggestions for proto location * Delete main directory * Implment script logic and tests * CI setup part 1 * syntax fix in yaml file * import nits in dummy file * Use regex patterns from script in script test * Make PR suggestions into effect * Make PR suggestions into effect * Make PR suggestions into effect * Improve naming of script_assets variables * Make PR suggestions into effect * Make PR suggestions * Make PR suggestions * Revamp testing approach * Fix #3291: Add check for XML syntax correctness * nit fixes * Introduce XML syntax check in static checks workflow * Fix #3292: Add check for test files presence for prod files * Make nit suggestions * Make nit suggestions * Make nit suggestions * Add ScriptConstants file to exemptions test list * Add if: always() * Add if: always() * Apply review suggestions on PR * Make review suggestions from regex pattern checks * Implement review suggestions based on #3340 * Refactor PR as per feedback recieved * Implement feedback suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * nits * Nit fixes * Nit fixes * Nit fixes * nit fix * nit fix * Review suggestions part 1 * Implement review suggestions part 2 * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * nit fix * Do review suggestions * Implement review suggestions * Implement review suggestions * nit fix * Implement review suggestions * Add Ben as a codeowner for the ScriptExemptions file * bazel files nit fix * Introduce a library for the regex assets * Make directory structure same as that of #3374 * Make directory structure similar to #3374 * add new files to test file script exemptions and nit fixes * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * remove testonly attribute from tests * add new files to script exemptions * nit fix * nit fix * Apply review suggestions * ktlint fix * nit fix * Apply nit fixes * Apply nit fixes * Remove script constants * nit fix * add todo * add todo * nit fixes * add test * add testOnly * nit fixes * nit fix * nit fixes * nit fixes * nit fixes * nit fixes * fix textproto file * add exemptions to textproto * sort failures lexicographically * add new files to exemption list
… and license links (#3434) * Generate maven_install.json * Add fail_if_repin_required attribute * Update rules_jvm_external version in versions.bzl and use fail_if_repin_required attribute in maven_install() * Fix bazel lint error. * Update code ownership for maven_install.json * Fix #3290: Add support for generic regex pattern matching * Apply review suggestions for proto location * Delete main directory * Implment script logic and tests * CI setup part 1 * syntax fix in yaml file * import nits in dummy file * Use regex patterns from script in script test * Make PR suggestions into effect * Make PR suggestions into effect * Make PR suggestions into effect * Improve naming of script_assets variables * Make PR suggestions into effect * Create maven_dependencies_list.kts and complete the parsing of the maven_install.json * Make PR suggestions * Make PR suggestions * Improve naming in script and add KDocs for data classes. * Add EOF for all classes. * Change data structure to store backup dependencies. * Revamp testing approach * nit fixes * Add maven re-pin command. * Add BUILD.bazel file and Test file for script.creatre-script-to-compile-list-of-maven-dependencies * Fix test build error. * Improve code. * Make nit suggestions * Try changing location of maven_install.json * Convert .kts to .kt * Save work. * Rename data classes. * Remove kscript. * Fix lints. * Apply review suggestions on PR * Refactor PR as per feedback recieved * Implement review suggestions * Set different output_base for bazel query command * nits * Nit fixes * nit fix * Change maven_install_json attribute * Move maven_install.json to third_party * Remove maven_install code ownership from CODEOWNERS * Save changes. * remove class * Fix errors * Review suggestions part 1 * Implement review suggestions part 2 * Fix broken script * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * Validate all Links. * nit fix * Implement review suggestions * bazel files nit fix * Introduce a library for the regex assets * Change structure of the script. * Make directory structure same as that of #3374 * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * save changes. * commit * nit fix * Add bazel pipeline to app module * save. * save. * save. * save. * save. * save. * nit fix * fix broken script * Fix bug of printing enum values in output. * Fix bug of printing enum values in output. * Apply review suggestions * ktlint fix * nit fix * Remove script constants * nit fix * Make script to call out the dependencies and licenses for which manual work needs to be completed. * add todo * Complete first script * Add first script to scripts package * Remove unwanted files * Remove extra files and fix formatting * Fix lints. * Remove unnecessary lines of code * Add comments for proto * Add test file. * Fix lints. * Remove unwanted dependencies. * Add suggested changes. * nit fixes * Fix lint. * add testOnly * Fix nits * Add suggested changes. * Add suggested changes * Update textproto * Update maven_dependencies.textproto * Always force https over http * Always force https over http * Correct origin type * Use common/BazelClient * Fix lints * Save progress * create test_maven_install.json * Restructure script * Break script in two parts * Add DependencyListsProvider * Add DependencyListsProvider * correct query command * Correct structure of the script * Correct structure of the script * Fix not suggestions * Use * Add test file for NetworkAndBazelUtilsImpl.kt * Add KDocs * Add KDocs * try using mockito * Add test case in BazelClientTest.kt * Add mockito-kotlin * Fix nit * Fix nit * try fixing tests * Restructure maven_dependencies.proto * Fix lint * add --max_idle_secs * Fix nits * Fix nit * Place KDoc at correct position * Fix BazelClientTest.kt * Add xml parser * Fix pb error * Revert data module changes * Add tests * Add first test that passes * Add all test cases. * Fix nit * Add suggested changes * Add suggested changes * Add suggested changes * Nit changes * Fix nits * Fix BazelClient test case * Add test cases for TestBazelWorkspace * Add suggested changes * Add suggested changes * Fix one test. * Fix all test cases * Add TODO for issue #3486 * Add suggestions. * Fix urls. * Fix isFalse * Add all suggested changes. * Fix nits. Co-authored-by: Sparsh1212 <[email protected]>
* Fix #3290: Add support for generic regex pattern matching * Apply review suggestions for proto location * Delete main directory * Implment script logic and tests * CI setup part 1 * syntax fix in yaml file * import nits in dummy file * Use regex patterns from script in script test * Make PR suggestions into effect * Make PR suggestions into effect * Make PR suggestions into effect * Improve naming of script_assets variables * Make PR suggestions into effect * Make PR suggestions * Make PR suggestions * Revamp testing approach * Fix #3291: Add check for XML syntax correctness * nit fixes * Introduce XML syntax check in static checks workflow * Fix #3292: Add check for test files presence for prod files * Make nit suggestions * Make nit suggestions * Make nit suggestions * Fix #3300: Add check for accessibility labels for activities * Add CI check for label presence for activities * Add ScriptConstants file to exemptions test list * Test if: always() * Revert "Test if: always()" This reverts commit b72e419 * Add if: always() * Add if: always() * Add if: always() * Apply review suggestions on PR * Make review suggestions from regex pattern checks * Implement review suggestions based on #3340 * Refactor PR as per feedback recieved * Implement feedback suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * nits * Nit fixes * Nit fixes * Nit fixes * Implement feedback suggestions as per #3340 * nit fix * nit fix * nit fix * nit fix * Review suggestions part 1 * Implement review suggestions part 2 * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * nit fix * Do review suggestions * Implement review suggestions * Implement review suggestions * nit fix * Implement review suggestions * Add Ben as a codeowner for the ScriptExemptions file * bazel files nit fix * Introduce a library for the regex assets * Make directory structure same as that of #3374 * Make directory structure similar to #3374 * add new files to test file script exemptions and nit fixes * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * remove testonly attribute from tests * add new files to script exemptions * nit fix * nit fix * nit fix * Apply review suggestions * ktlint fix * nit fix * Apply nit fixes * Apply nit fixes * Remove script constants * nit fix * add todo * add todo * nit fixes * add test * add testOnly * nit fixes * nit fix * nit fixes * nit fixes * nit fixes * nit fixes * fix textproto file * add exemptions to textproto * sort failures lexicographically * add new files to exemption list * nit fixes * nit fixes * add kdocs * nit fix * nit fix * Trigger CI failure exclusively * Revert CI check failure * nit fix * nit fix * nit fixes * nit fixes * nit fixes * Add redundant exemptions check * rectify static_checks * Remove duplicate proto libraries * nit fixes * add activity to exemption * nit fixes * nit fixes * nit fixes * update branch
…3499) * Fix #3290: Add support for generic regex pattern matching * Apply review suggestions for proto location * Delete main directory * Implment script logic and tests * CI setup part 1 * syntax fix in yaml file * import nits in dummy file * Use regex patterns from script in script test * Make PR suggestions into effect * Make PR suggestions into effect * Make PR suggestions into effect * Improve naming of script_assets variables * Make PR suggestions into effect * Make PR suggestions * Make PR suggestions * Revamp testing approach * Fix #3291: Add check for XML syntax correctness * nit fixes * Introduce XML syntax check in static checks workflow * Fix #3292: Add check for test files presence for prod files * Make nit suggestions * Make nit suggestions * Make nit suggestions * Fix #3300: Add check for accessibility labels for activities * Add CI check for label presence for activities * Add ScriptConstants file to exemptions test list * Test if: always() * Revert "Test if: always()" This reverts commit b72e419 * Add if: always() * Add if: always() * Add if: always() * Apply review suggestions on PR * Make review suggestions from regex pattern checks * Implement review suggestions based on #3340 * Refactor PR as per feedback recieved * Implement feedback suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * nits * Nit fixes * Nit fixes * Nit fixes * Implement feedback suggestions as per #3340 * nit fix * nit fix * nit fix * nit fix * Review suggestions part 1 * Implement review suggestions part 2 * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * nit fix * Do review suggestions * Implement review suggestions * Implement review suggestions * nit fix * Implement review suggestions * Add Ben as a codeowner for the ScriptExemptions file * bazel files nit fix * Introduce a library for the regex assets * Make directory structure same as that of #3374 * Make directory structure similar to #3374 * add new files to test file script exemptions and nit fixes * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * remove testonly attribute from tests * add new files to script exemptions * nit fix * nit fix * nit fix * Apply review suggestions * ktlint fix * nit fix * Apply nit fixes * Apply nit fixes * Remove script constants * nit fix * add todo * add todo * nit fixes * add test * add testOnly * nit fixes * nit fix * nit fixes * nit fixes * nit fixes * nit fixes * fix textproto file * add exemptions to textproto * sort failures lexicographically * add new files to exemption list * nit fixes * nit fixes * add kdocs * nit fix * nit fix * Trigger CI failure exclusively * Revert CI check failure * Fix #3340: Create a script to ensure KDoc presence * Add initial tests * Add more tests and add documentation * nit fix * nit fix * nit fix * nit fix * Add more files to kdoc exemptions * nit fixes * nit fixes * nit fixes * Add redundant exemptions check * rectify static_checks * Remove duplicate proto libraries * nit fixes * nit fixes and add redundant exemptions check to script * nit fixes * add activity to exemption * nit fixes * nit fixes * nit fixes * nit fixes * nit fixes * update branch * nit fixes
* Generate maven_install.json * Add fail_if_repin_required attribute * Update rules_jvm_external version in versions.bzl and use fail_if_repin_required attribute in maven_install() * Fix bazel lint error. * Update code ownership for maven_install.json * Fix #3290: Add support for generic regex pattern matching * Apply review suggestions for proto location * Delete main directory * Implment script logic and tests * CI setup part 1 * syntax fix in yaml file * import nits in dummy file * Use regex patterns from script in script test * Make PR suggestions into effect * Make PR suggestions into effect * Make PR suggestions into effect * Improve naming of script_assets variables * Make PR suggestions into effect * Create maven_dependencies_list.kts and complete the parsing of the maven_install.json * Make PR suggestions * Make PR suggestions * Improve naming in script and add KDocs for data classes. * Add EOF for all classes. * Change data structure to store backup dependencies. * Revamp testing approach * nit fixes * Add maven re-pin command. * Add BUILD.bazel file and Test file for script.creatre-script-to-compile-list-of-maven-dependencies * Fix test build error. * Improve code. * Make nit suggestions * Try changing location of maven_install.json * Convert .kts to .kt * Save work. * Rename data classes. * Remove kscript. * Fix lints. * Apply review suggestions on PR * Refactor PR as per feedback recieved * Implement review suggestions * Set different output_base for bazel query command * nits * Nit fixes * nit fix * Change maven_install_json attribute * Move maven_install.json to third_party * Remove maven_install code ownership from CODEOWNERS * Save changes. * remove class * Fix errors * Review suggestions part 1 * Implement review suggestions part 2 * Fix broken script * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * Validate all Links. * nit fix * Implement review suggestions * bazel files nit fix * Introduce a library for the regex assets * Change structure of the script. * Make directory structure same as that of #3374 * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * save changes. * commit * nit fix * Add bazel pipeline to app module * save. * save. * save. * save. * save. * save. * nit fix * fix broken script * Fix bug of printing enum values in output. * Fix bug of printing enum values in output. * Apply review suggestions * ktlint fix * nit fix * Remove script constants * nit fix * Make script to call out the dependencies and licenses for which manual work needs to be completed. * add todo * Complete first script * Add first script to scripts package * Remove unwanted files * Remove extra files and fix formatting * Fix lints. * Remove unnecessary lines of code * Add comments for proto * Add test file. * Fix lints. * Add second script * Remove unwanted dependencies. * Add suggested changes. * Add test file * nit fixes * Fix lint. * add testOnly * Add pipeline to print actual dependencies' names * Fix nits * Add suggested changes. * Add suggested changes * add function to write license texts. * Update text proto * Update textproto * Update maven_dependencies.textproto * Update Licenses writing function * Write license name array * Always force https over http * Always force https over http * Correct origin type * Complete script * Fix lints. * Add support for escape characters. * Fix nits * Use common/BazelClient * Fix lints * Save progress * create test_maven_install.json * Add test cases * Create function to add license * Add more test cases * Fix lints * Correct typo * Add one more test case * Restructure script * Break script in two parts * Add DependencyListsProvider * Add DependencyListsProvider * correct query command * Correct structure of the script * Correct structure of the script * Fix not suggestions * Use * Add test file for NetworkAndBazelUtilsImpl.kt * Delete unwanted files * Delete unwanted files * Add library for GenerateLicenseTexts.kt * Add suggested changes * Add data classes to exemptions.textproto * Remove commented out code * Add KDocs for helper functions in GenerateLicenseTextsTest.kt * Remove unused variables * Delete unwanted proto file * Use createCDATASection instead of manually constructing it * Add suggested changes * Add suggested changes * Correct test case * Fix nit * Add changes as per the UI * Fix script to preserve text format of licenses * Remove extra lines of code * Add KDoc * Add suggested changes * Omit version from the dependency names in xml * Add suggested changes * Add suggested changes * Correct KDoc * Correct file paths in exemptions file * Revert unwanted chang. * Refactor 'data_lib' to 'data' * Add suggested changes * Fix lints * Correct deps in BUILD.bazel * Correct deps in BUILD.bazel * Nit fix * Nit fix * Nit fix * Nit fix * Use .map Co-authored-by: Sparsh1212 <[email protected]>
…nd correspond to an open issue on Github (#3508) * Fix #3290: Add support for generic regex pattern matching * Apply review suggestions for proto location * Delete main directory * Implment script logic and tests * CI setup part 1 * syntax fix in yaml file * import nits in dummy file * Use regex patterns from script in script test * Make PR suggestions into effect * Make PR suggestions into effect * Make PR suggestions into effect * Improve naming of script_assets variables * Make PR suggestions into effect * Make PR suggestions * Make PR suggestions * Revamp testing approach * Fix #3291: Add check for XML syntax correctness * nit fixes * Introduce XML syntax check in static checks workflow * Fix #3292: Add check for test files presence for prod files * Make nit suggestions * Make nit suggestions * Make nit suggestions * Fix #3300: Add check for accessibility labels for activities * Add CI check for label presence for activities * Add ScriptConstants file to exemptions test list * Test if: always() * Revert "Test if: always()" This reverts commit b72e419 * Add if: always() * Add if: always() * Add if: always() * Apply review suggestions on PR * Make review suggestions from regex pattern checks * Implement review suggestions based on #3340 * Refactor PR as per feedback recieved * Implement feedback suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * nits * Nit fixes * Nit fixes * Nit fixes * Implement feedback suggestions as per #3340 * nit fix * nit fix * nit fix * nit fix * Review suggestions part 1 * Implement review suggestions part 2 * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * nit fix * Do review suggestions * Implement review suggestions * Implement review suggestions * nit fix * Implement review suggestions * Add Ben as a codeowner for the ScriptExemptions file * bazel files nit fix * Introduce a library for the regex assets * Make directory structure same as that of #3374 * Make directory structure similar to #3374 * add new files to test file script exemptions and nit fixes * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * remove testonly attribute from tests * add new files to script exemptions * nit fix * nit fix * nit fix * Apply review suggestions * ktlint fix * nit fix * Apply nit fixes * Apply nit fixes * Remove script constants * nit fix * add todo * add todo * nit fixes * add test * add testOnly * nit fixes * nit fix * nit fixes * nit fixes * nit fixes * nit fixes * fix textproto file * add exemptions to textproto * sort failures lexicographically * add new files to exemption list * nit fixes * nit fixes * add kdocs * nit fix * nit fix * Trigger CI failure exclusively * Revert CI check failure * Fix #3340: Create a script to ensure KDoc presence * Add initial tests * Add more tests and add documentation * nit fix * nit fix * nit fix * nit fix * Add more files to kdoc exemptions * Implementation part 1 * add exemption proto for todos * nit fixes * delete open issues * nit fixes * nit fixes * Add redundant exemptions check * rectify static_checks * Remove duplicate proto libraries * nit fixes * nit fixes and add redundant exemptions check to script * nit fixes * add activity to exemption * nit fixes * nit fixes * nit fixes * nit fixes * revamption part 1 * nit fixes * update branch * Revamped approach * nit fixes * add kdocs * delete open_issues.json * Fix #3317: Update old todos * nit fixes * Remove resolved todos * Repurpose todos stage 1 * Repurpose todos stage 2 * updating todos part 3 * update more todos * add network module * update todo no. 322 * Remove unused imports * Revert "Remove unused imports" This reverts commit 65ee6e9. * Revert "update todo no. 322" This reverts commit c150cdc. * Repurpose no. 322 * nit fixes * replace issue number for backend model todo * link new filed issue * nit fixes * add exemptions * nit fixes * nit fixes * nit fixes * add remaining tests for all cases * nit fixes * nit fixes Co-authored-by: Sparsh Agrawal <[email protected]>
…to the closed issue (#3629) * Fix #3291: Add check for XML syntax correctness * nit fixes * Introduce XML syntax check in static checks workflow * Fix #3292: Add check for test files presence for prod files * Make nit suggestions * Make nit suggestions * Make nit suggestions * Fix #3300: Add check for accessibility labels for activities * Add CI check for label presence for activities * Add ScriptConstants file to exemptions test list * Test if: always() * Revert "Test if: always()" This reverts commit b72e419 * Add if: always() * Add if: always() * Add if: always() * Apply review suggestions on PR * Make review suggestions from regex pattern checks * Implement review suggestions based on #3340 * Refactor PR as per feedback recieved * Implement feedback suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * nits * Nit fixes * Nit fixes * Nit fixes * Implement feedback suggestions as per #3340 * nit fix * nit fix * nit fix * nit fix * Review suggestions part 1 * Implement review suggestions part 2 * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * nit fix * Do review suggestions * Implement review suggestions * Implement review suggestions * nit fix * Implement review suggestions * Add Ben as a codeowner for the ScriptExemptions file * bazel files nit fix * Introduce a library for the regex assets * Make directory structure same as that of #3374 * Make directory structure similar to #3374 * add new files to test file script exemptions and nit fixes * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * remove testonly attribute from tests * add new files to script exemptions * nit fix * nit fix * nit fix * Apply review suggestions * ktlint fix * nit fix * Apply nit fixes * Apply nit fixes * Remove script constants * nit fix * add todo * add todo * nit fixes * add test * add testOnly * nit fixes * nit fix * nit fixes * nit fixes * nit fixes * nit fixes * fix textproto file * add exemptions to textproto * sort failures lexicographically * add new files to exemption list * nit fixes * nit fixes * add kdocs * nit fix * nit fix * Trigger CI failure exclusively * Revert CI check failure * Fix #3340: Create a script to ensure KDoc presence * Add initial tests * Add more tests and add documentation * nit fix * nit fix * nit fix * nit fix * Add more files to kdoc exemptions * Implementation part 1 * add exemption proto for todos * nit fixes * delete open issues * nit fixes * nit fixes * Add redundant exemptions check * rectify static_checks * Remove duplicate proto libraries * nit fixes * nit fixes and add redundant exemptions check to script * nit fixes * add activity to exemption * nit fixes * nit fixes * nit fixes * nit fixes * revamption part 1 * nit fixes * update branch * Revamped approach * nit fixes * add kdocs * delete open_issues.json * Fix #3317: Update old todos * nit fixes * Remove resolved todos * Repurpose todos stage 1 * Repurpose todos stage 2 * Fix #3318: Add check to ensure all todos of closed issue are resolved * nit fixes * updating todos part 3 * add tests * update more todos * add network module * update todo no. 322 * correct if condition in workflow * Remove unused imports * Add duplicate comment check condition * nit fixes * Correct exit code * Revert "Remove unused imports" This reverts commit 65ee6e9. * Revert "update todo no. 322" This reverts commit c150cdc. * Repurpose no. 322 * nit fixes * replace issue number for backend model todo * add tests * link new filed issue * nit fixes * add exemptions * nit fixes * nit fixes * nit fixes * nit fixes * nit fixes * add remaining tests for all cases * nit fixes * nit fixes * nit fixes Co-authored-by: Sparsh Agrawal <[email protected]>
* Make nit suggestions * Make nit suggestions * Fix #3300: Add check for accessibility labels for activities * Add CI check for label presence for activities * Add ScriptConstants file to exemptions test list * Test if: always() * Revert "Test if: always()" This reverts commit b72e419 * Add if: always() * Add if: always() * Add if: always() * Apply review suggestions on PR * Make review suggestions from regex pattern checks * Implement review suggestions based on #3340 * Refactor PR as per feedback recieved * Implement feedback suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * Implement review suggestions * nits * Nit fixes * Nit fixes * Nit fixes * Implement feedback suggestions as per #3340 * nit fix * nit fix * nit fix * nit fix * Review suggestions part 1 * Implement review suggestions part 2 * nit fixes * update static_checks * add test to repository file * nit fix * nit fix * nit fix * Do review suggestions * Implement review suggestions * Implement review suggestions * nit fix * Implement review suggestions * Add Ben as a codeowner for the ScriptExemptions file * bazel files nit fix * Introduce a library for the regex assets * Make directory structure same as that of #3374 * Make directory structure similar to #3374 * add new files to test file script exemptions and nit fixes * diable ktlint max-line-length * disable ktlint-max-line * disable ktlint max-length * remove testonly attribute from tests * add new files to script exemptions * nit fix * nit fix * nit fix * Apply review suggestions * ktlint fix * nit fix * Apply nit fixes * Apply nit fixes * Remove script constants * nit fix * add todo * add todo * nit fixes * add test * add testOnly * nit fixes * nit fix * nit fixes * nit fixes * nit fixes * nit fixes * fix textproto file * add exemptions to textproto * sort failures lexicographically * add new files to exemption list * nit fixes * nit fixes * add kdocs * nit fix * nit fix * Trigger CI failure exclusively * Revert CI check failure * Fix #3340: Create a script to ensure KDoc presence * Add initial tests * Add more tests and add documentation * nit fix * nit fix * nit fix * nit fix * Add more files to kdoc exemptions * Implementation part 1 * add exemption proto for todos * nit fixes * delete open issues * nit fixes * nit fixes * Add redundant exemptions check * rectify static_checks * Remove duplicate proto libraries * nit fixes * nit fixes and add redundant exemptions check to script * nit fixes * add activity to exemption * nit fixes * nit fixes * nit fixes * nit fixes * revamption part 1 * nit fixes * update branch * Revamped approach * nit fixes * add kdocs * delete open_issues.json * Fix #3317: Update old todos * nit fixes * Remove resolved todos * Repurpose todos stage 1 * Repurpose todos stage 2 * Fix #3318: Add check to ensure all todos of closed issue are resolved * nit fixes * updating todos part 3 * add tests * update more todos * add network module * update todo no. 322 * correct if condition in workflow * Remove unused imports * Add duplicate comment check condition * nit fixes * Correct exit code * Revert "Remove unused imports" This reverts commit 65ee6e9. * Revert "update todo no. 322" This reverts commit c150cdc. * Repurpose no. 322 * nit fixes * replace issue number for backend model todo * add tests * link new filed issue * nit fixes * add exemptions * nit fixes * nit fixes * nit fixes * nit fixes * nit fixes * add remaining tests for all cases * point error messages to wiki * nit fixes * nit fixes * nit fixes * nit fixes * log check medication only once * reference exact urls * correct flaky test Co-authored-by: Sparsh Agrawal <[email protected]>
Fix part of #2691
Explanation
This PR introduces a new version of the compute_affected_tests script that exists in Kotlin instead of Bash.
The main reason for doing this is the new script includes code to fix situations where Bazel outputs malformed query results (e.g. when two targets are on the same line). It's not yet clear whether these issues are caused by Bazel or Bash, but they only happen in CI (i.e. can't be reproduced locally) on occasional PRs (such as #3340). This version of the script builds in resilience to such failures.
There are a number of other benefits that we see moving to Kotlin, as well:
Beyond that, three other things to note:
Long-term, we'll likely want to move all of our scripts over to Kotlin to reduce the total number of languages needed for the repository by 1.
Checklist