-
Notifications
You must be signed in to change notification settings - Fork 10
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
Js2pGenerationTask does not configure input path as relative #960
Comments
Thank you for an issue. I never met this case before and I'm glad to know that gradle can be parallelized on Jenkins on different VMs. |
I'd like to have an integration test for that. Is it possible to do this on GitHub? Should it be a separate repo? Would you like to implement it? |
Also I don't know which version you're using. In plugin version 6.0.0, configuration has this annotation already. In unreleased implementation, [PluginConfigJs2pIO.source](https://github.com/jsonschema2dataclass/js2d-gradle/blob/84923ed6c1fdc55bf646ba4ab39c468e42454164/plugin-gradle/common/src/main/kotlin/org/jsonschema2dataclass/ext/Js2pExtension.kt#L45-L47C18 currently have annotation |
We use v6.0.0 of the plugin. I checked the code too and was surprised to see the Gradle cannot be parallelized on Jenkins on different VMs. What I meant is that build results written to a remote build cache on Jenkins can be reused in a local build. This requires identical task inputs, and the path is one of them. You can see here a description of how to test it manually, but I don't know how to write a test for it. |
Do you know other plugins which uses input files and which cache can actually be used locally and remotely. N.B. I probably won't be looking into gradle source code as it's not so readable as I'd like to. |
You can check the spotbugs-gradle-plugin for example. |
Thank you, it will be a great help |
Js2pGenerationTask
is configured as@CacheableTask
, but does not configurePathSensitivity
asRELATIVE
.As a result, while using distributed Gradle build cache with CI machine (e.g. Jenkins), cached results from CI cannot be reused on a local build due to the different absolute paths of the input files.
For example:
Since absolute paths are not identical and the task does not use relative paths this scenario results in a cache miss. Reusing cache entries created by CI server is very desirable since it greatly speeds up local builds.
The text was updated successfully, but these errors were encountered: