when testing encodings for ansible - windows hosts error occurs [venv/lib/python3.12/site-packages/testinfra/backend/ansible.py:62: KeyError]
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- ansible, python
調査の方向性
Start with test_infra.py and trace the failure through testinfra/backend/ansible.py:get_encoding, backend/base.py, and utils/ansible_runner.py:run_module. Reproduce the encoding check against a Windows host and inspect the captured Ansible result. Done means the Windows encoding test no longer raises the reported KeyError or related failure.
索引モデルが issue の本文から書いたものです。
説明
> result = host.ansible(
"win_shell",
f"Get-Content -Path '{file_path}' | Out-String",
check=False,
become=True,
become_user="vlan8user",
become_method="runas",
)
test_infra.py:20:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.12/site-packages/testinfra/modules/ansible.py:43: in wrapper
return func(self, *args, **kwargs)
venv/lib/python3.12/site-packages/testinfra/modules/ansible.py:110: in __call__
result = self._host.backend.run_ansible(
venv/lib/python3.12/site-packages/testinfra/backend/ansible.py:72: in run_ansible
result = self.ansible_runner.run_module(
venv/lib/python3.12/site-packages/testinfra/utils/ansible_runner.py:411: in run_module
with open(fpath, "r", encoding=get_encoding()) as f:
venv/lib/python3.12/site-packages/testinfra/backend/ansible.py:70: in get_encoding
return self.encoding
venv/lib/python3.12/site-packages/testinfra/backend/base.py:303: in encoding
self._encoding = self.get_encoding()
venv/lib/python3.12/site-packages/testinfra/backend/base.py:283: in get_encoding
cmd = self.run(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <testinfra.backend.ansible.AnsibleBackend object at 0x7f0793cdf9e0>
command = "python3 -c 'import locale;print(locale.getpreferredencoding())'"
args = ('python3',), kwargs = {'encoding': None}
out = {'ansible_facts': {'discovered_interpreter_python': '/usr/bin/python3'}, 'changed': False, 'module_stderr': 'Exception...Operation: (:) [], RuntimeException\r\n + FullyQualifiedErrorId : BadExpression\r\n \r\n', 'module_stdout': '', ...}
def run(
```
- 主要言語
- Python
- スター
- 2.5k
- フォーク
- 360
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pytest-testinfra のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
pytest-dev/pytest-testinfra#815 ·
-
service is_enabled does not work with exit code 4対応中かも @pfuntner が 554 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
pytest-dev/pytest-testinfra#801 · コメント 1 件 ·
-
Chroot backendオープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
pytest-dev/pytest-testinfra#789 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
pytest-dev/pytest-testinfra#788 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
pytest-dev/pytest-testinfra#784 ·
pytest-dev/pytest-testinfra の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Multi-day events show "Ended" while still in progress対応中かも @tarunagnihotri534 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
data-umbrella/du-event-board#231 · コメント 2 件 ·
-
avl_automation: the generated control surface block isn't valid XML (typo in avl_out_parse.py)対応中かも @brksol が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
PX4/PX4-gazebo-models#164 ·