Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-20283

Cache integrity for pipelines cache

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      I would be nice that cache pipelines had a way to determine an integrity field.

      With this field pipeline could determine if a `cache` is different or not to the previously stored in this way:

      1. When the pipeline starts it lookup for the defined `cache` and if it exists, pipeline extracts it and uses.
      2. On Pipeline teardown, Pipeline computes the integrity for the cache according to the files in the container.
      3. If the integrity value is equal to the value of the integrity of the cache extracted in step 1, it doesn't update the cache; but,
      4. If the integrity value is different, the cache is compressed, stored, and updated; and also the integrity value for this cache is updated.

      For example, for node cache, pipeline could compute hash of `yarn.lock` or `package-lock.json` file on Pipeline Teardown and if this hash is different to previous integrity value, pipeline could replace that cache.

      What do you think about this?

      Attachments

        Activity

          People

            Unassigned Unassigned
            001b619f3161 Cristian Atehortua
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: