-
Improvement
-
Resolution: Unresolved
-
Minor
-
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.)