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

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

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


##########
src/main/java/org/apache/maven/buildcache/Zone.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.buildcache;
+
+import org.apache.commons.lang3.StringUtils;
+
+import static java.util.Objects.requireNonNull;
+
+/**

Review Comment:
   having a descriptive class annotation will be helpful





> 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