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

Bamboo does not handle quotes to force name with space as single param

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 3.3 M4, 3.3
    • 3.1
    • Windows
    • None

      Bamboo does not handle quotes to force name with space as single param

      For example:

      The path to your items is the following:

      C:\Program Files (x86)\Microsoft Visual Studio 10.0 ia64 "Logix XClient.sln" 
      

      When running the build it returns the following error:

      C:\Documents and Settings\Administrator\bamboo-home\xml-data\build-dir\LGXXCI-LGXXCI-JOB1>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" ia64 
      24-May-2011 11:41:57 The specified configuration type is missing. The tools for the 
      24-May-2011 11:41:57 configuration might not be installed. 
      24-May-2011 11:42:02 
      24-May-2011 11:42:02 Microsoft (R) Visual Studio Version 10.0.30319.1. 
      24-May-2011 11:42:02 Copyright (C) Microsoft Corp. All rights reserved. 
      24-May-2011 11:42:02 
      24-May-2011 11:42:02 The following files were specified on the command line: 
      24-May-2011 11:42:02 
      24-May-2011 11:42:02 Logix 
      24-May-2011 11:42:02 XClient.sln 
      24-May-2011 11:42:02 
      24-May-2011 11:42:02 These files could not be found and will not be loaded.
      

            [BAM-8891] Bamboo does not handle quotes to force name with space as single param

            I'm thinking how to make this fix better - and then it will be included in 3.2.3 (if/when will be released) and 3.3 of course.
            So, for now, just use this patched version, if there will be upgrade for 3.2 it will be there.

            Cheers

            Marek Went (Inactive) added a comment - I'm thinking how to make this fix better - and then it will be included in 3.2.3 (if/when will be released) and 3.3 of course. So, for now, just use this patched version, if there will be upgrade for 3.2 it will be there. Cheers

            Marek,

            That snapshot worked! It seemed like it wasn't going to for a moment, and now it is. Thank you so much for your assistance and figuring out what was going on here. I really appreciate it.

            Are there any other things I should keep in mind regarding upgrades and such? Or anything to watch out for using this snapshot .jar file?

            Collin O'Connor added a comment - Marek, That snapshot worked! It seemed like it wasn't going to for a moment, and now it is. Thank you so much for your assistance and figuring out what was going on here. I really appreciate it. Are there any other things I should keep in mind regarding upgrades and such? Or anything to watch out for using this snapshot .jar file?

            Please find new patched jar - this time I've checked it using Visual Studio not some dummy scripts.
            It turns out that VS handles quoted parameters as filenames (doesn't care about position). So /build and Debug were treated by VS as files when quoted - and you had a modal dialog in VS stating error - that is why it was hanging.

            This jar should work for you - please let me know if you have any problems

            Marek Went (Inactive) added a comment - Please find new patched jar - this time I've checked it using Visual Studio not some dummy scripts. It turns out that VS handles quoted parameters as filenames (doesn't care about position). So /build and Debug were treated by VS as files when quoted - and you had a modal dialog in VS stating error - that is why it was hanging. This jar should work for you - please let me know if you have any problems

            Hi Marek,

            Thanks for the assistance. I've replaced the existing dotnet-3.2-rc1.jar with the snapshot one you have provided here. I'd like to say it's working, but it reaches the setting variables stage and seems to hang. A build that generally takes 29 seconds and at longest took 1:59, and has so far been running for over 12 minutes without any change.

            Logs:

            31-Aug-2011 06:37:25	Build TWTHREE-MAIN-JOB1-186 started building on agent Default Agent
            31-Aug-2011 06:37:25	Running preRetrieveSourceCode task...
            31-Aug-2011 06:37:25	Updating source code to revision: 200
            31-Aug-2011 06:37:25	Existing workspace found at 'C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1'. updating...
            31-Aug-2011 06:37:28	Update of 'C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1\test\console-output.xml' has been skipped due to conflict in its contents status
            31-Aug-2011 06:37:29	Updated source code to revision: 200
            31-Aug-2011 06:37:29	Running postRetrieveSourceCode task...
            31-Aug-2011 06:37:29	Executing build TWTHREE-MAIN-JOB1-186
            31-Aug-2011 06:37:29	Running pre-build action: Build Number Stamper
            31-Aug-2011 06:37:29	Running pre-build action: Clover Grails PreBuild Action
            31-Aug-2011 06:37:29	Running pre-build action: VCS Version Collector
            31-Aug-2011 06:37:29	Running pre-build action: Repository Isolation Enabler Action
            31-Aug-2011 06:37:29	Running pre-build action: Maven Settings Prebuild Action
            31-Aug-2011 06:37:29	Starting task 'Visual Studio' of type 'com.atlassian.bamboo.plugin.dotnet:devenv'
            31-Aug-2011 06:37:29	
            Beginning to execute external process for build 'Testworks 3.x - Main Build Debug - Default Job'
             ... running command line: 
            C:\data\bamboo-home\DotNetSupport\devenvrunner.bat
              C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1
              C:\Program Files (x86)\Microsoft Visual Studio 10.0
              x86
              "code/Testworks 3.sln"
              /build
              Debug
             ... in: C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1
            31-Aug-2011 06:37:29	
            31-Aug-2011 06:37:29	C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 
            31-Aug-2011 06:37:29	Setting environment for using Microsoft Visual Studio 2010 x86 tools.

            The specific version running of Bamboo is (sorry I didn't think to attach this earlier!):

            Bamboo version 3.2.2 build 2602 - 22 Aug 11

            Collin O'Connor added a comment - Hi Marek, Thanks for the assistance. I've replaced the existing dotnet-3.2-rc1.jar with the snapshot one you have provided here. I'd like to say it's working, but it reaches the setting variables stage and seems to hang. A build that generally takes 29 seconds and at longest took 1:59, and has so far been running for over 12 minutes without any change. Logs: 31-Aug-2011 06:37:25 Build TWTHREE-MAIN-JOB1-186 started building on agent Default Agent 31-Aug-2011 06:37:25 Running preRetrieveSourceCode task... 31-Aug-2011 06:37:25 Updating source code to revision: 200 31-Aug-2011 06:37:25 Existing workspace found at 'C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1' . updating... 31-Aug-2011 06:37:28 Update of 'C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1\test\console-output.xml' has been skipped due to conflict in its contents status 31-Aug-2011 06:37:29 Updated source code to revision: 200 31-Aug-2011 06:37:29 Running postRetrieveSourceCode task... 31-Aug-2011 06:37:29 Executing build TWTHREE-MAIN-JOB1-186 31-Aug-2011 06:37:29 Running pre-build action: Build Number Stamper 31-Aug-2011 06:37:29 Running pre-build action: Clover Grails PreBuild Action 31-Aug-2011 06:37:29 Running pre-build action: VCS Version Collector 31-Aug-2011 06:37:29 Running pre-build action: Repository Isolation Enabler Action 31-Aug-2011 06:37:29 Running pre-build action: Maven Settings Prebuild Action 31-Aug-2011 06:37:29 Starting task 'Visual Studio' of type 'com.atlassian.bamboo.plugin.dotnet:devenv' 31-Aug-2011 06:37:29 Beginning to execute external process for build 'Testworks 3.x - Main Build Debug - Default Job' ... running command line: C:\data\bamboo-home\DotNetSupport\devenvrunner.bat C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1 C:\Program Files (x86)\Microsoft Visual Studio 10.0 x86 "code/Testworks 3.sln" /build Debug ... in: C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1 31-Aug-2011 06:37:29 31-Aug-2011 06:37:29 C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 31-Aug-2011 06:37:29 Setting environment for using Microsoft Visual Studio 2010 x86 tools. The specific version running of Bamboo is (sorry I didn't think to attach this earlier!): Bamboo version 3.2.2 build 2602 - 22 Aug 11

            Marek Went (Inactive) added a comment - - edited

            Hi,

            Looking at the comments, you are running Bamboo 3.2 currently.
            So, I've attached slightly modified .net plugin that should fix your issue.
            Could you try this version in your environment (change atlassian-bamboo-plugin-dotnet-3.2.jar to attached atlassian-bamboo-plugin-dotnet-3.2-SNAPSHOT.jar - and unfortunately you have to restart Bamboo).

            This version contains fixed devenvrunner.bat that should work.

            If the version of plugin does not match, you may repack devenvrunner.bat batch into your version of .net plugin (located in atlassian-bamboo-plugin-dotnet-3.2-SNAPSHOT.jar/com/atlassian/bamboo/plugin/dotnet/visualstudio/ )

            Marek Went (Inactive) added a comment - - edited Hi, Looking at the comments, you are running Bamboo 3.2 currently. So, I've attached slightly modified .net plugin that should fix your issue. Could you try this version in your environment (change atlassian-bamboo-plugin-dotnet-3.2.jar to attached atlassian-bamboo-plugin-dotnet-3.2-SNAPSHOT.jar - and unfortunately you have to restart Bamboo). This version contains fixed devenvrunner.bat that should work. If the version of plugin does not match, you may repack devenvrunner.bat batch into your version of .net plugin (located in atlassian-bamboo-plugin-dotnet-3.2-SNAPSHOT.jar/com/atlassian/bamboo/plugin/dotnet/visualstudio/ )

            Marek Went (Inactive) added a comment - - edited

            Hi Collin,

            Looking at the logs

            command	29-Aug-2011 07:28:35	Beginning to execute external process for build 'Testworks 3.x - Main Build Debug - Default Job'<br /> ... running command line: <br />C:\data\bamboo-home\DotNetSupport\devenvrunner.bat<br />  C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1<br />  C:\Program Files (x86)\Microsoft Visual Studio 10.0<br />  x86<br />  "code/Testworks 3.sln"<br />  /build<br />  Debug<br /> ... in: C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1<br />
            build	29-Aug-2011 07:28:35	
            build	29-Aug-2011 07:28:35	C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 
            build	29-Aug-2011 07:28:35	Setting environment for using Microsoft Visual Studio 2010 x86 tools.
            build	29-Aug-2011 07:28:44	
            build	29-Aug-2011 07:28:44	Microsoft (R) Visual Studio Version 10.0.40219.1.
            build	29-Aug-2011 07:28:44	Copyright (C) Microsoft Corp. All rights reserved.
            build	29-Aug-2011 07:28:44	
            build	29-Aug-2011 07:28:44	The following files were specified on the command line:
            build	29-Aug-2011 07:28:44	
            build	29-Aug-2011 07:28:44		code/Testworks
            build	29-Aug-2011 07:28:44		3.sln
            

            The VS is not executed directly, but using devenvrunner.bat batch. Parameters passed to it looks ok (separated by <br>).
            So, looks like the problem lies in devrunner.bat.

            I'm looking at it.

            Marek Went (Inactive) added a comment - - edited Hi Collin, Looking at the logs command 29-Aug-2011 07:28:35 Beginning to execute external process for build 'Testworks 3.x - Main Build Debug - Default Job' <br /> ... running command line: <br />C:\data\bamboo-home\DotNetSupport\devenvrunner.bat<br /> C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1<br /> C:\Program Files (x86)\Microsoft Visual Studio 10.0<br /> x86<br /> "code/Testworks 3.sln" <br /> /build<br /> Debug<br /> ... in: C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1<br /> build 29-Aug-2011 07:28:35 build 29-Aug-2011 07:28:35 C:\data\bamboo-home\xml-data\build-dir\TWTHREE-MAIN-JOB1>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 build 29-Aug-2011 07:28:35 Setting environment for using Microsoft Visual Studio 2010 x86 tools. build 29-Aug-2011 07:28:44 build 29-Aug-2011 07:28:44 Microsoft (R) Visual Studio Version 10.0.40219.1. build 29-Aug-2011 07:28:44 Copyright (C) Microsoft Corp. All rights reserved. build 29-Aug-2011 07:28:44 build 29-Aug-2011 07:28:44 The following files were specified on the command line: build 29-Aug-2011 07:28:44 build 29-Aug-2011 07:28:44 code/Testworks build 29-Aug-2011 07:28:44 3.sln The VS is not executed directly, but using devenvrunner.bat batch. Parameters passed to it looks ok (separated by <br>). So, looks like the problem lies in devrunner.bat. I'm looking at it.

            I went ahead and attached the downloaded build log so that you can fully determine what's needed! For the interim I've adjusted the necessary project name to contain no spaces; but as our specs do intend the name to have spaces I'd like to be able to change it back once able to. The operating system in question is Windows 2003 Server STD, with Visual Studio 2010 SP1. Please let me know if you need anything else; I am happy to assist.

            Collin O'Connor added a comment - I went ahead and attached the downloaded build log so that you can fully determine what's needed! For the interim I've adjusted the necessary project name to contain no spaces; but as our specs do intend the name to have spaces I'd like to be able to change it back once able to. The operating system in question is Windows 2003 Server STD, with Visual Studio 2010 SP1. Please let me know if you need anything else; I am happy to assist.

            AntonA added a comment -

            Hi Collin,

            You are right, this isn't fixed.

            Would you be able to give us the exact command you would like to execute, and let us know what operating system you are executing it on.

            We may be able to come up with a command line that works.

            Cheers,
            Anton

            AntonA added a comment - Hi Collin, You are right, this isn't fixed. Would you be able to give us the exact command you would like to execute, and let us know what operating system you are executing it on. We may be able to come up with a command line that works. Cheers, Anton

            I'm not sure this is fixed; I just upgraded in the last hour to Bamboo 3.2.2. The initial run returned that multiple file statement, however when I try to double-quote the commands as recommended here (both with ' and ") it instead fails with "The syntax of the command is incorrect". From the fix versions, am I stuck waiting until 3.3 to use Bamboo again?

            Collin O'Connor added a comment - I'm not sure this is fixed; I just upgraded in the last hour to Bamboo 3.2.2. The initial run returned that multiple file statement, however when I try to double-quote the commands as recommended here (both with ' and ") it instead fails with "The syntax of the command is incorrect". From the fix versions, am I stuck waiting until 3.3 to use Bamboo again?

            Despite the fact that quotes are being removed in Bamboo 3.1, the string Logix XClient.sln will be passed as 1 argument to Windows shell. It is usually sufficient for most tools. How is the customers's plan defined? Does it use script to run the actual command? If so, then how does this script handle/pass commandline arguments?

            Explanation of situation in 3.1:
            Bamboo removes quotes from arguments only if argument starts and ends with a quote. In this case the quote will not be removed:

            --long-option-1="Quoted Value 1"
            

            Workaround: in order to preserve quoting user have to double quote the argument:

            '"Logix XClient.sln"'
            

            This way only the most external quote will be stripped.

            This problem is resolved in Bamboo 3.2. No additional quoting will be needed from 3.2 on.

            Krystian Brazulewicz added a comment - Despite the fact that quotes are being removed in Bamboo 3.1, the string Logix XClient.sln will be passed as 1 argument to Windows shell. It is usually sufficient for most tools. How is the customers's plan defined? Does it use script to run the actual command? If so, then how does this script handle/pass commandline arguments? Explanation of situation in 3.1: Bamboo removes quotes from arguments only if argument starts and ends with a quote. In this case the quote will not be removed: --long-option-1="Quoted Value 1" Workaround: in order to preserve quoting user have to double quote the argument: '"Logix XClient.sln"' This way only the most external quote will be stripped. This problem is resolved in Bamboo 3.2. No additional quoting will be needed from 3.2 on.

              mwent Marek Went (Inactive)
              zyap Zed Yap [Atlassian]
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: