1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00
Files
quay/util
jbpratt 2e3dd39ae8 feat(data): add tag immutability enforcement layer (PROJQUAY-10158) (#4822)
This commit implements the core enforcement layer for tag immutability,
which prevents immutable tags from being deleted, overwritten, or
permanently removed from the time machine.

Changes:
- Add ImmutableTagException class with tag_name, operation, and
  repository_id fields for detailed error reporting
- Enforce immutability in delete_tag() - raises exception for immutable tags
- Enforce immutability in retarget_tag() - prevents overwriting immutable
  tags, respects raise_on_error parameter
- Enforce immutability in remove_tag_from_timemachine() - blocks permanent
  deletion for both alive and expired immutable tags
- Add is_tag_immutable() - returns True/False/None for tag lookup
- Add set_tag_immutable() - updates immutability with optimistic locking

The immutable column, indexes, and log entry kind were previously added
in migration 5b8dc452f5c3. This commit adds the enforcement logic and
utility functions that use those database structures.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-01-13 08:37:05 -06:00
..
2020-02-05 19:55:07 -08:00
2020-02-05 19:55:07 -08:00
2019-12-02 12:23:08 -05:00
2020-06-05 16:50:13 -04:00
2019-12-02 12:23:08 -05:00
2020-02-05 19:55:07 -08:00
2020-06-05 16:50:13 -04:00
2020-02-05 19:55:07 -08:00
2020-02-05 19:55:07 -08:00
2020-03-11 13:54:08 -04:00
2019-12-02 12:23:08 -05:00