-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve domain loading: Tech debt and associated bugs #10807
Comments
@joejuzl I would need more details on this bug, do you have an example or open ticket that I can look at? Not sure I understand what |
Take this example:
The entity |
@joejuzl I wanted to ask for your opinion on two approaches I thought for unifying the 2 merge methods (
This however would require a large amount of tests that load domain paths to be changed.
This might require amendments in tests/codebase where |
I think this is a good approach. I also think this could help make other things simpler. A lot of the bugs and complexities from merging come from the fact that we have to get back to the original representation to merge e.g. all the annoyance with However I haven't looked deeply into the implications of this - so it may be harder than it sounds. Definitely worth exploring in my opinion though! |
Background
A few bugs were identified around the merging of multiple domain files.
While fixing these bugs relatively quickly we accrued some technical debt.
After further investigation into how domain loading and merging works some inconsistencies and bugs were found. This ticket encompasses the tech debt and bug fixes, but not the behaviour changes. As the tech debt and bug are very related, it makes sense to do them in one go.
More details: https://www.notion.so/rasa/Improve-domain-loading-b3998eafc5f7406dab0be88613dfd15d
Overview
Bugs
Tech debt
Domain.merge_domain_dicts
andDoman.merge
into one method. (Or at least share the core functionality)merge_domain_dicts
on a class. This should be fixed.merge_dicts
should not be public. We are restricted by and have to support the public interfaces of classes likeDomain
.self.duplicates
on theDomain
instance. Can we just warn as we merge/load and then raiseInvalidDomain
without storing this data as a public instance variable?domain.duplicates
is checked later byValidator.verify_domain_duplicates
. Maybe we can remove this and just do it in theDomain
classDomain._check_domain_sanity
appears to duplicate some of the duplication checks - can we remove/combine it?_transform_intent_properties_for_internal_use
. This is difficult to revert. Instead can we always keep the original domain dict on the instance, and use that for both domain persistence and merging?Definition of Done
The text was updated successfully, but these errors were encountered: