You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "tylerbertrand (via GitHub)" <gi...@apache.org> on 2023/09/05 19:15:59 UTC

[GitHub] [jmeter] tylerbertrand opened a new pull request, #6072: Resolve checkstyle cache miss

tylerbertrand opened a new pull request, #6072:
URL: https://github.com/apache/jmeter/pull/6072

   ## Description
   
   Resolves a cache miss caused by an absolute path present in Checkstyle's `configProperties` extension property. The `cache_file` entry in `configProperties` was previously being set to the absolute path of the cache file.
   
   The value of the `cache_file` entry has been updated to the relative path to the cache file from Checkstyle's `configDir`. The value of `configDir` is available in `checkstyle.xml` as `config_loc`, per the Gradle documentation [here](https://docs.gradle.org/current/userguide/checkstyle_plugin.html#sec:checkstyle_built_in_variables). In `checkstyle.xml`, the `cache_file` relative path is then appended to `config_loc` to construct the full path to the cache file. 
   
   Updating `configProperties` to only contain relative paths avoids cache misses that may occur based on the absolute path of the repository.
   
   [Task input comparison showing `configProperties` differences causing a cache miss](https://ge.solutions-team.gradle.com/c/yu4dqq4vajkfw/enu64pu3chb7e/task-inputs?cacheability=cacheable,overlapping-outputs,validation-failure)
   [Task input comparison showing no differences in inputs with this fix applied](https://ge.solutions-team.gradle.com/c/o76h3xk77gcpy/jsxrvevjg3zcc/task-inputs?cacheability=cacheable,overlapping-outputs,validation-failure)
   
   ## Motivation and Context
   
   Avoiding absolute paths in input properties ensures that the project can take full advantage of both the local and remote build caches from either local or CI builds independent of the absolute path of the repository.
   
   ## How Has This Been Tested?
   
   Running a clean build shows that the Checkstyle cache file is still written at the correct path - `build/checkstyle/cacheFile`.
   
   Gradle's [build validation scripts](https://github.com/gradle/gradle-enterprise-build-validation-scripts/blob/main/Gradle.md) show [`configProperties` input differences](https://ge.solutions-team.gradle.com/c/yu4dqq4vajkfw/enu64pu3chb7e/task-inputs?cacheability=cacheable,overlapping-outputs,validation-failure) before this fix was applied, and [no input differences](https://ge.solutions-team.gradle.com/c/o76h3xk77gcpy/jsxrvevjg3zcc/task-inputs?cacheability=cacheable,overlapping-outputs,validation-failure) with the fix applied.
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Delete as appropriate -->
   - Bug fix (non-breaking change which fixes an issue)
   
   ## Checklist:
   <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
   <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
   - [x] My code follows the [code style][style-guide] of this project.
   - [ ] I have updated the documentation accordingly.
   
   [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] vlsi merged pull request #6072: Resolve checkstyle cache miss

Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi merged PR #6072:
URL: https://github.com/apache/jmeter/pull/6072


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org