Add failing tests for squashed current_revision losing VALIDATION_FAILED state#88
Merged
Merged
Conversation
…LED state Dataset.current_revision squashes multiple revisions into a new Revision without a state (defaults to PENDING_VALIDATION), dropping the VALIDATION_FAILED state set by invalidate_revisions. FetchPolicy.should_refetch then returns False and the dataset is silently skipped instead of refetched. Tests (failing, documenting the bug): - test_invalidate_multi_revision_dataset_refetches: invalidated 2-revision dataset must refetch. - test_squashed_state_failed_when_a_current_file_comes_from_a_failed_revision: with two files where only one is fixed in a later revision, the squashed state must be VALIDATION_FAILED (a current file still comes from a failed revision). - test_squashed_state_ok_when_all_current_files_come_from_good_revisions (passes): guards against always-failed / refetch-forever. Fix follows in a separate commit.
Dataset.current_revision squashed multiple revisions into a new Revision without a state, defaulting to PENDING_VALIDATION. This dropped the VALIDATION_FAILED state set by invalidate_revisions, so FetchPolicy.should_refetch returned False and invalidated multi-revision datasets were silently skipped instead of refetched. Derive the squashed state per-file from the revisions that actually contribute the current files: if any current file still comes from a VALIDATION_FAILED revision, the squash reports VALIDATION_FAILED (invalid data -> refetch); otherwise it takes the latest revision's state (no refetch-forever). Makes the failing tests pass.
Patch release: fix squashed current_revision dropping VALIDATION_FAILED state, which caused invalidated multi-revision datasets to be silently skipped.
1b5b1d1 to
a6f9d10
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dataset.current_revision squashes multiple revisions into a new Revision without a state (defaults to PENDING_VALIDATION), dropping the VALIDATION_FAILED state set by invalidate_revisions. FetchPolicy.should_refetch then returns False and the dataset is silently skipped instead of refetched.
Tests (failing, documenting the bug):