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

Plugin does not work with read-only perforce replica

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • p4-plugin
    • None
    • Jenkins 2.7.3; p4-plugin 1.4.9

      Our Jenkins instance uses a read-only perforce replica.

      After updating the p4 plugin to v1.4.9, the error 'Replica does not support this command' for p4 revert is no longer quietly ignored and causes the Jenkins job to terminate.

      The full output is now:
      p4 revert [...]
      Replica does not support this command.
      ERROR: P4JAVA: Error(s):
      Replica does not support this command.

      This error now means that the plugin does not work with perforce replicas.

      Unfortunately, reverting to 1.4.8 is not an option, as we require one of the other changes in 1.4.9.

          [JENKINS-39824] Plugin does not work with read-only perforce replica

          Daniel Spencer created issue -

          Karl Wirth added a comment -

          Hi Daniel,

          A read only replica is a use case we never envisaged because you cannot update the have list during sync. The reason it stopped working in 1.4.9 is that we realized there were a lot of failures the plugin was silently ignoring so invalid builds may have been generated without being flagged to the end users. Therefore the plugin now flags most errors.

          Can you please confirm that the replica is a read-only and not forwarding replica. Which major version of P4D is this on?

          Also would it be possible to get a general description of the build that used to work so we can see how you use it.

          Thanks in advance,

          Karl

          Karl Wirth added a comment - Hi Daniel, A read only replica is a use case we never envisaged because you cannot update the have list during sync. The reason it stopped working in 1.4.9 is that we realized there were a lot of failures the plugin was silently ignoring so invalid builds may have been generated without being flagged to the end users. Therefore the plugin now flags most errors. Can you please confirm that the replica is a read-only and not forwarding replica. Which major version of P4D is this on? Also would it be possible to get a general description of the build that used to work so we can see how you use it. Thanks in advance, Karl

          Hi Karl,

          The replica is a read-only replica - the configuration is:
          Services: build-server
          db.replication=readonly (configure)
          lbr.replication=readonly (configure)

          The master and replica are both running on P4D version P4D/LINUX26X86_64/2015.1/1204891 (2015/07/17).

          We have not yet fully implemented the P4 plugin, as we are currently looking to transition to this from the perforce plugin. Therefore, we do not yet have working builds.

          Thanks,

          Daniel

          Daniel Spencer added a comment - Hi Karl, The replica is a read-only replica - the configuration is: Services: build-server db.replication=readonly (configure) lbr.replication=readonly (configure) The master and replica are both running on P4D version P4D/LINUX26X86_64/2015.1/1204891 (2015/07/17). We have not yet fully implemented the P4 plugin, as we are currently looking to transition to this from the perforce plugin. Therefore, we do not yet have working builds. Thanks, Daniel

          Tom Hollis added a comment -

          I am also experiencing this problem on a build farm replica.

          We are running:
          P4D/LINUX26X86_64/2015.1/1415928 (2016/07/25)

          Tom

          Tom Hollis added a comment - I am also experiencing this problem on a build farm replica. We are running: P4D/LINUX26X86_64/2015.1/1415928 (2016/07/25) Tom

          Gaige Paulsen added a comment - - edited

          We are running into the same problem with 

          P4D/LINUX26X86_64/2016.2/1509269

          on a build farm replica configuration.

          Although the have list can be updated on a build-farm replica, there are no work-in-progress commands, so the default method for rollback by using `revert` does not work.

          I've had success so far setting the Perforce configuration to Sync Only.

          Gaige Paulsen added a comment - - edited We are running into the same problem with  P4D/LINUX26X86_64/2016.2/1509269 on a build farm replica configuration. Although the have list can be updated on a build-farm replica, there are no work-in-progress commands, so the default method for rollback by using `revert` does not work. I've had success so far setting the Perforce configuration to Sync Only.

          Paul Allen added a comment -

          I am unable to fix this issue due to the behaviour of a read-only replica server.

          As the name suggests the server is read-only, which includes client workspace creation/update and the have table.  If you want to sync from a read-only server you need to use a 'Static' Workspace (that has been pre-configured) and a 'Force Clean' Populate option where the have list is not updated ('Populate have list' not checked). 

          Paul Allen added a comment - I am unable to fix this issue due to the behaviour of a read-only replica server. As the name suggests the server is read-only, which includes client workspace creation/update and the have table.  If you want to sync from a read-only server you need to use a 'Static' Workspace (that has been pre-configured) and a 'Force Clean' Populate option where the have list is not updated ('Populate have list' not checked). 
          Paul Allen made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

          Timothy Smith added a comment -

          This still fails with a force clean sync. The plugin is currently unusable is a serious Perforce environment with read-only depots.

          I would suggest reporting errors that can be continued from rather than failing jobs.

          Rolling back.

          Timothy Smith added a comment - This still fails with a force clean sync. The plugin is currently unusable is a serious Perforce environment with read-only depots. I would suggest reporting errors that can be continued from rather than failing jobs. Rolling back.
          Timothy Smith made changes -
          Resolution Original: Won't Fix [ 2 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Karl Wirth made changes -
          Attachment New: image-2017-12-19-16-24-16-217.png [ 40738 ]

            Unassigned Unassigned
            dspencer12 Daniel Spencer
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: