[
https://issues.apache.org/jira/browse/MBUILDCACHE-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17538171#comment-17538171
]
ASF GitHub Bot commented on MBUILDCACHE-20:
-------------------------------------------
AlexanderAshitkin commented on PR #14:
URL:
https://github.com/apache/maven-build-cache-extension/pull/14#issuecomment-1128838217
> > > @maximilian-novikov @maximilian-novikov-db could you have a look at
this one ? I don't really understand why the remote cache would have to be
checked before the local one...
>
> >
>
> > that's the good question, probably that's the legacy logic, which
doesn't make sense after @AlexanderAshitkin added 'proper' plugins input
reconciliation
>
> >
>
> > i would just fix this, without introducing a new flag
>
>
>
> Ok, I'll simplify the PR then.
Hi
The idea was to use the same artifact across all the cache consumers. By
looking in the remote first it's possible to avoid using locally built
artifacts and cached binaries should become eventually consistent across all
nodes, even if remote cache was overridden. I cannot recall other implications
except that, but discrepancies theoretically possible if binaries compared
directly(snapshots?). But definitely local first lookup will work in majority
of cases
> Allow configuring whether local or remote builds should be preferred
> --------------------------------------------------------------------
>
> Key: MBUILDCACHE-20
> URL: https://issues.apache.org/jira/browse/MBUILDCACHE-20
> Project: Maven Build Cache Extension
> Issue Type: Improvement
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.0.0-alpha
>
>
> Currently, a remote lookup is done first and if none succeeds, a lookup of a
> previous local build is done (for a given input checksum). I don't really
> understand the benefit of this and I think it should be reversed, or at least
> made configurable.
> The code is at:
> https://github.com/apache/maven-build-cache-extension/blob/a3a44e72404228c536b5a8c21d2e67f0183452a1/src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java#L169-L187
--
This message was sent by Atlassian Jira
(v8.20.7#820007)