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

Add support for p4 sync -p flag

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The command

      p4 sync -p

      Will do a sync without updating the db.have file on the perforce server. This can come in very handy when you have Ci builds running on multiple slaves, this is like a p4 sync -f, but can be faster due to less db writes on the server.

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          If you have CI builds on multiple slaves, the perforce plugin will use a separate client per machine by default. This would provide much faster syncs on all machines. Additionally, the time saved by not updating the db.have file is trivial compared to the time it takes to send files from the server to the client. With all that in mind, I don't see what use this option would serve.

          Show
          rpetti Rob Petti added a comment - If you have CI builds on multiple slaves, the perforce plugin will use a separate client per machine by default. This would provide much faster syncs on all machines. Additionally, the time saved by not updating the db.have file is trivial compared to the time it takes to send files from the server to the client. With all that in mind, I don't see what use this option would serve.
          Hide
          aflat aflat added a comment -

          Not only is it the time(I don't have the fastest server, still working on that), but also the space used by having Jenkins manage the clients. I stripped out all the clients from my CI builds(over 75 of them, spread across 8 slaves) and saved almost 1.5gb in db.have space. Granted that wasn't all I did on a checkpoint restore, but it accounted for a good chunk of the extra db.have space.

          This isn't anything i feel I really need, it's more of a wishlist item.

          Show
          aflat aflat added a comment - Not only is it the time(I don't have the fastest server, still working on that), but also the space used by having Jenkins manage the clients. I stripped out all the clients from my CI builds(over 75 of them, spread across 8 slaves) and saved almost 1.5gb in db.have space. Granted that wasn't all I did on a checkpoint restore, but it accounted for a good chunk of the extra db.have space. This isn't anything i feel I really need, it's more of a wishlist item.
          Hide
          aflat aflat added a comment -

          In addition, this would allow you to sync against a replica server. Replica servers run in read only mode, p4 sync can't be run against a replica server, where p4 sync -p can. This would allow people to take some of the load off their main p4 server.

          Show
          aflat aflat added a comment - In addition, this would allow you to sync against a replica server. Replica servers run in read only mode, p4 sync can't be run against a replica server, where p4 sync -p can. This would allow people to take some of the load off their main p4 server.
          Hide
          rpetti Rob Petti added a comment -

          This has now been implemented.

          Show
          rpetti Rob Petti added a comment - This has now been implemented.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/com/tek42/perforce/parse/Workspaces.java
          src/main/java/hudson/plugins/perforce/PerforceSCM.java
          src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly
          src/main/webapp/help/dontUpdateServer.html
          src/test/java/hudson/plugins/perforce/PerforceSCMTest.java
          http://jenkins-ci.org/commit/perforce-plugin/acbfdde98af552f49ba40eaa2984444397a7ad0d
          Log:
          [FIXED JENKINS-9819] adding option for sync -p

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/com/tek42/perforce/parse/Workspaces.java src/main/java/hudson/plugins/perforce/PerforceSCM.java src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly src/main/webapp/help/dontUpdateServer.html src/test/java/hudson/plugins/perforce/PerforceSCMTest.java http://jenkins-ci.org/commit/perforce-plugin/acbfdde98af552f49ba40eaa2984444397a7ad0d Log: [FIXED JENKINS-9819] adding option for sync -p
          Hide
          aflat aflat added a comment -

          Thanks a bunch for adding this. Just a minor change, you can't use -f and -p at the same time. It's not too big a deal for me to uncheck the -f if I click -p, but you might want to warn people.

          Show
          aflat aflat added a comment - Thanks a bunch for adding this. Just a minor change, you can't use -f and -p at the same time. It's not too big a deal for me to uncheck the -f if I click -p, but you might want to warn people.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/webapp/help/dontUpdateServer.html
          http://jenkins-ci.org/commit/perforce-plugin/21db3c44b463ed733626270e707fec4fb703cdc9
          Log:
          JENKINS-9819 adding note to docs explaining that perforce doesn't allow -f and -p at the same time during syncing

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/webapp/help/dontUpdateServer.html http://jenkins-ci.org/commit/perforce-plugin/21db3c44b463ed733626270e707fec4fb703cdc9 Log: JENKINS-9819 adding note to docs explaining that perforce doesn't allow -f and -p at the same time during syncing
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_perforce #119
          JENKINS-9819 adding note to docs explaining that perforce doesn't allow -f and -p at the same time during syncing

          Rob Petti :
          Files :

          • src/main/webapp/help/dontUpdateServer.html
          Show
          dogfood dogfood added a comment - Integrated in plugins_perforce #119 JENKINS-9819 adding note to docs explaining that perforce doesn't allow -f and -p at the same time during syncing Rob Petti : Files : src/main/webapp/help/dontUpdateServer.html

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              aflat aflat
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: