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 #18277: Bad condition on name checking for technique existence #3237

Conversation

ElaadF
Copy link
Member

@ElaadF ElaadF commented Oct 1, 2020

@ElaadF ElaadF requested a review from fanf October 1, 2020 12:21
@@ -336,15 +336,14 @@ class NcfApi(
} )
}

private def isTechniqueNameExist(name: TechniqueName, bundleName: BundleName) = {
private def isTechniqueNameExist(bundleName: BundleName) = {
for {
lib <- readDirective.getFullDirectiveLibrary()
activeTechniques = lib.allActiveTechniques.values.toSeq
userTechniques <- techniqueReader.readTechniquesMetadataFile
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 get all user techniques ? They should already be in activeTechniques

@ElaadF ElaadF force-pushed the bug_18277/bad_condition_on_name_checking_for_technique_existence branch from c7bc70f to 6ab9a48 Compare October 1, 2020 13:20
@ElaadF
Copy link
Member Author

ElaadF commented Oct 1, 2020

Commit modified

@ElaadF ElaadF force-pushed the bug_18277/bad_condition_on_name_checking_for_technique_existence branch from 6ab9a48 to 704ae4f Compare October 1, 2020 13:23
@ElaadF
Copy link
Member Author

ElaadF commented Oct 1, 2020

Commit modified

@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 3c2912d into Normation:branches/rudder/6.1 Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants