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

Artifact with invalid characters cannot be published

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Low Low
    • None
    • None
    • None

      Summary

      Bamboo is no longer able to handle artifacts whose filenames have an umlaut (¨). It fails to publish artifacts in this case. This is a regression of BAM-17614.

      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 simply 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’.

            [BAM-18048] Artifact with invalid characters cannot be published

            pbruski system properties on Cloud can no longer be applied as far as I know due to snowflacking (vertigo) no ? So jamie's suggestion might not be applicable?

            Vincent Chin (Inactive) added a comment - pbruski system properties on Cloud can no longer be applied as far as I know due to snowflacking (vertigo) no ? So jamie's suggestion might not be applicable?

            Thanks, Przemyslaw, I have to admit though I am a bit confused at this moment...

            Actually I have reported the issue here - https://support.atlassian.com/servicedesk/customer/portal/23/JST-238770. and because of that, Vincent created this ticket and now you telling me I have to create a new ticket?

            Not sure I follow you, TBH.

             

            Angel Todorov added a comment - Thanks, Przemyslaw, I have to admit though I am a bit confused at this moment... Actually I have reported the issue here - https://support.atlassian.com/servicedesk/customer/portal/23/JST-238770. and because of that, Vincent created this ticket and now you telling me I have to create a new ticket? Not sure I follow you, TBH.  

            The problem is specific to our Cloud environment. You can ask support to apply the workaround on the server.

            I am assuming you use Cloud, if you are not, please let us know.

            Przemek Bruski added a comment - The problem is specific to our Cloud environment. You can ask support to apply the workaround on the server. I am assuming you use Cloud, if you are not, please let us know.

            Well, the proposed workaround in the scope of BAM-17614 cannot be applied always. For instance we have a Wordpress installation with specific plugin installed, which plugin requires deployment. This plugin has file with umlaut character and since this is a 3rd party plugin we cannot simply delete the file. Hence we have to choose whether to use Bamboo for deployment or switch to other deployment tool which has no such basic issue.

            Angel Todorov added a comment - Well, the proposed workaround in the scope of BAM-17614 cannot be applied always. For instance we have a Wordpress installation with specific plugin installed, which plugin requires deployment. This plugin has file with umlaut character and since this is a 3rd party plugin we cannot simply delete the file. Hence we have to choose whether to use Bamboo for deployment or switch to other deployment tool which has no such basic issue.

            Cloud system environments are misconfigured and use ASCII as encoding for filenames. Please use the workaround defined in BAM-17614.

            Przemek Bruski added a comment - Cloud system environments are misconfigured and use ASCII as encoding for filenames. Please use the workaround defined in BAM-17614 .

              Unassigned Unassigned
              vchin Vincent Chin (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: