Skip to content

fix: Ignore failure propagation in collection member that is ignored in filters and reject failure propagation without common primary key#370

Merged
Moritz Potthoff (MoritzPotthoffQC) merged 4 commits into
mainfrom
fix-collection-no-common-primary-key
Jul 21, 2026
Merged

fix: Ignore failure propagation in collection member that is ignored in filters and reject failure propagation without common primary key#370
Moritz Potthoff (MoritzPotthoffQC) merged 4 commits into
mainfrom
fix-collection-no-common-primary-key

Conversation

@MoritzPotthoffQC

@MoritzPotthoffQC Moritz Potthoff (MoritzPotthoffQC) commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Motivation

Opposed to the docs, for a member that is ignored in filters, the failure propagation property is currently not ignored.

Additionally, we should reject collections if they have a failure-propagating member (not ignored) but no common primary key. Like for filters, entries that are filtered out of a failure-propagating member would be propagated across members, which does not work without common primary key.

Changes

  • Ignore failure propagation for members that are ignored in filters
  • Extend the criteria for rejection
  • Add tests

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e4353e7) to head (0e1d269).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #370   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           56        56           
  Lines         3506      3507    +1     
=========================================
+ Hits          3506      3507    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens collection validation to reject collections that cannot correctly apply cross-member behavior (filters and row-failure propagation) due to missing overlapping primary keys, and adds a regression test for the new rejection case.

Changes:

  • Extend the metaclass validation to require an overlapping primary key when any non-ignored member enables row-failure propagation (in addition to the existing “filters present” condition).
  • Add a test ensuring collections with propagate_row_failures=True but no common primary key are rejected.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
dataframely/collection/_base.py Expands the “must have overlapping primary key” validation to cover failure-propagation scenarios.
tests/collection/test_implementation.py Adds a regression test for failure propagation without a common primary key.

Comment thread dataframely/collection/_base.py
@MoritzPotthoffQC
Moritz Potthoff (MoritzPotthoffQC) marked this pull request as draft July 21, 2026 16:02
@MoritzPotthoffQC Moritz Potthoff (MoritzPotthoffQC) changed the title fix: Reject collections with failure-propagating members but without common primary key fix: Ignore failure propagation in collection members that is ignored in filters and reject failure propagation without common primary key Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread dataframely/collection/_base.py
Comment thread tests/collection/test_propagate_row_failures.py
@MoritzPotthoffQC
Moritz Potthoff (MoritzPotthoffQC) marked this pull request as ready for review July 21, 2026 16:33
@MoritzPotthoffQC Moritz Potthoff (MoritzPotthoffQC) changed the title fix: Ignore failure propagation in collection members that is ignored in filters and reject failure propagation without common primary key fix: Ignore failure propagation in collection member that is ignored in filters and reject failure propagation without common primary key Jul 21, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@MoritzPotthoffQC
Moritz Potthoff (MoritzPotthoffQC) merged commit 0cbc66a into main Jul 21, 2026
34 checks passed
@MoritzPotthoffQC
Moritz Potthoff (MoritzPotthoffQC) deleted the fix-collection-no-common-primary-key branch July 21, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants