-
Notifications
You must be signed in to change notification settings - Fork 458
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
API refactor: implements delete agent rpc #1692
Conversation
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small nits
pkg/server/api/agent/v1/service.go
Outdated
return nil, status.Error(codes.NotFound, "agent not found") | ||
default: | ||
log.WithError(err).Error("Failed to remove Agent") | ||
return nil, status.Errorf(codes.Internal, "failed to remove Agent: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, status.Errorf(codes.Internal, "failed to remove Agent: %v", err) | |
return nil, status.Errorf(codes.Internal, "failed to remove agent: %v", err) |
pkg/server/api/agent/v1/service.go
Outdated
log.WithError(err).Error("Agent not found") | ||
return nil, status.Error(codes.NotFound, "agent not found") | ||
default: | ||
log.WithError(err).Error("Failed to remove Agent") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.WithError(err).Error("Failed to remove Agent") | |
log.WithError(err).Error("Failed to remove agent") |
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
ds: ds, | ||
logHook: logHook, | ||
} | ||
if tt.dsError != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we could remove the if
and just setting a nil
next error
err: "not an agent ID", | ||
req: &agentpb.DeleteAgentRequest{ | ||
Id: &types.SPIFFEID{ | ||
TrustDomain: "examples.org", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TrustDomain: "examples.org", | |
TrustDomain: "example.org", |
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\o/
Implements delete agent rpc, and update delete attested node on datastore to remove relationships
Which issue this PR fixes
fixes #1636