apache / apache/maven-build-cache-extension
[MBUILDCACHE-104] Allow multiple cache entries per checksum
- 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-104](https://issues.apache.org/jira/browse/MBUILDCACHE-104?redirect=false)** and commented
I have the following use case: a CI pipeline with a compile step **then** multiple parallelized test steps. Tests are split in 3 groups. Each test group execution specify the group via maven-surefire-plugin:test property 'groups'.
Maven phase for compilation: process-test-classes
Maven phase for tests: verify
The compilation should use remote cache as much as possible and end up populating it.
Each test execution should either use the populated cache ending with process-test-classes phase or a cache representing the result of the execution of the current test group (value for 'groups').
The issue I have is that this extension can only store a single cache entry per input checksum. But I need to persist the build result of each test group.
The easiest solution I can think of is having 4 cache zones. The first for the compile phase (the default zone), the 3 remaining for each test group.
I need the compile phase to read/write from/to the default cache zone.
I need each test group to read from its own cache zone then the default cache zone, **in this order**. At the end, it should write to its own cache zone.
---
**Remote Links:**
- [GitHub Pull Request #175
](https://github.com/apache/maven-build-cache-extension/pull/175)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing pull request #175 and the Maven lifecycle phases named in the issue: process-test-classes and verify. Trace how the maven-surefire-plugin:test groups property affects cache reads and writes. Done means separate cache zones can preserve each test group's result while reads follow the requested group-then-default order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100