Repository navigation
Fixes 36215: Widen task aboutFqnHash and repoint tasks on every FQN change (2.1) - #36340
Conversation
…hange Backport of #36246 to 2.1. An FQN hash is one 32-char md5 per level, so anything eight or more levels deep (263+ chars) overflowed task_entity.aboutFqnHash and domain_entity.fqnHash, both varchar(256). The 2.0.8 migration widens both to 768 (ascii_bin on MySQL so idx_status_about stays under InnoDB's 3072-byte key limit). Tasks also lost their entity whenever an FQN changed outside the glossary. The rewrite now runs once from EntityUpdater.storeUpdate when the stored FQN changed: one statement matching the entity's own type by exact hash and the types nested under it (getNestedFqnEntityTypes) by hash prefix, scoped through the task's about relationship so a same-named entity of another type keeps its tasks. Workflow-instance links are repointed the same way, with LIKE wildcards escaped.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🔴 High risk · Widening persisted FQN-hash columns and rewriting task and workflow links on renames could misassociate records or cause migration failures. Widens VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
| String escapedStem = ListFilter.escapeLikeBindValue(oldStem); | ||
| String oldChildPrefix = | ||
| includeNested | ||
| ? escapedStem + Entity.SEPARATOR + "%" | ||
| : ListFilter.escapeLikeBindValue(oldLink); |
There was a problem hiding this comment.
Workflow history changes lack tests
The new workflow-link rewrite has no regression test. TaskAboutFqnChangeIT only checks task listings, so it would still pass if workflow history stayed at the old name or matched another name containing % or _.
Add a test that creates workflow instances, renames their parent, and checks both the moved links and an unrelated link with a similar name.
Describe your changes:
Fixes #36215
Backport of #36246 to
2.1. Same change, applied cleanly; see #36246 for the full design and review discussion. The 2.0 backport is #36262.task_entity.aboutFqnHashanddomain_entity.fqnHashfrom 256 to 768 (MySQLaboutFqnHash→ascii_bin, soidx_status_aboutstays under InnoDB's 3072-byte key limit). Fixes task create / glossary-term move failing withvalue too long for type character varying(256)at 8+ levels, and 8th-level subdomains. 2.0.7 is released and untouched.EntityUpdater.storeUpdaterepointsaboutFqnHashand workflow instances when the stored FQN changed — exact match for the entity's own type,hash.%prefix for the types nested under it (getNestedFqnEntityTypes()), in one statement and scoped by the task'saboutrelationship type. Workflow-instance links are LIKE-escaped.Type of change:
Tests:
Run on this branch (
-DintegrationTests.lane=parallel):TaskAboutFqnChangeIT(8),GlossaryTermResourceIT#test_createTaskAboutEighthLevelTerm,#test_moveTermWithTaskToEighthLevel_repointsTask,DomainResourceIT#test_createEighthLevelSubDomain,ContinuousMigrationIT(3):Tests run: 14, Failures: 0, Errors: 0, Skipped: 0Tests run: 14, Failures: 0, Errors: 0, Skipped: 0Broader regression runs and the before/after evidence are on #36246.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.🤖 Generated with Claude Code
The PR appears safe to merge, with a non-blocking gap in workflow-history tests.
Findings
Summary
Widens task and domain FQN hashes to support deeper hierarchies, and moves task and workflow links from the shared entity storage path.
Acknowledgment:
yan-3005supplied a decision record that explicitly defers type-scoped task listings and excludes the ingestion-only deferred storage path.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Store entity update] --> B{Stored FQN changed?} B -->|No| C[Leave task and workflow links unchanged] B -->|Yes| D[Rewrite task hashes by entity type] D --> E[Match own tasks exactly] D --> F[Match declared descendants by hash prefix] E --> G[Repoint workflow links] F --> GReviews (1) · Last reviewed commit: "Fixes 36215: Widen task aboutFqnHash and..." · Reviewed by Greptile