[MAGNOLIA-5715] VersionHandlers must not install delta's for future version Created: 14/Mar/14 Updated: 01/Aug/14 Resolved: 20/Mar/14 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 4.5.17 |
| Fix Version/s: | 4.5.18, 5.2.4, 5.3 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Richard Gange | Assignee: | Daniel Lipp |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | quickwin, support | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Release notes required: |
Yes
|
||||
| Date of First Response: | |||||
| Description |
| Comments |
| Comment by Richard Gange [ 14/Mar/14 ] |
|
The reason I point to the AbstractModuleVersionHandler in the title is because I believe an easy fix would be to add an additional control statement to check version being installed against the version of the delta. /**
* Registers the delta needed to update to version v from the previous one.
* Adds a Task to update the module version in the repository.
*/
protected void register(Delta delta) {
final Version v = delta.getVersion();
if (allDeltas.containsKey(v)) {
throw new IllegalStateException("Version " + v + " was already registered in this ModuleVersionHandler.");
}
delta.getTasks().addAll(getDefaultUpdateTasks(v));
delta.getConditions().addAll(getDefaultUpdateConditions(v));
allDeltas.put(v, delta);
}
|
| Comment by Daniel Lipp [ 19/Mar/14 ] |
|
We decided to fix in two flavors:
|
| Comment by Daniel Lipp [ 20/Mar/14 ] |
|
as git-bridge is currently not working for this issue, here's the direct links: 5.3: https://git.magnolia-cms.com/gitweb/?p=magnolia_main.git;a=commit;h=8ea83f6b0bd73571cf539e7276d4fd091a8f7a46 |