← Back to issue list

build providers: provide support to shell in

View original Github issue

Metadata

Project
snapcraft
Number
#2249
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Merged. Adds shell access support to build providers, resolving LP #1782775. Approved by reviewer, passed CI checks, and implemented across 8 files.

Suggested action:

No scores available.

Issue body

Add support to shell into the provider, $ $SNAP/usr/bin/python3 Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from snapcraft.cli import echo >>> from snapcraft.project import Project >>> from snapcraft.internal.build_providers import get_provider_for >>> p = Project(snapcraft_yaml_file_path="snapcraft.yaml") >>> mp = get_provider_for("multipass") >>> instance = mp(project=p, echoer=echo) >>> instance.create() snapcraft 2.42.1+git81.gca11846.dirty installed >>> instance.shell() Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-134-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage Get cloud support with Ubuntu Advantage Cloud Guest: http://www.ubuntu.com/business/services/cloud 0 packages can be updated. 0 updates are security updates. New release '18.04.1 LTS' available. Run 'do-release-upgrade' to upgrade to it. Last login: Fri Sep 7 17:01:08 2018 from 10.72.100.1 snapcraft-make-hello # ls parts prime project snap stage state snapcraft-make-hello # logout >>> instance.destroy() >>> LP: #1782775 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Adds shell access support to build providers, resolving LP #1782775. Approved by reviewer, passed CI checks, and implemented across 8 files.
qwen3.6-35b-a3b-mtp-q6 Merged. Introduces instance.shell() to build providers for interactive environment access, resolving LP: #1782775. Code passed unit tests, static checks, and achieved 92.85% diff coverage.
qwen3.6-35b-a3b-mtp-q6 Implemented instance.shell() for build providers like Multipass, enabling interactive sessions. Merged to master, resolving LP #1782775. Codecov reported 92.85% diff coverage.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2254 build providers: add support for --shell snapcraft merged Merged after approval by two reviewers. Adds --shell support to build providers across three files. Passed all unit and static tests with 100% diff coverage.
87%
#2252 build providers: shell in provider if debug is used snapcraft merged Merged changes enabling shell access in build providers during debug sessions. Approved by a reviewer, passed CI, and updated five files with 112 additions and 21 deletions.
86%
#2253 build-providers: add support for --shell-after snapcraft merged Merged pull request adding --shell-after support to build-providers. Approved by one reviewer with 100% diff coverage. Changes span 3 files, adding 87 lines and removing 6.
80%
#2515 build providers: support for provider setup snapcraft merged Merged after approval and passing CI. Implemented provider setup support by relocating checks and initialization logic into provider implementations. Modified ten files (+212/-121 lines) and resolves LP #1821586.
75%
#2275 build providers: use the provider if exported snapcraft merged Merged an update to build provider logic that enables using a provider if it is exported. Approved by a reviewer, passed CI checks, and integrated into the codebase.
73%
#2374 build providers: destroy on create failures snapcraft merged Merged. Resolves a bug where build providers and VMs remained running after launch failures. Adds cleanup logic and tests across seven files, approved by a reviewer and passing CI checks.
72%
#2474 build providers: remove dead code snapcraft merged Merged removal of dead code for legacy cleanbuild support in build providers. Approved by one reviewer, passed CI, and modified three files (+54/-165 lines).
71%
#5537 docs: update build provider procedures snapcraft merged Merged documentation update to build provider procedures, resolving issue #5519. Approved by two reviewers and passed most CI checks despite minor integration test failures. Changes span four files with 100 lines added and 98 removed.
70%