fix(scriptability): export each object once, not once per org the object is published to - #353
Open
dbevacqua-blink wants to merge 1 commit into
Conversation
…ect is published to checkpoint's ts_metadata_object uses metadata/search results out and emits one row per org id in metadata_header.orgIds. For a published object, this means N duplicates of the object with the same GUID. TML export is keyed purely by GUID and is org-independent, so emit one row per object. It looks like the per-org fan-out was copied from the searchable tool, where it's correct; org_id was never read anywhere in scriptability.
Collaborator
|
Great diagnosis, and a well scoped and accurate fix. I have only recently started to maintain cs_tools here, so it is great to learn more about the code base with you. It definitely looks like it was a copy-paste bug. One ask (not PR blocking), a small regression test asserting one-row-per-object for a multi-org header would guard against this getting re-copied — tests/test_searchable_transformer.py is a reasonable template. Would that be possible? I'll approve if not -- but it doesn't hurt to ask. ;) |
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.
checkpoint's
ts_metadata_objectuses metadata/search results out and emits one row per org id in metadata_header.orgIds. For a published object, this means N duplicates of the object with the same GUID.TML export is keyed purely by GUID and is org-independent, so emit one row per object. It looks like the logic was copied from the searchable tool, where it's correct; org_id was never read anywhere in scriptability.