ECS Instance exception in version 1.5.0
- Dominant language
- Python
- Stars
- 15
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Hi there, thanks very much for this useful Ansible provider for Alicloud.
I believe I may have found a bug introduced in https://github.com/alibaba/footmark/commit/ed325dea9abae2ec42c91ff94fb73d84491f0993.
When using the `ali_instance` module of https://github.com/alibaba/ansible-provider version 1.5.0, I receive a `TypeError: string indices must be integers, not str` for the following line (https://github.com/alibaba/footmark/blob/master/footmark/ecs/instance.py#L249):
```
if value and value["ip_address"]:
```
It seems that `value` is a string rather than a dictionary-like object? In case it is relevant, I have the `assign_public_ip` parameter of `ali_instance` set to `True`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in footmark/ecs/instance.py at line 249 and compare the surrounding value handling with commit ed325dea9abae2ec42c91ff94fb73d84491f0993. Reproduce the ali_instance failure with assign_public_ip set to true, then verify that the ECS instance path no longer raises the reported TypeError and still handles the returned value correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100