← Back to issue list

Remove Application.run_managed

View original Github issue

Metadata

Project
craft-application
Number
#1062
Type
issue
State
closed
Author
mr-cal
Labels
Status: Triaged Type: Cleanup
Created
Updated
Closed

Current evaluation

Merged PR #1077 (e00540d1) removed Application and BaseCommands managed-command APIs; commands now use ProviderService directly, completing the clarified cleanup in 7.0.0.

Resolution: closed resolved

Reason: PR canonical/craft-application#1077 was merged as commit e00540d1, removing Application.run_managed, AppCommand.run_managed, and related managed-command helpers. The 7.0.0 changelog directs callers to ProviderService.run_managed instead.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done - Remove [Application.run_managed](https://github.com/canonical/craft-application/blob/4b0e00ae40b338ad9f837ac18bf063afebd086a4/craft_application/application.py#L420) in favor of [ProviderService.run_managed](https://github.com/canonical/craft-application/blob/4b0e00ae40b338ad9f837ac18bf063afebd086a4/craft_application/services/provider.py#L538) - Add a new property `Command.runs_managed` - Deprecated the property [AppCommand.run_managed](https://github.com/canonical/craft-application/blob/4b0e00ae40b338ad9f837ac18bf063afebd086a4/craft_application/commands/base.py#L94) and in favor of a new property AppCommand.runs_managed - Release a new major version of Craft Application ### Why it needs to get done To improve readability; it's confusing to have both. Developers may add code to Application.run_managed and not realize it won't execute. ### Background When run_managed was migrated from the Application to the Provider service in a previous redesign, we forgot to remove the old run_mananged function. Using the exact same name for AppCommand's run_managed property was an oversight.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1077 (e00540d1) removed Application and BaseCommands managed-command APIs; commands now use ProviderService directly, completing the clarified cleanup in 7.0.0.
stealth/space-bunny-alpha — closed resolved Merged PR #1077 (e00540d1) for 7.0.0, removing Application/AppCommand managed-command helpers; commands now call ProviderService directly.
stealth/space-bunny-alpha — closed resolved Merged PR #1077 (e00540d1) removed managed commands, completing the clarified cleanup of Application and BaseCommands run_managed functionality.
qwen/qwen3.6-35b-a3b — — Closed after the maintainer clarified the scope to remove legacy run_managed methods from Application and BaseCommands, routing commands to ProviderService. Tracked as CRAFT-5150.
qwen/qwen3.6-35b-a3b — — Closed after scope clarification to remove the deprecated Application.run_managed method. Commands now call ProviderService.run_managed directly, eliminating redundancy and improving readability.
qwen/qwen3.6-35b-a3b — — Closed after scope clarification. The run_managed method will be removed from Application and BaseCommands, with commands calling ProviderService directly to eliminate redundancy and prevent execution confusion.
qwen3.6-35b-a3b-mtp-q6 — — Closed after scope clarification. The task was refined to remove legacy run_managed from Application and BaseCommands, requiring commands to call ProviderService directly.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#1075 chore!: remove Application.run_managed craft-application closed Closed unmerged and replaced by #1077, which removed managed-command APIs and completed the ProviderService migration in commit e00540d1.
77%
#1077 chore!: remove managed commands craft-application merged Merged PR #1077 as commit e00540d1, removing managed-command APIs so managed instances launch only through ProviderService as part of the breaking 7.0.0 cleanup.
75%
#917 BREAKING: remove `get_managed_cmd` craft-application closed Removed unused get_managed_cmd in the broader managed-command cleanup, merged as canonical/craft-application#1077 (e00540d1) and released in 7.0.0.
71%