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

Fixes #20851: Regroup report with their values, not with the expanded value #4196

Conversation

VinceMacBuche
Copy link
Member

@VinceMacBuche VinceMacBuche requested a review from fanf March 2, 2022 17:55
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the ust_20851/regroup_report_with_their_values_not_with_the_expanded_value branch from 5c99638 to b4c8db7 Compare March 2, 2022 17:59
@ncharles
Copy link
Member

ncharles commented Mar 3, 2022

Tests are not passing

@@ -342,6 +342,7 @@ final case class BlockStatusReport (
}
final case class ValueStatusReport (
componentName : String
, unexpanded : String
Copy link
Member

Choose a reason for hiding this comment

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

i'd rather have unexpandedComponentName, otherwise we may confuse it with the unexpandedValue

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll go with "ExpectedComponentName" with is more clear to me the unexpanded. Same for values

@@ -439,14 +440,14 @@ object ComponentValueStatusReport extends Loggable {
* them by component *unexpanded* value
*/
def merge(values: Iterable[ComponentValueStatusReport]): List[ ComponentValueStatusReport] = {
val pairs = values.groupBy(_.unexpandedComponentValue).map { case (unexpanded, values) =>
val pairs = values.toList /*groupBy(_.unexpandedComponentValue).map { case (unexpanded, values) =>
Copy link
Member

Choose a reason for hiding this comment

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

this seems dubious

Copy link
Member Author

Choose a reason for hiding this comment

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

I did wanted to no merge them, but i changed my mind and now i want them merged by real value, then by expectedValue

@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the ust_20851/regroup_report_with_their_values_not_with_the_expanded_value branch from b4c8db7 to a67a6c1 Compare March 3, 2022 14:51
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the ust_20851/regroup_report_with_their_values_not_with_the_expanded_value branch from a67a6c1 to 36dcb52 Compare March 3, 2022 14:54
@VinceMacBuche
Copy link
Member Author

Tests should now be ok

@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 36dcb52 into Normation:branches/rudder/7.1 Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants