Skip to content

fix: restore manifest delete webhook notifications on the new code path

João Pereira requested to merge fix-manifest-delete-event into master

Temporary/quick fix for #726 (closed) until we fix this centrally with a large refactoring (#691 (closed)).

How to test this locally

Setup

  1. Push a random image to any container repository (we'll assume it's new/repo in these instructions);
  2. Go to https://requestbin.com/r and copy the endpoint URL on the top right.
  3. Reconfigure the registry as follows (truncated):
database:
  enabled: true
migration:
  enabled: true
  disablemirrorfs: true
notifications:
  endpoints:
    - name: pipedream
      url: <endpoint>
      timeout: 500ms
      threshold: 5
      backoff: 1s
      ignore:
        actions:
          - pull
      ignoredmediatypes:
        - application/octet-stream

Before

Using the master branch, start the registry and try:

  1. Identify digest of the image previously pushed to new/repo;
  2. Delete manifest in new/repo with curl -X DELETE http://<host>:<port>/v2/new/repo/manifests/sha256:<digest>.

You should not see any notifications in pipedream.

After

Using this branch, push the image to the repository again and repeat the steps above. You should now see a notification, similar to this: https://requestbin.com/r/eny7axqf5qzu/2BvriXqUiKWeE0T1VGh7WlntC5S

Merge request reports

Loading