Skip to content

Conversation

@julio-lopez
Copy link
Collaborator

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.

	TaskDeleteOrphanedBlobsQuick     = "quick-delete-blobs"
	TaskDeleteOrphanedBlobsFull      = "full-delete-blobs"

@julio-lopez julio-lopez requested a review from Copilot November 4, 2025 05:59
Copy link

Copilot AI left a 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., DeleteUnreferencedBlobsDeleteUnreferencedPacks)
  • 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

@julio-lopez julio-lopez force-pushed the refactor/maint-pack-blob branch from 86bfa0f to 4e87e83 Compare November 4, 2025 06:08
@julio-lopez julio-lopez changed the title refactor(general): consistent use "pack" where possible refactor(general): consistently use "pack" where possible Nov 4, 2025
@julio-lopez julio-lopez force-pushed the refactor/maint-pack-blob branch 2 times, most recently from c4c75ba to 17be049 Compare November 6, 2025 02:47
@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.00%. Comparing base (cb455c6) to head (3035779).
⚠️ Report is 735 commits behind head on master.

Files with missing lines Patch % Lines
repo/maintenance/pack_gc.go 69.23% 4 Missing ⚠️
cli/command_blob_gc.go 0.00% 2 Missing ⚠️
repo/maintenance/maintenance_run.go 92.30% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@julio-lopez julio-lopez requested a review from Copilot November 6, 2025 03:41
Copy link

Copilot AI left a 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"
```
@julio-lopez julio-lopez force-pushed the refactor/maint-pack-blob branch from 17be049 to 3035779 Compare November 6, 2025 03:53
@julio-lopez julio-lopez marked this pull request as ready for review November 6, 2025 06:03
Copilot AI review requested due to automatic review settings November 6, 2025 06:03
@julio-lopez julio-lopez merged commit c7ea2c6 into kopia:master Nov 6, 2025
26 of 27 checks passed
@julio-lopez julio-lopez deleted the refactor/maint-pack-blob branch November 6, 2025 06:03
Copy link

Copilot AI left a 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant