docker-to-squash.py does not run on Python 3
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 54/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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 ʕ•ᴥ•ʔ
- 主要言語
- Java
- スター
- 6.7k
- フォーク
- 4k
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 86
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/storm のほかの issue
-
docker-to-squash.py: check_dependencies should find mksquashfs on PATH対応中かも @linzch3 が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
docker-to-squash.py: get_working_dir creates a new directory on every call, so push-update cannot find pulled images対応中かも @linzch3 が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
apache/storm#9155 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Kafka spout cannot commit past a message that always fails to deserialize対応中かも @linzch3 が 10 日前に担当しました。 オープンbug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/storm#9078 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/storm#9077 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
PCL-Community/PCL-CE#3907 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 2 日以内に返信
-
area/dependencies area/dependencies/quarkus backport/26.6 backport/26.8 kind/cve severity/critical source/scan-dependencies status/triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
chore
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
lugassawan/swe-workbench#841 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
EndlessPixel-Studio/FakePlayer-CE#155 ·
メンテナーはふだん 1 日以内に返信