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

ASF GitHub Bot commented on MBUILDCACHE-104:
--------------------------------------------

AlexanderAshitkin commented on PR #175:
URL: 
https://github.com/apache/maven-build-cache-extension/pull/175#issuecomment-2315327113

   > Of course, I can still open a discussion on the mailing list for such a 
large change.
   
   I'm trying to understand that is causing issues and what type of issues it 
is, in this case with different `<groups>` plugin parameters. 
   
   > The problem I'm facing is that the extension can only store one cache 
entry per input checksum, but I need to save the build result of each test 
group.
   
   Different plugin parameters result in different hash sums, and these 
different checksums are stored separately. If there are 3 different build 
configurations (though profiles or command line parameters) with 3 different 
groups, it yields 3 different cache records under different checksums. This 
makes different checksums equivalent to different zones.
   
   Another point that's unclear to me is the statement:
   
   > But I need to persist the build result of each test group.
   
   I don't see any problem using classifiers or some other method to 
differentiate artifacts stored in the build. If we split build in logical 
parts, we must consider the case of the next plugins, which depend on the 
"zoned" cache records. And it must run consistently with the non-cached build.
   
   From what I understand now, this scenario is already supported. There are 
two options: 
   1. Having 3 different runs with 3 different groups resulting in 3 different 
cache records under different checksums.
   2. Within a single build, using the same checksum but storing the results 
using group-specific classifiers.
   
   We also should consider, that if the plugins in questions are not leaf 
plugins. Overall, I would like to better understand the problem, starting with 
the build configuration and the use case.




> 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
>              Labels: pull-request-available
>
> 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.



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

Reply via email to