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

SCMHead.getActions() must die

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • scm-api-plugin
    • None

    Description

      There is no way to signal that the persisted SCMHead has different actions from a SCMHead instance retrieved through traversal.

      Further, with the event API it may not be possible to reconstruct all the actions for a specific SCMHead from the event.

      The SCMHead interface was designed to be a key type class, not a value type class.

      It was a mistake to add an action API to it.

      As there are very few consumers it may be possible to revert the addition completely, otherwise it will be annotated @Restricted(DoNotUse.class) and the method turned into a no-op.

      As part of this change, ChangeRequestAction will also be removed, in favour of more composable metadata actions that will be made available through the SCMSource.fetchActions(...,listener) API rather than attached to the SCMHead, in this way consumers of the SCM API can access and persist the mutable information with the SCMHead being restored to its role as an immutable key with a strong deep equals contract.

      Attachments

        Issue Links

          Activity

            People

              stephenconnolly Stephen Connolly
              stephenconnolly Stephen Connolly
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: