← 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 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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged the addition of a ProjectService for project handling. The update refactors application logic, removes the abstract service class and factory checks, and updates tests. Changelog entries were added, with documentation review planned before main merge.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#666 feat!(services): build plan service craft-application merged Merged the build plan service implementation, resolving CRAFT-4159. Approved by two reviewers and passing CI, the change spans 42 files with 1851 additions and 786 deletions.
73%
#40 services: allow the service factory to be created before the project. craft-application merged Merged into main. Enables creating the service factory before the project. Approved by two reviewers, modified nine files with 65 additions and 13 deletions, and increased test coverage by 0.01%.
72%
#674 feat!(ProjectService): allow the ProjectService to work with Imagecraft craft-application merged Merged the feature enabling ProjectService to work with Imagecraft. Approved by two reviewers, the update modifies 17 files with 493 additions and 223 deletions.
71%
#119 feat(services): app services that don't depend on a project craft-application merged Merged after approval by two reviewers and passing CI. The pull request adds app services independent of a project, modifying 17 files. The diff achieved 96.29% coverage, causing a minor 0.10% overall coverage decrease.
71%