Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-42438

UpgradeManager has a major liability in the way it instantiates classes

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.

      The code in UpgradeManager is broken. It silently ignores any upgrade task class that cannot be instantiated and moves on :

                  while (actions.hasMoreElements())
                  {
                      final Element action = (Element) actions.nextElement();
                      final String className = action.getElement("class").getTextString();
                      try
                      {
                          final UpgradeTask task = (UpgradeTask) JiraUtils.loadComponent(className, this.getClass());
      
                        .....
                          }
                      }
                      catch (final Exception e)
                      {
                          log.error("Exception loading type: " + className, e);
                      }
                  }
              }
      

      See the capture exception, log and move on. This THROWS the faulty upgrade task OUT Of the set, eg never puts in in there, and then the system will happily run all other stuff.

      This is a major liability to JIRA. Data upgrades are the "assurance" that your systems data is in a well known and consistent state.

      This issue is to capture JUST the changes need in UpgradeManagerImpl

      Attachments

        Issue Links

          Activity

            People

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              bbaker ɹǝʞɐq pɐɹq
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: