fix: resolve cross-entity slug references during configuration import - #726
Closed
bbrands02 wants to merge 1 commit into
Closed
fix: resolve cross-entity slug references during configuration import#726bbrands02 wants to merge 1 commit into
bbrands02 wants to merge 1 commit into
Conversation
Imported configurations that reference entities created earlier in the same run (e.g. endpoints referencing synchronizations) would silently drop those references because the in-memory slug/ID maps were only populated from pre-existing DB rows. A second reconciliation pass and per-entity map registration keep references stable across the full import order without requiring a double import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Closing — scope was too broad. Recreating with only ConfigurationService and RuleHandler changes. |
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.
Summary
registerImportedEntityMapping()to update in-memory slug/ID maps after each entity is imported, so entities created earlier in the same run are immediately available as references for later ones. AddedwithComponentSlug()to normalize missing slug fields from the component key. AddedreconcileImportedReferences()for a targeted second pass over endpoints and synchronizations, which commonly depend on entities imported just before them.synchronizationto the entity-type lists used during slug↔ID conversion, so synchronization references in rule configs are correctly serialized and deserialized.resolveRuleIdentifier(), which falls back to numeric ID, DB name lookup, and DB reference lookup — preventing silent rule drops when the source export format varies. Also injectsRuleMapperto support the DB lookups.$updateRegex = falsebefore the update loop to avoid an undefined-variable notice./api/…paths so JSON API endpoints resolve to their resource controllers instead of being swallowed by the Vue app route.Test plan
/api/…REST calls are no longer captured by the SPA catch-all and return JSON as expected🤖 Generated with Claude Code