storeapi: better handle network errors and retries
Metadata
Current evaluation
Merged #2094 as 0d8602cc5, silencing urllib retry warnings and handling Store API connection failure after retry exhaustion without a traceback; fixes LP #1765671.
Resolution: closed resolved
Reason: PR #2094 was approved and merged as commit 0d8602cc5, resolving the network retry and connection-error handling problems.
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] 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 unit`?
-----
Currently Snapcraft prints an ugly warning every time it retries a connection instead of just retrying until the max number has occurred. And then, if after all the retries have happened and no connection has been made, it dumps a traceback.
This PR fixes LP: [#1765671](https://bugs.launchpad.net/snapcraft/+bug/1765671) by fixing both of othese issues: up the log level of urllib to ERROR, and properly handle connection errors resulting from exceeding the maximum number of retries.
In the long run, we should consider doing retries differently-- this stuff leaks right through requests.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #2094 as 0d8602cc5, silencing urllib retry warnings and handling Store API connection failure after retry exhaustion without a traceback; fixes LP #1765671. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2094 as commit 0d8602cc5, silencing urllib retry warnings and handling Store API connection failures after retry exhaustion without tracebacks; fixes LP #1765671. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #2094 in commit 0d8602cc5, quieting urllib retry warnings and handling exhausted store API retries without an ugly traceback; fixes LP bug #1765671. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolves Launchpad bug #1765671 by improving storeapi network error handling. Sets urllib log level to ERROR and properly manages max retry failures, eliminating verbose warnings and tracebacks. Approved and merged after passing CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged storeapi updates resolving Launchpad bug #1765671. Raises urllib log level to ERROR and properly handles max retry connection failures, eliminating verbose warnings and tracebacks. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1936 storeapi: handle errors even for >400 responses | snapcraft | merged | Merged PR #1936 (688588a0d) fixed Store API error handling for HTTP responses above 400, preventing failed responses from being mistaken for missing responses. | |
| #2116 storeapi: handle 5xx error codes for all store endpoints | snapcraft | merged | Merged PR #2116 as commit c6500ca0e, generalizing Store API 5xx handling across all endpoints and fixing LP #1768370. |