Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20070

XML stored in database should have valid XML format

      Issue

      When selecting Use custom artifact handler settings under Plan configuration >> Miscellaneous >> Artifact handlers OR running Java Bamboo Specs, malformed XML tag(s) get added to build_definition.xml_definition_data. This prevent SQL XPATH from running due to XML malformation.

      Bamboo Specs sample

      .put("artifactHandlers", new MapBuilder()
          .put("comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:enabledForShared", "false")
          .put("comAtlassianBambooPluginArtifactHandlerLocal:ServerLocalArtifactHandler:enabledForNonShared", "true")
          .put("comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:enabledForNonShared", "false")
          .put("comAtlassianBambooPluginArtifactHandlerRemote:BambooRemoteArtifactHandler:enabledForShared", "false")
          .put("useCustomArtifactHandlers", "false")
          .put("comAtlassianBambooPluginArtifactHandlerLocal:ServerLocalArtifactHandler:enabledForShared", "true")
          .put("comAtlassianBambooPluginArtifactHandlerRemote:AgentLocalArtifactHandler:enabledForShared", "true")
          .put("comAtlassianBambooPluginArtifactHandlerRemote:BambooRemoteArtifactHandler:enabledForNonShared", "false")
          .put("comAtlassianBambooPluginArtifactHandlerRemote:AgentLocalArtifactHandler:enabledForNonShared", "false")
          .build())
      

      Result in database

      <artifactHandlers>
        <comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:enabledForShared>false</comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:enabledForShared>
        <comAtlassianBambooPluginArtifactHandlerRemote:BambooRemoteArtifactHandler:enabledForShared>false</comAtlassianBambooPluginArtifactHandlerRemote:BambooRemoteArtifactHandler:enabledForShared>
        <comAtlassianBambooPluginArtifactHandlerLocal:ServerLocalArtifactHandler:enabledForNonShared>true</comAtlassianBambooPluginArtifactHandlerLocal:ServerLocalArtifactHandler:enabledForNonShared>
        <comAtlassianBambooPluginArtifactHandlerRemote:AgentLocalArtifactHandler:enabledForNonShared>false</comAtlassianBambooPluginArtifactHandlerRemote:AgentLocalArtifactHandler:enabledForNonShared>
        <comAtlassianBambooPluginArtifactHandlerRemote:AgentLocalArtifactHandler:enabledForShared>true</comAtlassianBambooPluginArtifactHandlerRemote:AgentLocalArtifactHandler:enabledForShared>
        <comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:enabledForNonShared>false</comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:enabledForNonShared>
        <comAtlassianBambooPluginArtifactHandlerLocal:ServerLocalArtifactHandler:enabledForShared>true</comAtlassianBambooPluginArtifactHandlerLocal:ServerLocalArtifactHandler:enabledForShared>
        <useCustomArtifactHandlers>false</useCustomArtifactHandlers>
        <comAtlassianBambooPluginArtifactHandlerRemote:BambooRemoteArtifactHandler:enabledForNonShared>false</comAtlassianBambooPluginArtifactHandlerRemote:BambooRemoteArtifactHandler:enabledForNonShared>
      </artifactHandlers>
      

      Error thrown

      When running XPATH against column, the following gets thrown:

      # from Oracle Database
      
      [Code: 31011, SQL State: 99999]  ORA-31011: XML parsing failed
      ORA-19213: error occurred in XML processing at lines 45
      LPX-00240: element-start tag is not well formed
      ORA-06512: at "SYS.XMLTYPE", line 272
      ORA-06512: at line 1
      
      # from PostgreSQL Database
      
      [Code: , SQL State: 2200M]  ERROR: could not parse XML document
        Detail: line 45: Failed to parse QName 'comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:'
            <comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:enabledFo
                                                                            ^
      

            [BAM-20070] XML stored in database should have valid XML format

            Zaro made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 824616 ]
            Zaro made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 823028 ]
            Zaro made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 823028 ]
            Jeremy Owen made changes -
            Link New: This issue is duplicated by BAM-22073 [ BAM-22073 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 2807469 ] New: JAC Bug Workflow v3 [ 3384810 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Symptom Severity Original: Minor [ 14432 ] New: Severity 3 - Minor [ 15832 ]
            Krystian Brazulewicz made changes -
            Resolution New: Answered [ 9 ]
            Status Original: Needs Triage [ 10030 ] New: Resolved [ 5 ]

            We understand the problem here but sheer amount of work required to fix the problem and migrate customer data is not something that we want to take on. We'll make sure that our future attempts to store XML data in DB will be more compatible with DB functions used for analysing XML data.

            Krystian Brazulewicz added a comment - We understand the problem here but sheer amount of work required to fix the problem and migrate customer data is not something that we want to take on. We'll make sure that our future attempts to store XML data in DB will be more compatible with DB functions used for analysing XML data.
            Rafael Sperafico (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 385115 ]
            SET Analytics Bot made changes -
            Support reference count New: 1

              Unassigned Unassigned
              rsperafico Rafael Sperafico (Inactive)
              Affected customers:
              10 This affects my team
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: