docker-to-squash.py does not run on Python 3
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 54/100
Hướng nghiên cứu
Start with bin/docker-to-squash.py, especially the named functions and argument declarations: calculate_string_hash, read_image_tag_to_hash, write_local_image_tag_to_hash, convert_oci_whiteouts, and get_all_known_images. Run the reported python3 bin/docker-to-squash.py --help reproduction, then exercise the listed subcommands to check Python 3 behavior. Done means argument parsing and the affected commands work on Python 3, including byte handling and tag mapping.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
bin/docker-to-squash.py still uses Python 2 APIs and treats subprocess output (bytes) as str, so on Python 3 no subcommand gets past argument parsing.
Storm 3.3.0-SNAPSHOT (master 4fca209). Reproduced with Python 3.9, 3.10, and 3.13.
$ python3 bin/docker-to-squash.py --help
ImportError: cannot import name 'Iterable' from 'collections'
That comes from from collections import Iterable, which was removed in Python 3.10. On Python 3.9 the import succeeds, but --untagged-transition-sec is declared with type=long, and building the parser raises NameError: name 'long' is not defined.
Expected: the script imports, parses arguments, and runs subcommands on Python 3.
Actual: it fails as above before any subcommand runs. With those two patched, later calls still fail:
calculate_string_hashpassesstr(out)tosha.updateand raisesTypeError: Strings must be encoded before hashing.pull-build,pull-build-push-update,push-update, andadd-taghit this, and so doquery-tagandcopy-updatewhen they find the tag.write_local_image_tag_to_hashuseshash_to_tags.iteritems(), so commands that write the tag mapping (for exampleremove-tag) raiseAttributeError.get_all_known_imagescallsbytes.split(...), soremove-imageandcleanupraiseTypeError. Those functions also calllong()later on.read_image_tag_to_hashdoesstr(line)on bytes, sot1:<hash>\nbecomesb't1:<hash>\n'. Lines without a#commentfail the sha256 check and are dropped; lines with one keep ab'prefix on the first tag.query-tagandcopy-updatethen miss the existing tag.convert_oci_whiteoutsdoesstr(out).splitlines(), which joins the paths into one string, so no whiteout is converted. The failed commands are also hidden by theshell_commandissue.
Once Iterable and long are patched, list-tags and bootstrap run to completion.
Follow-up from the review discussion in #9284 ʕ•ᴥ•ʔ
- Ngôn ngữ chính
- Java
- Star
- 6.7k
- Fork
- 4k
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 86
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/storm
-
docker-to-squash.py: check_dependencies should find mksquashfs on PATHCó thể đã có người làm @linzch3 đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
docker-to-squash.py: get_working_dir creates a new directory on every call, so push-update cannot find pulled imagesCó thể đã có người làm @linzch3 đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
apache/storm#9155 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Kafka spout cannot commit past a message that always fails to deserializeCó thể đã có người làm @linzch3 đã nhận 10 ngày trước. Đang mởbug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/storm#9078 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/storm#9077 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
NeoForge 安装任务的子任务描述有误Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
PCL-Community/PCL-CE#3907 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 2 ngày
-
area/dependencies area/dependencies/quarkus backport/26.6 backport/26.8 kind/cve severity/critical source/scan-dependencies status/triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
chore
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
lugassawan/swe-workbench#841 ·
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EndlessPixel-Studio/FakePlayer-CE#155 ·
Maintainer thường phản hồi trong vòng 1 ngày