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!: hybrid commands! #677

Open
wants to merge 2 commits into
base: feature/hybrid-commands
Choose a base branch
from
Open

Conversation

lengau
Copy link
Contributor

@lengau lengau commented Mar 7, 2025

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run make lint && make test?
  • Have you added an entry to the changelog (docs/reference/changelog.rst)?

Requires #674

CRAFT-4163

@lengau lengau requested a review from upils March 7, 2025 00:39
@lengau lengau marked this pull request as draft March 7, 2025 00:39
lengau added 2 commits March 7, 2025 13:58
This roughly copies `run_managed` from the Application to the
ProviderService, but without iterating over a full build plan. This
enables hybrid commands, which would have roughly the following run
method:

def run(self, parsed_args):
    if util.is_managed():
        return self._run_managed()

    do_something_on_host()
    self._services.get("provider").run_managed(...)
    do_something_else_on_host()
This turns the lifecycle commands into hybrid commands, enabling them
to run both on the host and in the managed instance.
@lengau lengau force-pushed the work/CRAFT-4163 branch from a9dc719 to 85e01f4 Compare March 7, 2025 18:59
@lengau lengau changed the base branch from main to feature/hybrid-commands March 7, 2025 19:00
@lengau lengau marked this pull request as ready for review March 7, 2025 19:08
@lengau lengau closed this Mar 7, 2025
@lengau lengau reopened this Mar 7, 2025
@lengau lengau requested review from cmatsuoka and tigarmo March 7, 2025 20:10
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.

1 participant