Repository navigation
Description
Summary
A Dr.Egeria Update <X> that identifies the element by Display Name only, with no GUID, Qualified Name or Version Identifier, can create a new element instead of updating the existing one. This happens for commands whose Create adds the default Version Identifier 1.0 to the qualified name.
Reproduction (seen live on a scratch platform, digest 5a8d6a12, pyegeria at odpi/main 98837e0)
- Run
Create Solution Boundarywith Display Named1-probe. The qualified name isCoco Pharmaceuticals::SolutionBoundary::d1-probe::1.0. - Run
Update Solution Boundarywith Display Named1-probeand a new Description. - Dr.Egeria derives
…::SolutionBoundary::d1-probe, without::1.0, and finds nothing. It rewrites the Update to a Create and makes a second Solution Boundary. The original keeps its old description.
Cause (the same code on 6.3.3, 4cbb90d, and on main, 98837e0)
md_processing/v2/parsing.py(about lines 124–134 and 187–201): defaults such as Version Identifier1.0are applied only to creation verbs.updateis inskip_defaults_verbs.processors.pyderive_qualified_name(about lines 1624–1647) appends::<Version Identifier>only when one is present.fetch_as_is→resolve_element_guid, pass 1: the qualified-name-or-display-name match fails for commands with a type prefix.rewriters.pyCommandRewriter.rewrite: an Update whose target doesn't exist becomes a Create.
Scope (offline check, report D1-SCOPE 1f1c2dfb)
- 6.3.3 has 156 Create commands, and 89 are exposed: those with a default Version Identifier and a non-empty QN prefix. Examples are Glossary Term and Data Structure.
- main has 158 Create commands, and 91 are exposed. The 2 new ones are Solution Boundary and Design Model Boundary (feat: solution boundaries (odpi/egeria#9465) in pyegeria, Dr.Egeria boundary commands, Solution Role attribute fix #612).
- Commands with an empty prefix (Solution Blueprint, Component, Role and others) are probably found by display name, and so are not rewritten.
- About 20 processor modules override
fetch_as_is. They haven't been checked one by one.
Workaround: on an Update, give the Version Identifier, the Qualified Name or the GUID.
Possible fixes, for discussion:
- (a) apply the Version Identifier default on Update when deriving the lookup QN, without writing it;
- (b) in
resolve_element_guid, fall back to an exact Display Name match within the command's type before giving up; - (c) never rewrite an Update to a Create when the user didn't ask for upsert, and report "not found" instead.
Related note: the empty-prefix commands (Solution Blueprint, Component, Role, ISC, the project kinds, Task, Campaign, Experiment) get qualified names with no type prefix or local qualifier, unlike the other commands.
Release note line for pyegeria 6.3.4, under known issues: "Update by Display Name only can create a duplicate when Create added a Version Identifier; give the Version Identifier or the GUID."
Activity
chore(release): bump version to 6.3.4 (#615)