Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 4742: snapshot and bulk delete endpoints and task #845

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dominikvagner
Copy link
Contributor

@dominikvagner dominikvagner commented Oct 11, 2024

Summary

  • Two endpoints for manual snapshot deletion added, one for deleting a single snapshot and a bulk delete one.
  • Endpoints only soft-delete snapshots and then start a task cleaning those up fully along with Pulp content and updating templates that are using those.

Testing steps

  1. Create a repository, with snapshots enabled.
  2. Add the repository to a template and make sure it uses the snapshots that's gonna be deleted.
  3. After the repository has a snapshot created, change the URL and trigger a new snapshot.
  4. Delete a snapshot from that repo with the new endpoint.
    http DELETE :8000/api/content-sources/v1.0/repositories/${REPO_UUID}/snapshots/${SNAP_UUID}
  5. Verify that the snapshot has been deleted (i.e. not present when listing snapshots for a repo).
  6. Verify that the template snapshot has been updated to the other one. (Doesn't work yet.)
  • For bulk delete, do the same with more snapshots.

@dominikvagner dominikvagner changed the title Fixes 4742: add delete snapshot and bulk delete endpoints and task Fixes 4742: snapshot and bulk delete endpoints and task Oct 11, 2024
@jlsherrill
Copy link
Member

Copy link
Contributor

@rverdile rverdile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm noticing an issue you can reproduce like this:

  1. Create a repository, change the URL to get 2 snapshots.
  2. Delete the more recent snapshot.
  3. In the UI, if you try to view the snapshots you'll see "No snapshots yet". I believe because in the API, if you fetch the repository, last_snapshot_uuid is omitted from the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants