Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11519

When chosing "Execute concurrent builds if necessary" extra workspaces created should use a different character than '@'

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Not A Defect
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      *strong text*When choosing in build setting the option Execute concurrent builds if necessary, if a build is executed while another build is running, the second workspace created as workspace@2.
      The use of '@' character is not so good as it is sometimes used as a meta-character in scripts.
      For example, I had a problem when my script was trying to run sqlplus command where @ is used.

      Consider changing '@' character with '_' or simply just using workspace2 with no character in between.

        Attachments

          Issue Links

            Activity

            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            I'm wondering what's the impact of changing this. Does it break anything?

            Show
            kohsuke Kohsuke Kawaguchi added a comment - I'm wondering what's the impact of changing this. Does it break anything?
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Just wonder you have "Test" and "Test_4" jobs, when the first one is parallelizable...

            The changing of the default hudson.slaves.WorkspaceList also leads to the re-creation of existing workspaces, hence there will be a data leak on workspace storages.

            Probably, it makes sense to add the explicit definition of a new separator (not "_") to Jenkins init files in order to change separators on new installations.

            Show
            oleg_nenashev Oleg Nenashev added a comment - Just wonder you have "Test" and "Test_4" jobs, when the first one is parallelizable... The changing of the default hudson.slaves.WorkspaceList also leads to the re-creation of existing workspaces, hence there will be a data leak on workspace storages. Probably, it makes sense to add the explicit definition of a new separator (not "_") to Jenkins init files in order to change separators on new installations.
            Hide
            danielbeck Daniel Beck added a comment - - edited

            If the @ leads to problems for you, set the documented System property hudson.slaves.WorkspaceList (no suffix after class name as usual!), e.g.: -Dhudson.slaves.WorkspaceList=_. I see no reason to change the default, unless it can be demonstrated to regularly cause issues.

            Show
            danielbeck Daniel Beck added a comment - - edited If the @ leads to problems for you, set the documented System property hudson.slaves.WorkspaceList (no suffix after class name as usual!), e.g.: -Dhudson.slaves.WorkspaceList=_ . I see no reason to change the default, unless it can be demonstrated to regularly cause issues.
            Hide
            timothyport Tim Port added a comment -

            This seems to break the p4 plugin. Thanks for the workaround!

            Show
            timothyport Tim Port added a comment - This seems to break the p4 plugin. Thanks for the workaround!
            Hide
            seanf Sean Flanigan added a comment -

            Another place this can trigger a problem is if you have buggy code, perhaps in tests, that does this:

                new File(fileURL.getFile());
            

            when it should be doing this:

                return new File(fileURL.toURI());
            

            This tends to break only in concurrent builds because of the sudden appearance of @ in the workspace path.

            In fact I'm thinking of setting -Dhudson.model.Slave.workspaceRoot=workspace@root to guarantee that it will happen consistently, not just when there are concurrent builds running.

            Show
            seanf Sean Flanigan added a comment - Another place this can trigger a problem is if you have buggy code, perhaps in tests, that does this: new File(fileURL.getFile()); when it should be doing this: return new File(fileURL.toURI()); This tends to break only in concurrent builds because of the sudden appearance of @ in the workspace path. In fact I'm thinking of setting -Dhudson.model.Slave.workspaceRoot=workspace@root to guarantee that it will happen consistently, not just when there are concurrent builds running.

              People

              • Assignee:
                Unassigned
                Reporter:
                miked michael d
              • Votes:
                4 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: