[MGNLACTIVATION-82] ActivationCommand handling of version RepositoryException is not complete Created: 19/Feb/14  Updated: 16/Apr/14  Resolved: 14/Mar/14

Status: Closed
Project: Activation
Component/s: None
Affects Version/s: 5.2.2
Fix Version/s: 5.2.4

Type: Bug Priority: Major
Reporter: Dean Pullen Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: quickwin, support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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
Date of First Response:

 Description   

Line 100-107:

 if (StringUtils.isNotEmpty(getVersion())) {
            try {
                thisState = thisState.getVersionedContent(getVersion());
            } catch (RepositoryException re) {
                // TODO: is this correct? should not we fail completely rather then silently ignore versions?
                log.error("Failed to get version " + getVersion() + " for " + thisState.getHandle() + ". Activating current content instead.", re);
            }
        }

ActivationCommand.activateUpdate has a todo in it:

// TODO: is this correct? should not we fail completely rather then silently ignore versions?

The RepositoryException is logged but ultimately ignored and the previous version activated, without any notification to the end users.

The method should, at least, return a false for the success of the action.



 Comments   
Comment by Dean Pullen [ 19/Feb/14 ]

Additionally this occurs similarly, without the 'todo' lines 35-49 in the execute method:

if (StringUtils.isNotEmpty(getVersion())) {
                try {
                    thisState = thisState.getVersionedContent(getVersion());
                } catch (RepositoryException re) {
                    log.error("Failed to get version " + getVersion() + " for " + thisState.getHandle(), re);
                }
            }
Comment by Daniel Lipp [ 21/Feb/14 ]

Hi Dean,

I moved the ticket to the proper JIRA module (MGNLACTIVATION) and also changed prio + type.

Thx for reporting
Daniel

Generated at Sun Feb 11 22:59:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.