lifecycle: fix double emit.pause() call
Metadata
Current evaluation
Merged #3982 as commit 002fa389b into hotfix/7.2, removing a duplicate emit.pause() call and restoring missing craft-providers setup logs.
Resolution: closed resolved
Reason: PR #3982 was merged into hotfix/7.2 as commit 002fa389b. It fixed the provider-unavailable RuntimeError caused by pausing the emitter twice and corrected suppressed provider setup logs.
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`?
-----
This resolves an issue where `emit.pause()` is called twice when the build provider is not installed and raises a RuntimeError (reported [here](https://bugs.launchpad.net/snapcraft/+bug/1995877) and [here](https://forum.snapcraft.io/t/call-for-testing-snapcraft-7-2-0/32171/30))
This also resolves another issue with log output from craft-providers not being logged. The setup of the instance was behind the paused emitter and not being logged properly.
This double `emit.pause()` bug happened because two PRs added `emit.pause()` in different places at different times (https://github.com/snapcore/snapcraft/pull/3919 and https://github.com/snapcore/snapcraft/pull/3866). I merged the second PR without realizing the first PR already solved the problem.
(CRAFT-1466)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #3982 as commit 002fa389b into hotfix/7.2, removing a duplicate emit.pause() call and restoring missing craft-providers setup logs. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #3982 (commit 002fa389b), removing duplicate emit.pause() calls and restoring craft-providers setup log output. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #3982 (commit 002fa389b) into hotfix/7.2, removing a duplicate emit.pause() call and fixing missing provider setup logs when a build provider is unavailable. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged into hotfix/7.2 to fix a double emit.pause() call bug and log output issue in the lifecycle module. Resolves a conflict from two prior PRs adding the same pause call, ensuring correct provider initialization and logging. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix for a double emit.pause() call bug in the lifecycle module, caused by overlapping prior PRs. Also resolves missing craft-providers log output. Integrated into the hotfix/7.2 branch. |
Update history
No update history recorded yet.
Related work
-
Caused By:
canonical/snapcraft#3919
(confidence 95%)
One of two independently merged changes that added emit.pause() calls and contributed to the duplication.
-
Caused By:
canonical/snapcraft#3866
(confidence 95%)
The second change added another emit.pause() call before the overlap was recognized.
Related issues
No related issues found above the similarity threshold.