Skip to content
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

Adding deduplication in merge command #2280

Merged
merged 2 commits into from
Jan 30, 2021

Conversation

eddynaka
Copy link
Collaborator

Fixes #2279

Results = new List<Result>()
};
emptyRun.Results = new List<Result>();
splitRun = _ruleIdToRunsMap[key] = emptyRun;
Copy link
Collaborator Author

@eddynaka eddynaka Jan 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emptyRun [](start = 71, length = 8)

Instead of creating a new run, I changed to emptyRun object to preserve artifacts and other fields #ByDesign

Results = new List<Result>()
};
emptyRun.Results = new List<Result>();
splitRun = _ruleIdToRunsMap[key] = emptyRun;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emptyRun [](start = 71, length = 8)

This might be the right start but I think we're not comprehensively handling all that we should. What are we doing about rule indexes and artifact location indexes for example? When we add a result from one run into another, we should be fixing up those indices, expanding the target run with new rule/artifact data if it comes in, etc. Our baselining/result matching code does this and has some utilities for it. This is all to say: we probably have more work to do in this command (which previously simply moved entire run objects around, a very simple operation). Let's open an issue noting the open work and keep moving. :)

Copy link
Member

@michaelcfanning michaelcfanning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@michaelcfanning michaelcfanning merged commit 6950795 into main Jan 30, 2021
@michaelcfanning michaelcfanning deleted the users/ednakamu/adding-deduplication-merge branch January 30, 2021 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Author a 'remove duplicate results' command
2 participants