Skip to content

Avoid merging computed dependency metadata - #1508

Open
floze-the-genius wants to merge 1 commit into
containers:mainfrom
floze-the-genius:fix/1507-extends-dependency-metadata
Open

Avoid merging computed dependency metadata#1508
floze-the-genius wants to merge 1 commit into
containers:mainfrom
floze-the-genius:fix/1507-extends-dependency-metadata

Conversation

@floze-the-genius

Copy link
Copy Markdown

Summary

  • discard computed dependency fields from base services before resolving extends
  • prevent _dependents sets from reaching the list merge path
  • add a regression test covering extended services that both have dependents
  • add the required bugfix news fragment

Fixes #1507.

The implementation was prepared with OpenAI Codex and manually reviewed against the dependency-flattening and extends-resolution flow.

Tests

  • python -m unittest -v tests.unit.test_depends_on tests.unit.test_rec_merge_depends_on - 15 passed
  • ruff format --check podman_compose.py tests/unit/test_rec_merge_depends_on.py - passed
  • ruff check podman_compose.py tests/unit/test_rec_merge_depends_on.py - passed
  • git diff --check - passed

mypy . still reaches repository/tooling baseline issues (unsupported configured Python 3.9, missing PyYAML stubs, and an existing error at podman_compose.py:3274). Integration tests requiring Podman were not run locally.

Signed-off-by: Floze <88098863+floze-the-genius@users.noreply.github.com>
@floze-the-genius

Copy link
Copy Markdown
Author

@p12tic A second fix for #1507 (#1509) was opened shortly after this PR, so a quick direction would help avoid duplicate work. This implementation treats both _deps and _dependents as computed DependField metadata, strips them before extends merging, and verifies that _dependents is rebuilt for the child. Current head 94c8303 is mergeable and all 33 checks, including DCO, pass; the required unit test and newsfragment are present. Would you prefer this approach or the narrower _dependents-only change in #1509? I can rebase the selected branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant