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 #10216: "id" setting is silently ignored for new group created through the REST API. #3194

Conversation

ElaadF
Copy link
Member

@ElaadF ElaadF commented Aug 27, 2020

@ElaadF ElaadF added the WIP Use that label for a Work In Progress PR that must not be merged yet label Aug 27, 2020
@@ -353,7 +353,10 @@ class GroupApiService2 (
implicit val prettify = restExtractor.extractPrettify(req.params)
val modId = ModificationId(uuidGen.newUuid)
val actor = RestUtils.getActor(req)
val groupId = NodeGroupId(req.param("id").getOrElse(uuidGen.newUuid))
Copy link
Member

Choose a reason for hiding this comment

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

It could have been done like we do in Rules / Directives

  val id = restExtractor.extractId(req)(x => Full(NodeGroupId(x))).map(_.getOrElse(NodeGroupId(uuidGen.newUuid)))

@ElaadF ElaadF force-pushed the bug_10216/id_setting_is_silently_ignored_for_new_group_created_through_the_rest_api branch from 56b52db to bb3e8bc Compare August 27, 2020 09:41
@ElaadF
Copy link
Member Author

ElaadF commented Aug 27, 2020

Commit modified

@ElaadF ElaadF removed the WIP Use that label for a Work In Progress PR that must not be merged yet label Aug 27, 2020
@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/3194
-- Your faithful QA
Kant merge: "Live your life as though your every act were to become a universal law."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/29236/console)

@ElaadF
Copy link
Member Author

ElaadF commented Aug 27, 2020

OK, merging this PR

@ElaadF ElaadF merged commit bb3e8bc into Normation:branches/rudder/5.0 Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants