-
Notifications
You must be signed in to change notification settings - Fork 635
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
bugfix[DYN-6189]: remove duplicated code block node #14373
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1594,7 +1594,9 @@ private void InitializeIncludedNodes() | |
NodeFactory.AddTypeFactoryAndLoader(outputData.Type); | ||
NodeFactory.AddAlsoKnownAs(outputData.Type, outputData.AlsoKnownAs); | ||
|
||
SearchModel?.Add(new CodeBlockNodeSearchElement(cbnData, LibraryServices)); | ||
var cnbNode = new CodeBlockNodeSearchElement(cbnData, LibraryServices); | ||
SearchModel?.Add(cnbNode); | ||
AddNodeTypeToSearchIndex(cnbNode, iDoc); | ||
|
||
var symbolSearchElement = new NodeModelSearchElement(symbolData) | ||
{ | ||
|
@@ -1613,29 +1615,11 @@ private void InitializeIncludedNodes() | |
}; | ||
|
||
SearchModel?.Add(symbolSearchElement); | ||
SearchModel?.Add(outputSearchElement); | ||
|
||
//Adding this nodes are breaking the tests (due that we have two input and two output nodes): | ||
//WhenHomeWorkspaceIsFocusedInputAndOutputNodesAreMissingFromSearch | ||
//WhenStartingDynamoInputAndOutputNodesAreNolongerMissingFromSearch | ||
// New index process from Lucene, adding missing nodes: Code Block, Input and Output | ||
var ele = AddNodeTypeToSearch(outputData); | ||
if (ele != null) | ||
{ | ||
AddNodeTypeToSearchIndex(ele, iDoc); | ||
} | ||
AddNodeTypeToSearchIndex(symbolSearchElement, iDoc); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RobertGlobant20 Didn't we add the check intentionally? Should we merge this only after we have the corresponding unit test added? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you are refering to the check: The unit test only validates that the Input, Output and Code Block nodes are found with the Lucene Search results then it won't catch if they are duplicated visually in Library (As far as I remember Lucene Search doesn't return duplicated items), then I think this change can be merged |
||
|
||
ele = AddNodeTypeToSearch(symbolData); | ||
if (ele != null) | ||
{ | ||
AddNodeTypeToSearchIndex(ele, iDoc); | ||
} | ||
SearchModel?.Add(outputSearchElement); | ||
AddNodeTypeToSearchIndex(outputSearchElement, iDoc); | ||
|
||
ele = AddNodeTypeToSearch(cbnData); | ||
if (ele != null) | ||
{ | ||
AddNodeTypeToSearchIndex(ele, iDoc); | ||
} | ||
} | ||
|
||
internal static bool IsDisabledPath(string packagesDirectory, IPreferences preferences) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Enzo707 after this change, can you test searching for code block node and see if it still works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QilongTang if you look at the gif it still appearing in library search and seems to work fine. There's any other place to look at?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, can you take a look at the in canvas search as well, just to make sure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QilongTang it's failing within canvas search... I'm taking a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Enzo707 Any update on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QilongTang sorry for the delay, please take a look.