apache / apache/maven-build-cache-extension
[MBUILDCACHE-85] Changing cache configuration `attachedOutputs` still leads to cache hit instead of a miss
- Dominant language
- Java
- Stars
- 163
- Forks
- 77
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 4
Description
**[Réda Housni Alaoui](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=ralaoui)** opened **[MBUILDCACHE-85](https://issues.apache.org/jira/browse/MBUILDCACHE-85?redirect=false)** and commented
I have made a first build without configuring `attachedOutputs` that produced an entry in the local build cache.
After realizing that my project requires `.class` files to be restored to target folders, I configured `attachedOutputs` as follow:
```xml
classes
test-classes
maven-status
```
Despite the configuration change, new builds use the cache populated by the old configuration. The .class are still not restored. The only way to fix the issue is to manually remove old cache entries.
I think that a build using cache configuration v2 should not use the cache produced by cache configuration v1. Said differently, 2 different cache configurations should lead to 2 different cache entries.
---
No further details from [MBUILDCACHE-85](https://issues.apache.org/jira/browse/MBUILDCACHE-85?redirect=false)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with an initial build without attachedOutputs, then a second build using the shown attachedOutputs configuration. Trace how these configurations affect cache entries and verify that the second build does not reuse the first entry and restores the configured .class files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100