-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Pass more information to top exception on build cache load/store failure #19672
Conversation
...-cache/src/main/java/org/gradle/caching/internal/controller/DefaultBuildCacheController.java
Outdated
Show resolved
Hide resolved
subprojects/execution/src/main/java/org/gradle/internal/execution/steps/BuildCacheStep.java
Outdated
Show resolved
Hide resolved
...ects/execution/src/test/groovy/org/gradle/internal/execution/steps/BuildCacheStepTest.groovy
Outdated
Show resolved
Hide resolved
...-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/AbstractIntegrationSpec.groovy
Show resolved
Hide resolved
...s/core/src/integTest/groovy/org/gradle/api/tasks/CacheTaskArchiveErrorIntegrationTest.groovy
Outdated
Show resolved
Hide resolved
...s/core/src/integTest/groovy/org/gradle/api/tasks/CacheTaskArchiveErrorIntegrationTest.groovy
Outdated
Show resolved
Hide resolved
subprojects/execution/src/main/java/org/gradle/internal/execution/steps/BuildCacheStep.java
Outdated
Show resolved
Hide resolved
03572b3
to
bd977fa
Compare
8b1e038
to
b21c17c
Compare
b21c17c
to
f89c3e8
Compare
...s/core/src/integTest/groovy/org/gradle/api/tasks/CacheTaskArchiveErrorIntegrationTest.groovy
Outdated
Show resolved
Hide resolved
@bot-gradle test this |
OK, I've already triggered the following builds for you: |
@@ -217,7 +217,7 @@ class BuildCacheStepTest extends StepSpec<IncrementalChangesContext> implements | |||
|
|||
then: | |||
def ex = thrown Exception | |||
ex.message == "Failed to store cache entry $cacheKeyHashCode for job ':test': store failure" | |||
ex.message == "Failed to store cache entry 30a042b90a for job ':test': store failure" |
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.
Is this intentional? Why not use the variable instead?
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.
Yes, it is. This was not changed when fixing: #19672 (comment)
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.
@bot-gradle test and merge |
Your PR is queued. See the queue page for details. |
OK, I've already triggered a build for you. |
Now we pass more information to the top-level exception.
If previously exception was like:
Then top-level exception message looks like this now for load operation:
Also, we don't say anymore:
Build cache entry xxx from local build cache is invalid
since this might be confusing. It is changed to:Exception occurred while loading cache entry xxx from local build cache
I also changed the error for store operation to have similarly more information on the top-level as load has.
Fixes #17208