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 #22197: We can accept a node with an existing hostname even if node_accept_duplicated_hostname is false #5284

Conversation

fanf
Copy link
Member

@fanf fanf commented Dec 21, 2023

https://issues.rudder.io/issues/22197

Not sure what happened in the last refactoring, but here, the failure was yield (as a Full(Failure(..)) in place of being flatMapped.

Also: I remove the possibility to write several time the hostname, we know they are all the same, since that's what we are checking.

Finaly, move that check in first place, because it's really useless to move into accepted, then rollback into pending if the hostname is duplicated: just start by checking if it's ok or not to move.

@VinceMacBuche
Copy link
Member

I tried to make a suggested change through github UI but it made a commit directly (i also tried to make a PR but it failed ....)

I may not pass spotless ...

@VinceMacBuche
Copy link
Member

PR updated with a new commit

@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/5284
-- Your faithful QA
Kant merge: "All our knowledge begins with the senses, proceeds then to the understanding, and ends with reason. There is nothing higher than reason."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/77873/console)

@fanf
Copy link
Member Author

fanf commented Dec 22, 2023

OK, squash merging this PR

fanf and others added 3 commits December 22, 2023 11:21
Fixes #22197: We can accept a node with an existing hostname even if node_accept_duplicated_hostname is false
@fanf fanf force-pushed the bug_22197/we_can_accept_a_node_with_an_existing_hostname_even_if_node_accept_duplicated_hostname_is_false branch from 79fa107 to c1c90b9 Compare December 22, 2023 10:21
@fanf fanf merged commit c1c90b9 into Normation:branches/rudder/7.3 Dec 22, 2023
@fanf fanf deleted the bug_22197/we_can_accept_a_node_with_an_existing_hostname_even_if_node_accept_duplicated_hostname_is_false branch March 15, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants