← Back to issue list

Installer tests fail on non-LTS Ubuntu versions

View original Github issue

Metadata

Project
craft-archives
Number
#102
Type
issue
State
open
Author
lengau
Labels
Status: Triaged Type: Cleanup
Created
Updated
Closed

Current evaluation

Integration test test_installer.py raised KeyError on non-LTS Ubuntu codenames (e.g. mantic) because RELEASE_TO_CLOUD used direct dict access. Fixed in PR #115 by switching to .get() and making cloud archive tests optional by distro.

Suggested action: close stale

Reason: The original problem is no longer reproducible: commit ff30dc3 (PR #115, 'test: make cloud archive tests optional by distro') changed line 58 from RELEASE_TO_CLOUD[VERSION_CODENAME] to RELEASE_TO_CLOUD.get(VERSION_CODENAME), eliminating the KeyError. The issue is 1049 days old with only a bot Jira-sync comment in the last 157 days, and the fix is already merged into the codebase.

Impact: 30 Quick Win: 27.0 Staleness: 75 Complexity: 10 Confidence: 88 Support Request: 5

Issue body

### Bug Description If you're on a version of Ubuntu with a codename not mentioned in `test_installer.py`'s `RELEASE_TO_CLOUD`, the integration tests fail to setup due to the version codename not matching. ### To Reproduce Clone the repository and try to run pytest on mantic. ### part yaml ```shell N/A ``` ### Relevant log output ```shell ================================================================================================================================================================================================================================ test session starts ================================================================================================================================================================================================================================= platform linux -- Python 3.8.18, pytest-7.4.2, pluggy-1.3.0 rootdir: /home/lengau/Work/Code/craft-archives configfile: pyproject.toml plugins: mock-3.11.1, check-2.2.1, cov-4.1.0 collected 188 items / 1 error ======================================================================================================================================================================================================================================= ERRORS ======================================================================================================================================================================================================================================= _____________________________________________________________________________________________________________________________________________________________________________________________________________ ERROR collecting tests/integration/repo/test_installer.py ______________________________________________________________________________________________________________________________________________________________________________________________________________ .venv/lib/python3.8/site-packages/_pytest/runner.py:341: in from_call result: Optional[TResult] = func() .venv/lib/python3.8/site-packages/_pytest/runner.py:372: in <lambda> call = CallInfo.from_call(lambda: list(collector.collect()), "collect") .venv/lib/python3.8/site-packages/_pytest/python.py:531: in collect self._inject_setup_module_fixture() .venv/lib/python3.8/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture self.obj, ("setUpModule", "setup_module") .venv/lib/python3.8/site-packages/_pytest/python.py:310: in obj self._obj = obj = self._getobj() .venv/lib/python3.8/site-packages/_pytest/python.py:528: in _getobj return self._importtestmodule() .venv/lib/python3.8/site-packages/_pytest/python.py:617: in _importtestmodule mod = import_path(self.path, mode=importmode, root=self.config.rootpath) .venv/lib/python3.8/site-packages/_pytest/pathlib.py:567: in import_path importlib.import_module(module_name) /usr/lib/python3.8/importlib/__init__.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) <frozen importlib._bootstrap>:1014: in _gcd_import ??? <frozen importlib._bootstrap>:991: in _find_and_load ??? <frozen importlib._bootstrap>:975: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:671: in _load_unlocked ??? .venv/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:178: in exec_module exec(co, module.__dict__) tests/integration/repo/test_installer.py:58: in <module> CLOUD_DATA = RELEASE_TO_CLOUD[VERSION_CODENAME] E KeyError: 'mantic' ============================================================================================================================================================================================================================== short test summary info =============================================================================================================================================================================================================================== ERROR tests/integration/repo/test_installer.py - KeyError: 'mantic' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ================================================================================================================================================================================================================================== 1 error in 0.21s ================================================================================================================================================================================================================================== ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 30
Quick Win: 27.0
Staleness: 75
Complexity: 10
Confidence: 88
Support Request: 5
close stale Integration test test_installer.py raised KeyError on non-LTS Ubuntu codenames (e.g. mantic) because RELEASE_TO_CLOUD used direct dict access. Fixed in PR #115 by switching to .get() and making cloud archive tests optional by distro.
qwen/qwen3.6-35b-a3b
Staleness: 70
Complexity: 15
Confidence: 85
Support Request: 5
keep open Integration tests fail on non-LTS Ubuntu releases due to missing codename mappings in RELEASE_TO_CLOUD. Issue is triaged but has seen no maintainer activity in over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 15
Confidence: 85
Support Request: 5
close stale Integration tests fail with a KeyError on non-LTS Ubuntu codenames due to an incomplete RELEASE_TO_CLOUD mapping. Triaged by maintainer, awaiting fix.
qwen3.6-35b-a3b-mtp-q6
Staleness: 70
Complexity: 20
Confidence: 75
Support Request: 5
keep open Installer tests fail on non-LTS Ubuntu versions due to missing codename mappings in RELEASE_TO_CLOUD. Triaged and awaiting cleanup. Last activity 81 days ago.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: craft-archives#115 (confidence 92%)

    Commit ff30dc3 'test: make cloud archive tests optional by distro (#115)' changed RELEASE_TO_CLOUD[VERSION_CODENAME] to RELEASE_TO_CLOUD.get(VERSION_CODENAME) and added conditional logic for CLOUD_DATA, directly addressing the KeyError reported in this issue.

Related issues

No related issues found above the similarity threshold.