Saving repository with empty commandTimeout breaks repositorySettings.action

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. In repository configuration page, expand the advanced options
      2. substitute the timeout value with empty string, blank space or text value
      3. save the repository

      Expected Results

      Bamboo should prevent you from saving the repository configuration with a validation error.

      Actual Results

      Bamboo will save the repository configuration with empty string for commandTimeout

      After saving a repository with empty string the /admin/repositorySettings.action page will fail to open with the following error:

      022-10-13 09:44:58,570 ERROR [https-jsse-nio-8443-exec-15] [runtime] Error executing FreeMarker template
      FreeMarker template error:
      An error has occurred when reading existing sub-variable "cacheDescriptions"; see cause exception! The type of the containing value was: extended_hash+string (com.atlassian.bamboo.plugins.git.GitRepository wrapped into f.e.b.StringModel)
      
      ----
      FTL stack trace ("~" means nesting-related):
      	- Failed at: #list cacheProvider.cacheDescriptions...  [in template "admin/repositorySettings.ftl" in macro "manageCachesTab" at line 78, column 17]
      	- Reached through: @ww.form action="repositorySettingsDe...  [in template "admin/repositorySettings.ftl" in macro "manageCachesTab" at line 39, column 9]
      	- Reached through: @manageCachesTab  [in template "admin/repositorySettings.ftl" at line 19, column 9]
      	~ Reached through: #nested  [in template "lib/dojo.ftl" in macro "contentPane" at line 98, column 5]
      	~ Reached through: @dj.contentPane labelKey="manageCache...  [in template "admin/repositorySettings.ftl" at line 18, column 5]
      	~ Reached through: #nested  [in template "lib/dojo.ftl" in macro "tabContainer" at line 66, column 5]
      	~ Reached through: @dj.tabContainer headingKeys=["manage...  [in template "admin/repositorySettings.ftl" at line 17, column 1]
      ----
      
      Java stack trace (for programmers):
      ----
      freemarker.core._TemplateModelException: [... Exception message was already printed; see it above ...]
      	at freemarker.ext.beans.BeanModel.get(BeanModel.java:185)
      	at freemarker.core.Dot._eval(Dot.java:43
      

      Workaround

      • Find in the database which are the repositories that are saved with empty commandTimeout
        SELECT
            *
        FROM
            vcs_location
        WHERE
            xml_definition_data LIKE '%<string>repository.git.commandTimeout</string><string></string>%';
        
      • re-save the repositories with correct commandTimeout value

       

            Assignee:
            Mateusz Szmal
            Reporter:
            Zaro (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: