-
Notifications
You must be signed in to change notification settings - Fork 594
refactor(general): consistently use "pack" where possible #4952
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the codebase to consistently use the term "pack" instead of "blob" when referring to pack-specific operations (p and q pack blobs containing content data). The change improves terminology consistency throughout the maintenance subsystem while preserving backward compatibility by keeping task names unchanged in persistent metadata.
Key changes:
- Renamed functions and types from
*Blob*to*Pack*variants (e.g.,DeleteUnreferencedBlobs→DeleteUnreferencedPacks) - Updated log messages to say "pack" instead of "blob" where appropriate
- Modified function and variable names to reflect pack-specific operations
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| repo/maintenance/maintenance_run.go | Renamed pack deletion functions and updated log messages to use "pack" terminology consistently |
| repo/maintenance/blob_gc_test.go | Updated test calls to use renamed DeleteUnreferencedPacks function and DeleteUnreferencedPacksOptions type |
| repo/maintenance/blob_gc.go | Renamed core types and function from DeleteUnreferencedBlobs* to DeleteUnreferencedPacks* and updated internal log messages |
| cli/command_blob_gc.go | Updated CLI command to use renamed pack deletion function and options type |
86bfa0f to
4e87e83
Compare
c4c75ba to
17be049
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4952 +/- ##
==========================================
+ Coverage 75.86% 78.00% +2.13%
==========================================
Files 470 545 +75
Lines 37301 31368 -5933
==========================================
- Hits 28299 24468 -3831
+ Misses 7071 4853 -2218
- Partials 1931 2047 +116 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
In kopia, "blob" is a generic term to refer to either an object in an object storage provider, or a file in a file system storage provider. There are various types of blobs in a kopia repository. In kopia, the term "pack" is used to refer to specific types of blobs, namely 'p' & 'q' pack blobs, that store "content" data, as opposed to say, "index" blobs. This change attempts to use the term "pack" consistently in the functions and types used for pack deletion. Note that the corresponding task names, shown below, remain unchanged since these names are used in the persistent maintenance run metadata, and that is used to make decisions about the safety of the execution of those tasks. ``` TaskDeleteOrphanedBlobsQuick = "quick-delete-blobs" TaskDeleteOrphanedBlobsFull = "full-delete-blobs" ```
17be049 to
3035779
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
In kopia, "blob" is a generic term to refer to either an object in an object storage provider, or a file in a file system storage provider. There are various types of blobs in a kopia repository.
In kopia, "pack" is used to refer to specific types of blobs, namely 'p' & 'q' pack blobs, that store
"content" data, as opposed to say, "index" blobs.
This change attempts to use the term "pack" consistently in the functions and types used for pack deletion.
Note that the corresponding task names, shown below, remain unchanged since these names are used in the persistent maintenance run metadata, and that is used to make decisions about the safety of the execution of those tasks.