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

Refactor of Capabilities on backend

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • blueocean-plugin
    • None
    • pacific, 1.0-b05/b-06

      Some suggestions on tweaks to capabilities:

      1. For pipeline-related things, I think it would be good to refactor the string values into static string constants in a single class (or possibly an enum( to ensure consistent values are used throughout and make it easier to see what capabilities are available.
      2. Fix typo in BranchImpl.java ("io.jenkins.blueocean.rest.impl.pipeline.PullReuqest")

      Items deferred for now but kept for later in case they're useful:

      1. I have some suggestions on how we might refine some of the metadata too. Right now I would say that most of our Capabilities are simply proxies for the underlying class name. I think instead that similar classes should share a capability when it makes sense. This simplifies the UI code so we are more often testing for a single capability rather than multiple capabilities that ultimately refer to the same kind of functionality.
        1. I think that BluePipeline.java and BlueMultiBranchPipeline.java should share a capability to indicate they are both pipelines. Perhaps just add "io.jenkins.blueocean.rest.model.BluePipeline" to multi-branch, or come up with a new capability altogether.
        2. I think that BranchImpl.java and BlueMultiBranchPipeline.java should share a capability to indicate they are both multibranch "components". It would be nice not to have to test for BlueBranch and BlueMultiBranchPipeline, rather something like BlueBranchAware, etc
        3. Should PipelineRunImpl.java have a "WorkflowRun" capability name or should it be something more generic like "PipelineRun" ?
        4. Is the "MultiBranchProject" capability on MultiBranchPipelineImpl necessary? It seems that there could be confusion whether to check for that capability or for BlueMultiBranchPipeline

      There may be some other capabilities worthy of discussion too; scheduling a meeting to discuss and refine might be a good idea.

            vivek Vivek Pandey
            cliffmeyers Cliff Meyers
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: