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

Artifacts with invalid characters, like umlauts, cannot be published

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Low
    • None
    • 5.12.0.2
    • None

    Description

      Summary

      Bamboo is no longer able to handle artifacts whose filenames have an umlaut (¨). It fails to publish artifacts in this case.

      Environment

      We can replicate it in Bamboo 5.12.0-D20160518T090318 but we cannot replicate in 5.10-OD-15-001 (haven't tested in other versions), which shows this has changed.

      Steps to Reproduce

      1. Create a build plan in Bamboo with a single task: a script task
      2. Add the following code to the task: echo Test > testumlaut_ü.test
        • Notice that the last ‘u’ has an umlaut
      3. Create an artifact definition that includes the generated file (tested with shared artifacts)
        • A simple copy pattern like ‘*’ is enough
      4. Run the plan

      Expected Results

      The build is successfully run and the ‘testumlaut_ü.test’ is added as an artifact in the build result.

      Actual Results

      Though the build is successful, it doesn’t contain any artifacts.
      The build log shows this:

      error	24-May-2016 15:04:55	Unable to publish artifact [Test]: 
      simple	24-May-2016 15:04:55	The artifact hasn't been successfully published after 13.33 s
      

      The Bamboo Server logs show this:

      2016-05-26 22:29:57.397037500 2016-05-26 22:29:57,396 INFO [http-nio-6990-exec-4] [ArtifactServlet] Receiving Artifact [Test] for TEST-TEST-JOB1-2
      2016-05-26 22:29:57.400482500 2016-05-26 22:29:57,399 ERROR [http-nio-6990-exec-4] [ArtifactServlet] Exception when storing the artifact
      2016-05-26 22:29:57.400483500 java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: testumlaut_ü.test
      2016-05-26 22:29:57.400483500 	at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
      2016-05-26 22:29:57.400483500 	at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
      2016-05-26 22:29:57.400484500 	at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
      2016-05-26 22:29:57.400484500 	at sun.nio.fs.AbstractPath.resolve(AbstractPath.java:53)
      2016-05-26 22:29:57.400489500 	at com.atlassian.bamboo.utils.BambooFiles.resolvePathUnderParent(BambooFiles.java:170)
      2016-05-26 22:29:57.400489500 	at com.atlassian.bamboo.v2.build.agent.messages.ArtifactStreams.deserialiseStreamToDir(ArtifactStreams.java:79)
      2016-05-26 22:29:57.400490500 	at com.atlassian.bamboo.agent.messaging.ArtifactServlet.storeArtifact(ArtifactServlet.java:114)
      2016-05-26 22:29:57.400490500 	at com.atlassian.bamboo.agent.messaging.ArtifactServlet.doPost(ArtifactServlet.java:100)
      2016-05-26 22:29:57.400492500 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
      2016-05-26 22:29:57.400492500 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      2016-05-26 22:29:57.400492500 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      2016-05-26 22:29:57.400495500 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2016-05-26 22:29:57.400496500 	at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)
      

      The agent logs show this:

      2016-05-24 15:19:22,865 ERROR [0-BAM::Elastic Agent on i-72c963cf::Agent:pool-3-thread-1] [BambooArtifactHttpTransport] Unexpected HTTP status code: HTTP/1.1 500 Internal Server Error
      2016-05-24 15:19:22,865 INFO [0-BAM::Elastic Agent on i-72c963cf::Agent:pool-3-thread-1] [AbstractArtifactManager] Handler com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler did not publish the artifact
      2016-05-24 15:19:22,866 WARN [0-BAM::Elastic Agent on i-72c963cf::Agent:pool-3-thread-1] [AbstractArtifactManager] Unable to publish artifact [test]:
      

      Notes

      This is the only invalid character found so far, but there may be others.

      Workaround

      Change tasks to generate file names without the ‘umlaut’.

      Attachments

        Issue Links

          Activity

            People

              pbruski Przemek Bruski
              jsilveira Jaime S
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: