containers / containers/podman-compose

AttributeError: 'set' object has no attribute 'extend'

Open
#1,507 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

```Traceback (most recent call last):
File "/home/alex/.local/venv/podman-compose-1.6.0/bin/podman-compose", line 8, in
sys.exit(main())
~~~~^^
File "/home/alex/git/3rd/podman-compose/main/podman_compose.py", line 4972, in main
asyncio.run(async_main())
~~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/home/alex/git/3rd/podman-compose/main/podman_compose.py", line 4967, in async_main
await podman_compose.run()
File "/home/alex/git/3rd/podman-compose/main/podman_compose.py", line 2373, in run
self._parse_compose_file()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/alex/git/3rd/podman-compose/main/podman_compose.py", line 2685, in _parse_compose_file
resolve_extends(services, [name for _, name in service_names], self.environ)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alex/git/3rd/podman-compose/main/podman_compose.py", line 2246, in resolve_extends
new_service = rec_merge({}, from_service, service)
File "/home/alex/git/3rd/podman-compose/main/podman_compose.py", line 2198, in rec_merge
ret = rec_merge_one(target, source)
File "/home/alex/git/3rd/podman-compose/main/podman_compose.py", line 2181, in rec_merge_one
value.extend(value2)
^^^^^^^^^^^^
AttributeError: 'set' object has no attribute 'extend'
```

The value2 is ```{}```

I'm unable to produce sscce for compose.yaml at this time.
pc version 1.5.0 works with the same compose.yaml.

```% pc --version
podman-compose version 1.6.0
podman version 5.4.2
```

**Environment:**
- OS: Linux

Contributor guide

Open the contributing guide

Research direction

Start in main/podman_compose.py at rec_merge_one and follow its callers through rec_merge and resolve_extends. Reproduce the failure with a compose.yaml using service dependencies if possible, comparing podman-compose 1.5.0 and 1.6.0. Done means the reported compose file no longer raises AttributeError during parsing and existing extends behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.