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 #3181 : Improve delete node feedback (Event log, node history) #98

Conversation

VinceMacBuche
Copy link
Member

@@ -66,8 +71,24 @@ class RemoveNodeServiceImpl(
case "root" => Failure("The root node cannot be deleted from the nodes list.")
case _ => {
for {
lastInventoryVersion <-inventoryHistoryLogRepository.versions(nodeId).map(_.head)
Copy link
Member

Choose a reason for hiding this comment

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

".head" method can fail. You will have to use "inventoryHistoryLogRepository.versions(nodeId).map( Box(_.headOption) ?~! "No version found for that node, it looks like an unconsistency in storage. Please try again to delete that node")

Copy link
Member

Choose a reason for hiding this comment

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

After more thinking, why you don't simply use the "FullInventory.node.receiveDate" property to get the date of the last received inventory ?

fanf added a commit that referenced this pull request Jan 17, 2013
…as_Deleted

Fixes #3181 : Improve delete node feedback (Event log, node history)
@fanf fanf merged commit 491c3af into Normation:branches/rudder/2.4 Jan 17, 2013
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants