providers: refactor `capture_logs_from_instance()`
Metadata
Current evaluation
Merged PR #3935 as d0da7f83f, moving capture_logs_from_instance() to providers.py and adopting craft-providers temporarily_pull_file().
Resolution: closed resolved
Reason: PR #3935 was merged into main as commit d0da7f83f. The change relocated log capture and replaced the previous provider API with temporarily_pull_file().
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [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] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
Refactor `capture_logs_from_instance()`:
- Use new `craft-providers` call `temporarily_pull_file()`
- Move method to `snapcraft/providers/providers.py`
Similar to [rockcraft](https://github.com/canonical/rockcraft/pull/77)
(CRAFT-1307)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3935 as d0da7f83f, moving capture_logs_from_instance() to providers.py and adopting craft-providers temporarily_pull_file(). | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #3935 (d0da7f83f), moving log capture to providers.py and replacing the old API with craft-providers temporarily_pull_file(). | |
| qwen/qwen3.6-35b-a3b | — | — | Merged into main following approval and passing CI. Refactored capture_logs_from_instance() to use craft-providers temporarily_pull_file() and moved it to providers.py, trimming 28 lines and increasing coverage by 0.09%. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main. Refactored capture_logs_from_instance() to use craft-providers temporarily_pull_file() and relocated it to snapcraft/providers/providers.py. Increased test coverage by 0.09%. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #77 providers: capture logs from instance | rockcraft | merged | Merged as commit 1fe5b57b: refactored instance log capture to use craft-providers temporarily_pull_file() and moved the method into providers.py. | |
| #3950 providers: capture logs with debug-level logging | snapcraft | merged | Merged PR #3950 (848d7c830), restoring provider logs to debug level so capture_logs_from_instance() saves them to the log file instead of emitting them at trace level. | |
| #893 (internal) Refactor capture_logs_from_instance to use new interface (CRAFT-1306). | charmcraft | merged | Merged #893, refactoring capture_logs_from_instance to use the new CRAFT-1306 interface; implementation commit 5db3467c was merged via 35ed820a. | |
| #484 providers: refactor to better support multiple providers (CRAFT-362) | charmcraft | merged | Merged PR #484 (commit 93982f90, merge 7a1f50fc) by cjp256 converted providers module into a package for CRAFT-362: added common Provider class, LXDProvider subclass and get_provider(); follow-ups moved get_provider() to providers.py and renamed _helpers to _logs. |