[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17856251#comment-17856251 ] Patrik Dudits commented on MBUILDCACHE-73: -- Yes, the issue with {{project.version}} is solved. However I'd rather extend title to be able to use arbitrary expression in reconcilation. Or do I create a new one? > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17856246#comment-17856246 ] Xaver commented on MBUILDCACHE-73: -- I think this Issue may be closed. With MBUILDCACHE-81 / https://github.com/apache/maven-build-cache-extension/pull/129 the {{calculateProjectVersionChecksum}} attribute was added > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804848#comment-17804848 ] Xaver commented on MBUILDCACHE-73: -- Hi there, V1.0.1 works awesome (we use it in a large multi module project and reduced computation costs of CI/CD by ~80%)! Thanks a lot for it. I think that the merge of [PR#117|https://github.com/apache/maven-build-cache-extension/pull/117] / MBUILDCACHE-76 was a mistake. Please look at the [description of the extension|https://maven.apache.org/extensions/maven-build-cache-extension/]: {panel:title=A combination of features achieves that:} Version normalization supports project *version agnostic caches* {panel} Other modern build tools I know (e.g. gradle, nx.dev) use version agnostic caches. I really missed this feature a lot. Please don't close this issue. It's important for many use cases that the version is optional for checksum calculation. Thank you from a happy 1.0.1 user. > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17800027#comment-17800027 ] Olivier Lamy commented on MBUILDCACHE-73: - the PR of the linked issue has been merged. this doesn't fix exactly the title of this issue but could be closed as well. > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17795202#comment-17795202 ] Patrik Dudits commented on MBUILDCACHE-73: -- I was describing the three builds around maven release, so yes you've understood it right, only once after version change. I just liked the elegance of cache handling it instead. So to summarize: * I agree, that making version part of hash is good default * I'm not very happy it's would not be configurable (but the default will likely make more people happy) * There are still usecases of invalidating plugin execution based on properties (that are not necessarily project.version) that are not their parameters, so the extension of reconcilation is still an useful idea. > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17794894#comment-17794894 ] Olivier Lamy commented on MBUILDCACHE-73: - simply skip test during release:prepare or perform or even both. regarding your line 1.1-SNAPSHOT, regular build , cache with version Full Build. Really?? I guess only once after version change or any source change > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17794727#comment-17794727 ] Patrik Dudits commented on MBUILDCACHE-73: -- {quote}TBH this is the simple (and natural) solution for this. {quote} I agree that that's simple and obvious solution. {quote}Maven is always based on gav so why not here as well{quote} Because then it is not possible to utilize cache to improve natural Maven release flow, which has always been bit wasteful. Especially since my project is bit on the larger side, and has quite long integration test phase. Let's compare the current and future situation: ||Action||Cache without version||Cache with version|| |1.0-SNAPSHOT, release:prepare|Cache utilized|version changes during prepare, no cache, Full 1h build| |1.0, release:perform|Full 1h build, because I turn off cache for release builds|Full Build| |1.1-SNAPSHOT, regular build|Cache utilized (but misses deploy)|Full Build| So with version being part of has I will get 2 extra full builds, going from 1 hour to 3 hours build time. That's why the proposed solution doesn't make me happy, even if it is appropriate. I'd rather have it optional (but turned on by default). There are some other cases when I would still welcome reconcilation expression. One of them would be that I want to rebuild docker image whenever base image changes. I can run a script before the build to extract current tag of base images and export them in environment. I would then want this environment value to drive whether I want to execute docker:build. > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17794603#comment-17794603 ] Olivier Lamy commented on MBUILDCACHE-73: - [~pdudits] but this will run only once :) TBH this is the simple (and natural) solution for this. Maven is always based on gav so why not here as well :) > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17794430#comment-17794430 ] Patrik Dudits commented on MBUILDCACHE-73: -- It's bittersweet solution – it definitely helps this case, it definitely is better default setting with less surprises (as forcing install and deploy is not necessary), but I will miss the behavior of not running 1 hour of integration tests in the project when only thing that changes is version from {{x.y.0}} to {{{}x.y.1-SNAPSHOT{}}}. I'd really welcome if there would be a way to fine tune this. > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17793668#comment-17793668 ] Olivier Lamy commented on MBUILDCACHE-73: - PR available here https://github.com/apache/maven-build-cache-extension/pull/117 please let us know if this help your use case. > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MBUILDCACHE-73) Add project version as additional property for reconcilation
[ https://issues.apache.org/jira/browse/MBUILDCACHE-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17793523#comment-17793523 ] Olivier Lamy commented on MBUILDCACHE-73: - ideally we could simply add the project.version part of the checksum calculation > Add project version as additional property for reconcilation > > > Key: MBUILDCACHE-73 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-73 > Project: Maven Build Cache Extension > Issue Type: New Feature >Affects Versions: 1.0.1 >Reporter: Patrik Dudits >Priority: Major > > Certain plugins or goals might require to run when project version changes > regardless of other inputs. A typical example would be {{deploy:deploy}} or > in my specific case {{docker:build}} - It is OK to reuse the build artifact, > but if version changed, I do want to upload it. > Currently only way to achieve that is to put the goal into {{runAlways}} > section. But that results in needles snapshots to be deployed or docker > images being built even if there's no relevant change. > The reconcile section allows to specify properties for futher fine tuning the > input. These are limited to goal parameters, and neither of my examples > contain project version as a parameter, both use project model to fetch it. > Proposal would be to extend tag {{reconcile}} either with: > * special magic name {{project.version}} to include version tracking, so > this could be achieved by {{}} > * attribute {{{}expression{}}}, to achieve the result with {{ propertyName="version" expression="${project.version}"/>}} > * interpolating {{defaultValue}} attribute > The second form would be preferrable as it has much larger scale of > application, I can imagine putting base docker image digests in environment > variable to invalidate builds when base tag gets updated. It is also more > discoverable than third option. -- This message was sent by Atlassian Jira (v8.20.10#820010)