Repository navigation
Fetch only modified source documents when validating modified declarations - #1290
Open
clementbiron wants to merge 4 commits into
Open
clementbiron wants to merge 4 commits into
clementbiron wants to merge 4 commits into
Conversation
Validating modified declarations fetched every source document of a modified terms type, twice each, even when a single entry of its combine changed. Adding 4 documents to the Facebook "Advertising Content Policy" combine refetched its 46 documents: the validation of this pull request took 18 minutes on user-rights, and 64 minutes for the one adding Instagram. Comparing the declaration that each source document effectively gets, once the terms properties it inherits are applied as when loading the service, tells which documents changed. Indexing them by location rather than by position keeps reordered documents unchanged and treats a changed location as a new document. Terms added in the branch and services whose filters changed keep no restriction, as any of their documents may be impacted.
The checks that do not fetch, such as the detection of duplicate source documents, still cover the whole combine, as an unchanged document can conflict with an added one. The number of skipped documents is logged to make the saving visible in the CI logs.
Loosening these assertions to deep.include left the new servicesTermsSourceDocuments key unchecked for added terms, added or removed declarations and history-only changes, which are the cases where no restriction must apply.
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.
Validating modified declarations fetched every source document of a modified terms type, twice each, even when a single entry of its
combinechanged. Adding 4 documents to the Facebook "Advertising Content Policy" combine refetched its 46 documents: the validation of this pull request took 18 minutes on user-rights, and 64 minutes for the one adding Instagram.ota validate declarations --modifiednow compares the declaration that each source document effectively gets on the default branch and on the branch, once the terms properties it inherits are applied as when loading the service, and fetches only the documents whose declaration changed. Documents are indexed by location, so reordering thecombinefetches nothing and changing a location is treated as a new document. Terms added in the branch, new services and services whose filters changed keep no restriction, as any of their documents may be impacted.The checks that do not fetch, such as the detection of duplicate source documents, still cover the whole
combine, as an unchanged document can conflict with an added one. The number of skipped documents is logged to make the saving visible in the CI logs: