Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-11031

Create an API for migrating repository hook settings when their keys change

    XMLWordPrintable

Details

    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      When <repository-hook/> modules are used any settings they create, as well as whether they're enabled/disabled, is attached to their "complete key", which is formed by taking the key for the plugin they're declared in and combining it with the key attribute set on the <repository-hook/> descriptor. If the plugin key or the module key ever change, all settings for the hook are "lost". This is both unexpected and undesirable.

      Worse, with the current RepositoryHookService API, there is almost no possible way to recover from this situation. RepositoryHook details can only be retrieved for hooks whose modules are still installed, and their Settings can only be retrieved repository-by-repository. Trying to build an upgrade task that does that per-repository copy is slow and error-prone.

      RepositoryHookService should provide a migration API, to allow app developers to provide their old and new "complete keys" and automatically migrate all settings between the keys in a single shot. This can be done efficiently in the database, where it can't be with the existing public API.

      Attachments

        Activity

          People

            bturner Bryan Turner (Inactive)
            bturner Bryan Turner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: