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 #22072: Display compliance by directive #4626

Conversation

ElaadF
Copy link
Member

@ElaadF ElaadF commented Jan 10, 2023

https://issues.rudder.io/issues/22072

  • Compliance by directive Id
  • Compliance on each directive
  • Export CSV API + frontend

image

@ElaadF ElaadF added the WIP Use that label for a Work In Progress PR that must not be merged yet label Jan 10, 2023
@ElaadF ElaadF force-pushed the bug_22072/display_compliance_by_directive branch from 3d32b54 to af82377 Compare January 11, 2023 09:39
@ElaadF
Copy link
Member Author

ElaadF commented Jan 11, 2023

Commit modified

@ElaadF
Copy link
Member Author

ElaadF commented Jan 11, 2023

PR rebased

@ElaadF ElaadF force-pushed the bug_22072/display_compliance_by_directive branch from af82377 to 61cedb0 Compare January 11, 2023 09:41
@ElaadF
Copy link
Member Author

ElaadF commented Jan 11, 2023

PR updated with a new commit

@@ -0,0 +1,40 @@
module FakeUtils exposing (..)
Copy link
Member

Choose a reason for hiding this comment

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

You should remove FakeUtils

@ElaadF
Copy link
Member Author

ElaadF commented Jan 16, 2023

PR updated with a new commit

5 similar comments
@ElaadF
Copy link
Member Author

ElaadF commented Jan 16, 2023

PR updated with a new commit

@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR updated with a new commit

@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR updated with a new commit

@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR updated with a new commit

@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR updated with a new commit

@ElaadF ElaadF removed the WIP Use that label for a Work In Progress PR that must not be merged yet label Jan 25, 2023
@ElaadF ElaadF changed the base branch from master to branches/rudder/7.3 January 25, 2023 16:50
@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR updated with a new commit

1 similar comment
@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR updated with a new commit

@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR rebased

@ElaadF ElaadF force-pushed the bug_22072/display_compliance_by_directive branch from e6ce45c to 0c690d9 Compare January 25, 2023 17:09
@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR rebased

@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR updated with a new commit

@ElaadF
Copy link
Member Author

ElaadF commented Jan 25, 2023

PR rebased

@ElaadF ElaadF force-pushed the bug_22072/display_compliance_by_directive branch from d99923f to c86a597 Compare January 25, 2023 23:01
@ElaadF ElaadF force-pushed the bug_22072/display_compliance_by_directive branch from c86a597 to 5940526 Compare January 31, 2023 10:44
@ElaadF
Copy link
Member Author

ElaadF commented Jan 31, 2023

PR updated with a new commit

@ElaadF
Copy link
Member Author

ElaadF commented Jan 31, 2023

PR rebased

@ElaadF ElaadF force-pushed the bug_22072/display_compliance_by_directive branch from da8f145 to e4c151b Compare January 31, 2023 10:49
val dataContainer = Some("directivesCompliance")
}

final case object ExportDirectiveComplianceCSV extends ComplianceApi with OneParam with StartsAtVersion10 with SortIndex {
Copy link
Member

Choose a reason for hiding this comment

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

I would rather have the URL to be compliance/directives/id/csv

Copy link
Member

Choose a reason for hiding this comment

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

(in fact i would prefer compliance/directives/id?format=csv

Copy link
Member

Choose a reason for hiding this comment

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

Yes i would définitely prefer one endpoint and choose the format as a parameter

Copy link
Member

Choose a reason for hiding this comment

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

why does it starts at version 10 and not the latest version ?


directive <- complianceService.getDirectiveCompliance(id, level)
t3 = System.currentTimeMillis
_ = TimingDebugLogger.trace(s"API Export compliance to CSV - getting query param in ${t2 - t1} ms")
Copy link
Member

Choose a reason for hiding this comment

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

Why do you put your traces at the end ? you shoud make them just below what they are doing

t4 = System.currentTimeMillis
directives = directiveIds.flatMap(complianceService.getDirectiveCompliance(_, level))
t5 = System.currentTimeMillis
_ = TimingDebugLogger.trace(s"API GetDirectives - getting query param in ${t2 - t1} ms")
Copy link
Member

Choose a reason for hiding this comment

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

same here and it misses some cases

precision.getOrElse(CompliancePrecision.Level2)
)
) // by default, all details are displayed
val t4 = System.currentTimeMillis
Copy link
Member

Choose a reason for hiding this comment

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

Strange that it compiles with two T4

@VinceMacBuche
Copy link
Member

I'm merging but we should treat the feedbacks during beta 2

@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/4626
-- Your faithful QA
Kant merge: "It is beyond a doubt that all our knowledge begins with experience."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/64521/console)

@ElaadF
Copy link
Member Author

ElaadF commented Jan 31, 2023

OK, squash merging this PR

Fixes #22072: Display compliance by directive

Fixes #22072: Display compliance by directive

fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! fixup! fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! fixup! fixup! fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! fixup! fixup! fixup! fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive

fixup! fixup! Work in progress

Fixes #22072: Display compliance by directive
@ElaadF ElaadF force-pushed the bug_22072/display_compliance_by_directive branch from e4c151b to 7c9df37 Compare January 31, 2023 23:34
@ElaadF ElaadF merged commit 7c9df37 into Normation:branches/rudder/7.3 Jan 31, 2023
request
{ method = "GET"
, headers = []
, url = getUrl model ["nodes"] []
Copy link
Member

Choose a reason for hiding this comment

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

i'm unsure as to why you need that. If it's really necessary, you could fetfh nly the minimal version of the node, or minimal+ exactly what you need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants