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

syncID and iteration of <Foo>WorkspaceImpl classes

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • None
    • Jenkins 2.60.1
      p4-plugin 1.7.2

      There's a piece of code (getKey()) in PerforceScm.java that determines the syncID for a Workspace. Unfortunately, this is very bad style, because it special cases every <Foo>WorkspaceImpl it knows. This makes the new AbstractSource Extension point in 1.7.2 useless, as any new WorkspaceImpl defined by it is not caught by getKey().

      Instead, there should be a getKey() method on Workspace that is overridden by all <Foo>WorkspaceImpl classes.

      (And actually I don't get why there's yet another way to specify the workspace to create for pipelines; when using checkout, the Snippet Generator already allows to choose the Workspace classe one wants to use. Using p4sync, it used to have several parameters and thus required a list of known WorkspaceImpl classes, with 1.7.2 the extension point fixes it, ... but it does so in yet another way. This isn't perl with TIMTOWTDI, so there must be a good reason for it that I haven't understood yet.... which is it?)

      Actually, I'd like to explicitly set the syncID in my jobs aka when configuring the workspace. (As I don't see a reason to include the credential, but can provide more useful tags.)

          [JENKINS-45640] syncID and iteration of <Foo>WorkspaceImpl classes

          There are no comments yet on this issue.

            Unassigned Unassigned
            rk R K
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: