← Back to issue list

feat(lifecycle): only pack files if not already packed

View original Github issue

Metadata

Project
craft-application
Number
#810
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged a lifecycle optimization that skips redundant file packing by verifying existing pack lists, prime timestamps, and file integrity. Approved by three reviewers and passed CI checks, successfully integrating the change.

Suggested action:

No scores available.

Issue body

Keep a list of packed files and use it to check if repacking is necessary, according to the following logic: 1. Before packing, check if the list file exists. If not, we never packed before and packing is necessary. 2. Check the most recent prime state timestamp. These are generated when parts are primed. If any part was primed after the artifacts were generated, we need to pack again. 4. If any previously packed file is missing, we repack everything. 5. Otherwise, the existing files are up-to-date and repacking is not required. - [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint && make test`? - [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? ---

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged a lifecycle optimization that skips redundant file packing by verifying existing pack lists, prime timestamps, and file integrity. Approved by three reviewers and passed CI checks, successfully integrating the change.
qwen3.6-35b-a3b-mtp-q6 Merged to skip redundant lifecycle repacking. The change tracks packed files and validates them against prime timestamps and existence, preventing unnecessary operations when artifacts are already up-to-date.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#52 lifecycle: emit progress for packing craft-application merged Merged into main. Adds progress emission during packing to prevent a long ticker on the Lifecycle finished message. Approved by two reviewers, passed CI, and modified two files with two added lines.
76%
#237 feat(lifecycle): always track stage packages craft-application merged Merged to always track stage packages in the lifecycle. Approved by three reviewers with zero unresolved comments. The single-line change was validated for compatibility with craft-application-based Snapcraft.
74%
#766 fix(lifecycle): don't rebuild on test file changes craft-application merged Merged fix that adds spread files to the lifecycle manager's ignore list, preventing unnecessary repulls when test files change. Approved by two reviewers, passed all CI checks, and resolves issue #756.
74%
#74 lifecycle: integrate executor clean and package list refresh (CRAFT-32) craft-parts merged Merged after two reviewer approvals and passing CI checks. Integrates executor cleaning and package list refresh methods into the lifecycle manager, adding 250 lines across three files.
72%