← Back to issue list

feat!(services): add a project service

View original Github issue

Metadata

Project
craft-application
Number
#646
Type
pull request
State
merged
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #646 added ProjectService, refactored application/service wiring, and added documentation and tests; it landed as commit 16a20e36.

Resolution: closed resolved

Reason: PR #646 was approved and merged into main as commit 16a20e36, introducing the new project service and its supporting changes.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint && make test`? - [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? --- This creates a ProjectService for handling projects. There are a few tests that this causes issues with because it messes with build plans, so those are being skipped until I implement the BuildPlanService. This is pretty huge, so I'm providing a review methodology. I'd recommend marking each file as viewed as you complete it, even if you have comments, because there's a "draw the rest of the owl" step at the end. 0. Start with the [Project service loading docs](https://github.com/canonical/craft-application/pull/646/files#diff-8e49a7f0ac74be30a10132028c1931087113ad48d71fc1d1998629150c24a810) ([rendered](https://canonical-craft-application--646.com.readthedocs.build/en/646/reference/services/project.html)), which should provide you a good overview of how the project service works. 1. Review the [ProjectService](https://github.com/canonical/craft-application/pull/646/files#diff-5a1e547ec3a0d86ebd396803eabf6624306b1a16cef192d4c55487897a9d8ea6) itself. This is the actual core of the new logic. 2. Review the project service's [unit tests](https://github.com/canonical/craft-application/pull/646/files#diff-5ee27f14c3f1dcd64168b32257f30fa15224c404d0214e05fc7700a5949b2a80) 3. Review its [integration tests](https://github.com/canonical/craft-application/pull/646/files#diff-3f1652f319866123c47414cba0b56322afb24006abf0f09770753793471cf43d), including the example input/output files. 4. Review the changes to the [Application](https://github.com/canonical/craft-application/pull/646/files#diff-c395b65ed7321f1bbf3c026ade9775f6a47275ae4051f4981b0376c1730c25d4), which remove project rendering. Here's a good spot to look for anything I may have overlooked when moving the logic. 5. Review the changes to the [other services](https://github.com/canonical/craft-application/pull/646/files#diff-8cfe583d128cb2174b245b5785d6eaba5af9d20433f3720cef63419ca9f6d0fc). I'll put in some implementation notes that are only really relevant when considering the changes. 6. Review the [new fixtures for this](https://github.com/canonical/craft-application/pull/646/files#diff-e52e4ddd58b7ef887ab03c04116e676f6280b824ab7469d5d3080e5cba4f2128). 7. Note that we no longer have a [ProjectService abstract class](https://github.com/canonical/craft-application/pull/646/files#diff-9e72350838e6e9e4037f411d655f403e8a89110e21e8d4e995219a08592162e7) 8. Likewise, the [Service factory](https://github.com/canonical/craft-application/pull/646/files#diff-d97e1b2bfd9957facfebc258560b21012fb71e5c64f93bf93098543da2242902) now no longer checks for a project before creating services 9. Review the rest of the services 10. Review any files you haven't already reviewed. CRAFT-4158

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #646 added ProjectService, refactored application/service wiring, and added documentation and tests; it landed as commit 16a20e36.
stealth/space-bunny-alpha — closed resolved Merged as commit 16a20e36: adds a concrete ProjectService for project loading/rendering, drops the abstract ProjectService, and moves project rendering out of Application. Shipped in 5.0.0 (CRAFT-4158).
stealth/space-bunny-alpha — closed resolved Merged in PR #646, adding ProjectService for project handling; commit 16a20e36 updated Application and service wiring and added unit and integration tests.
stealth/space-bunny-alpha — closed resolved Merged PR #646 as commit 16a20e36, adding ProjectService, moving project rendering out of Application, and replacing the abstract project service with factory-managed loading.
stealth/space-bunny-alpha — closed resolved Merged #646 as commit 16a20e36, adding ProjectService with unit and integration tests, moving project handling out of Application, and simplifying service creation.
qwen/qwen3.6-35b-a3b — — Merged the new ProjectService for handling projects. Changes replace the abstract service class, update the service factory and Application, and add unit and integration tests. Approved by two reviewers and passed CI.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#119 feat(services): app services that don't depend on a project craft-application merged Merged PR #119 added app services independent of a project; implemented in commit 428ba80d.
74%
#666 feat!(services): build plan service craft-application merged Merged BuildPlanService and related application, service, and testcraft changes in PR #666 (commit 621d1a32), resolving CRAFT-4159.
73%