Repository navigation
fix(registry): generate resource templates without instance uuids - #394
Merged
Merged
Conversation
config_info was dumped from a freshly built PLR tree, so every node carried a random uuid, a name equal to that uuid and a parent_uuid, and carrier sites carried random uuid / material_uuid. Every regeneration (cache miss, new Host, cache version bump) therefore produced a different definition and the authority stored a new template version, although nothing about the resource had changed. The authority assigns real uuids when it creates a material anyway. - ResourceTreeSet.dump_templates() dumps the same shape without uuid / parent_uuid / name; the parent is parent_id (the parent's PLR id, unique within a PLR tree; root is null). Site definitions drop uuid / material_uuid / occupied_material_uuid - the registry uses it for config_info; cache version 11 regenerates old cached config_info once - the legacy cloud upload still gets the old node shape: uuid, name (= uuid) and parent_uuid are derived with uuid5 from (template id, node id), so they are stable across uploads; nodes that already carry a uuid are passed through
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.
Why
config_infoof a PLR resource entry was dumped from a freshly built PLR tree, so every node carried a randomuuid, anameequal to that uuid and aparent_uuid, and carrier sites carried randomuuid/material_uuid. Every regeneration (cache miss, a new Host, a cache version bump) produced a different definition, and the materials authority stored a new template version although the resource had not changed. A registry entry is a template, not an instance: the authority assigns real uuids when it creates a material (and already drops template site uuids then).What
ResourceTreeSet.dump_templates()dumps the same shape asdump()without instance identity: nouuid/parent_uuid/nameon nodes; the parent isparent_id(the parent's PLRid, unique within a PLR tree;nullfor the root). Site definitions dropuuid/material_uuid/occupied_material_uuid. The same resource definition now dumps byte-identically every time.config_info. Registry cache version 11 regenerates old cachedconfig_infoonce (one last template version change per Host, then stable).uuid,name(= uuid) andparent_uuidare derived with uuid5 from (template id, node id), so they are stable across uploads. Nodes that already carry a uuid are passed through.config_info[0].type,config.typeandsites, which are unchanged. OpenLabSite does not readconfig_info.docs/developer_guide/add_registry.md.Tests
tests/resources/test_registry_template_config_info.py(5 tests, all fail before this change): two generations are identical and contain no uuid-like string (tip rack and a carrier with sites); parent links viaparent_id; registry population plus a stable authority template; legacy upload restores stable, linked uuids.tests/resources+tests/registry+ legacy adaptor / graph / materials service tests: 832 passed. 3 tests need the ROS message package and fail the same way on dev without it.