Mirrorlist should deal with unmatched, slightly incorrect versions and multiple minors for one major
- Ngôn ngữ chính
- Python
- Star
- 93
- Fork
- 483
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 6
Mô tả
This came up while releasing 9.5 - the mirror system currently cannot handle 9.5 and 9.4 being support versions at the same time because only one exists in the `duplicated_versions` mapping. This is a regression introduced by the kitten support PR.
Relevant points in code and errors:
https://github.com/AlmaLinux/mirrors/blob/mirrors_service/src/backend/api/handlers.py#L434
https://github.com/AlmaLinux/mirrors/blob/mirrors_service/src/backend/api/handlers.py#L434
```
/opt/mirror_service/src/backend/update_mirrors.py:272: DeprecationWarning: There is no current event loop
loop = asyncio.get_event_loop()
Traceback (most recent call last):
File "/opt/mirror_service/src/backend/update_mirrors.py", line 273, in
loop.run_until_complete(update_mirrors())
File "/usr/lib64/python3.12/asyncio/base_events.py", line 684, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/opt/mirror_service/src/backend/update_mirrors.py", line 269, in update_mirrors
await task
File "/opt/mirror_service/src/backend/update_mirrors.py", line 103, in update_mirrors_handler
mirror_iso_uris = mirror_processor.get_mirror_iso_uris(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mirror_service/src/backend/api/mirror_processor.py", line 472, in get_mirror_iso_uris
for arch in arches[base_version]:
~~~~~~^^^^^^^^^^^^^^
KeyError: '9.5'
```
The expected functionality is for versions without a mapping in duplicate_version to still attempt to map to a valid major.
For example:
9.2 should map to 9
9.1111 should map to 9
9.97234 should map to 9
These are all past-supported versions, or invalid minors, but we should map the pattern to the major where we can make reasonable assumptions.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.