-
Notifications
You must be signed in to change notification settings - Fork 440
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
Replace custom caching with Gradle's incremental build #1187
Replace custom caching with Gradle's incremental build #1187
Conversation
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!
Have you checked it against the 2.2.x od spring cloud contract samples?
I'm trying to do it now. So far checked against two projects: one from there, that was failing before and one my private sample. Is there some way to check it against |
You can run the scripts in the scripts folder. One is responsible for running the gradle tests. |
c30ab90
to
66b79c8
Compare
I executed that script and found a couple more issues with |
66b79c8
to
1fbaf3a
Compare
@marcingrzejszczak is there some new issue with CI? It's now constantly failing with |
1fbaf3a
to
7972177
Compare
Found one more issue there: in the copy contracts task |
So I executed In the
Looks like this: Getting another error. Seems to be some issue with that module...
Skipped for now.
@marcingrzejszczak if you have those two set up locally - can you pls, check if they work for you? (with my latest changes) Consumer module got some failed tests. I didn't check that further because didn't actually touch that part. |
|
Meh, I'll check it out |
So
good idea. I thought that it was portable but apparently it's not. |
Well, it's broken for me in both: master and 2.2.x branch and if it works for you in master then it's definitely something with my local setup... Could you pls, check if it works for you in branch 2.2.x with gradle plugin from this PR or suggest how to run it locally so that I can do it? Currently that's the only producer I didn't check against this PR. All other producers seem to work fine. |
😬 how does it fail for you locally? What is the problem? |
@marcingrzejszczak check my comment with two big stacktraces above. ( |
change
to
you're missing one |
Oh, I see... Thanks! :) With that it all works fine! (almost, see below) So all producers are good with this PR.
|
Ok so please resolve the conflicts and let's merge it. I'm still working on the build stability ;) |
Replaced custom caching of the downloaded contracts with Gradle's incremental build. After that `InitContractsTask` is not needed any more, as its main purpose was to be a bridge between custom caching and Gradle's one. Simplified code to download contracts is now part of the `ContractsCopyTask`. Also fixed `PublishStubsToScmTask` and removed incremental stuff from there for now. Fixes spring-cloudgh-1133
7972177
to
f05fc75
Compare
The latest build (synced with the latest master) failed with:
|
Meh, it's all about CircleCI and the memory. I think I've managed to finally fix it. Other than that I'll just merge this. |
Cool, thx! Let me know if there are other issues caused by my PR. |
The following DSL fails to work and it used to: contracts {
baseClassForTests = "com.example.demo.BaseClass"
contractsPath = "/"
// pre Grenwich (2.1.0)
contractsSnapshotCheckSkip = true
contractRepository {
repositoryUrl('http://localhost:8081/artifactory/libs-release-local')
}
setContractsMode("REMOTE")
contractDependency {
groupId = project.group
artifactId = project.name
delegate.classifier = "stubs"
delegate.version = getProp("latestProductionVersion")
}
} due to
so apparently methods that used to have closures don't work anymore |
Weird that is tries to get it from:
And I would expect it to be looking for that |
Maybe it's related to the fact that
|
That might have been an issue with Gradle cache. Gradle's incompatibility with local maven repo is astonishing. |
Oh, ok. So it works? |
Replaced custom caching of the downloaded contracts with Gradle's
incremental build. After that
InitContractsTask
is not needed anymore, as its main purpose was to be a bridge between custom caching
and Gradle's one. Simplified code to download contracts is now part of
the
ContractsCopyTask
.Fixes gh-1133