Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(application): enable build plans #70

Merged
merged 14 commits into from
Sep 19, 2023

Conversation

cmatsuoka
Copy link
Contributor

@cmatsuoka cmatsuoka commented Sep 7, 2023

Enable multi-artefact builds by using the application-defined build plan
resolver to create multiple provider instances. Further refactoring may
be necessary if applications such as Rockcraft and Charmcraft require
additional features.

Fixes #60

Signed-off-by: Claudio Matsuoka [email protected]


Note

  • Passing the target architecture in service creation because instantiating the lifecycle manager in the run method proved to be problematic in certain situations, this can be refactored later if needed.
  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run tox?

@cmatsuoka cmatsuoka requested a review from lengau September 7, 2023 21:57
@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #70 (d01f055) into main (d93caa8) will decrease coverage by 0.31%.
The diff coverage is 96.05%.

@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
- Coverage   98.70%   98.39%   -0.31%     
==========================================
  Files          21       22       +1     
  Lines         693      749      +56     
  Branches      101      109       +8     
==========================================
+ Hits          684      737      +53     
- Misses          7        9       +2     
- Partials        2        3       +1     
Files Changed Coverage Δ
craft_application/application.py 93.97% <92.30%> (-1.06%) ⬇️
craft_application/commands/base.py 100.00% <100.00%> (ø)
craft_application/commands/lifecycle.py 100.00% <100.00%> (ø)
craft_application/models/__init__.py 100.00% <100.00%> (ø)
craft_application/models/project.py 100.00% <100.00%> (ø)
craft_application/services/lifecycle.py 97.10% <100.00%> (+0.13%) ⬆️
craft_application/services/provider.py 100.00% <100.00%> (ø)
craft_application/util/__init__.py 100.00% <100.00%> (ø)
craft_application/util/platforms.py 100.00% <100.00%> (ø)

Copy link
Contributor

@lengau lengau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the direction of this.

craft_application/application.py Show resolved Hide resolved
craft_application/models/project.py Show resolved Hide resolved
Enable multi-artefact builds by using the application-defined build plan
resolver to create multiple provider instances. Further refactoring may
be necessary if applications such as Rockcraft and Charmcraft require
additional features.

Signed-off-by: Claudio Matsuoka <[email protected]>
@cmatsuoka cmatsuoka force-pushed the issue-60/get_build_plan branch from 8a6de1f to d9323c3 Compare September 8, 2023 17:48
@cmatsuoka
Copy link
Contributor Author

Rebased on main.

@cmatsuoka cmatsuoka requested a review from mr-cal September 8, 2023 17:49
@cmatsuoka cmatsuoka requested a review from tigarmo September 9, 2023 08:45
Signed-off-by: Claudio Matsuoka <[email protected]>
@cmatsuoka cmatsuoka force-pushed the issue-60/get_build_plan branch 3 times, most recently from e5bbafe to 27e48d3 Compare September 9, 2023 21:37
@cmatsuoka cmatsuoka force-pushed the issue-60/get_build_plan branch from 27e48d3 to c0574b6 Compare September 10, 2023 08:51
@cmatsuoka cmatsuoka force-pushed the issue-60/get_build_plan branch 4 times, most recently from fa6e0e6 to 53c6bbc Compare September 10, 2023 15:58
Support for outer commands that need project to be loaded.

Signed-off-by: Claudio Matsuoka <[email protected]>
@cmatsuoka cmatsuoka force-pushed the issue-60/get_build_plan branch from 53c6bbc to 8bd11bd Compare September 10, 2023 16:13
@sergiusens sergiusens requested a review from lengau September 11, 2023 12:57
craft_application/util/platforms.py Show resolved Hide resolved
craft_application/commands/lifecycle.py Outdated Show resolved Hide resolved
craft_application/models/project.py Show resolved Hide resolved
craft_application/services/lifecycle.py Show resolved Hide resolved
craft_application/services/provider.py Outdated Show resolved Hide resolved
tests/integration/test_application.py Outdated Show resolved Hide resolved
@cmatsuoka cmatsuoka requested a review from tigarmo September 18, 2023 19:21
@sergiusens sergiusens merged commit 082e621 into canonical:main Sep 19, 2023
4 of 7 checks passed
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.

Support build plans
5 participants