[ 
https://issues.apache.org/jira/browse/MBUILDCACHE-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875011#comment-17875011
 ] 

Réda Housni Alaoui edited comment on MBUILDCACHE-104 at 8/20/24 9:49 AM:
-------------------------------------------------------------------------

Thinking more about this, I may need to have these zones at the local cache 
level in addition to the remote cache level.

So maybe a better way to do this would be to introduce a concept of cache zone 
with 2 categories: read/write. A cache zone would mostly materialize as a name 
given to a subdirectory of the entry checksum directory. With this in place, 
the cache zone would propagate naturally to the remote without having to 
specify multiple remote url.

I updated the description in this direction.


was (Author: ralaoui):
Thinking more about this, I may need to have these zones at the local cache 
level in addition to the remote cache level.

So maybe a better way to do this would be to introduce a concept of cache zone 
with 2 categories: read/write. A cache zone would mostly materialize as a name 
given to a subdirectory of the entry checksum directory. With this in place, 
the cache zone would propagate naturally to the remote without having to 
specify multiple remote url.

> Allow multiple cache entries per checksum
> -----------------------------------------
>
>                 Key: MBUILDCACHE-104
>                 URL: https://issues.apache.org/jira/browse/MBUILDCACHE-104
>             Project: Maven Build Cache Extension
>          Issue Type: New Feature
>            Reporter: Réda Housni Alaoui
>            Priority: Major
>
> 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*.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to