← Back to issue list

move "repo" code from snapcraft

View original Github issue

Metadata

Project
craft-archives
Number
#3
Type
pull request
State
closed
Author
tigarmo
Labels
Created
Updated
Closed

Current evaluation

Merged after approval, moving the snapcraft.repo package and tests to craft_archives. Updates include switching to loggers, adding a base error class, copying utility packages, and applying stricter linting fixes.

Suggested action:

No scores available.

Issue body

This PR have a lot of copy/pasted and automated fixes, so I strongly suggest looking at the individual commits: 1) The first commit is a literal copy-and-paste for the `snapcraft.repo` package and the tests in `tests/unit/repo`; 2) The second commit is a find-and-replace of "snapcraft" to "craft_archives". Note that I kept used filenames like `snapcraft.gpg` unchanged because this part of the code will be changed in the near future, and changing it now would break snapcraft; 3) The third commit has actual "manual" changes. These include using loggers instead of craft_cli's `emit()`, adding a base error class and copying the `os_release` and `util` utility packages from snapcraft. 4) The final commit has changes to address linting errors, because craft-archives uses `ruff` and `pyright` in stricter settings. CRAFT-1549

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged after approval, moving the snapcraft.repo package and tests to craft_archives. Updates include switching to loggers, adding a base error class, copying utility packages, and applying stricter linting fixes.
qwen3.6-35b-a3b-mtp-q6 Merged and closed after migrating the repository code to craft-archives, updating logging and error handling, and resolving linting issues for CRAFT-1549.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3649 parts,repo: integrate package-repositories (CRAFT-847) snapcraft merged Merged into the 7.0 branch following approval and CI checks. Integrates package-repositories support to configure host apt repositories based on snapcraft.yaml. Updates span 21 files with 447 additions and 29 deletions.
72%
#1499 repo: make errors based on SnapcraftError snapcraft merged Merged a fix preventing repo-based errors from triggering tracebacks outside debug mode by inheriting from SnapcraftError. Approved by two reviewers, passed CI, and resolves an oversight from PR #1436.
71%
#4037 repo: Migrate to craft-archives snapcraft merged Merged craft-archives migration, replacing 4547 lines with 28 across 34 files. Approved by two reviewers, passed CI, and merged to main. Codecov noted a minor coverage drop with 100% diff coverage. Unrelated spread timeouts did not block the merge.
71%
#2096 tests: don't use os_release and repo from snapcraft snapcraft merged Merged PR removing os_release and repo imports from the snapcraft module in integration tests, replacing them with dedicated modules. Fixes #1982. Approved by two reviewers and merged despite a suggestion to extract shared functionality.
71%
#4596 fix(package): use correct target-arch on snap snapcraft merged Merged following approval. Fixes incorrect target-arch in the Package service, aligns tests with craft-application updates, and updates spread tests. 14 files changed, +61/-50 lines.
70%