Skip to content

Commit

Permalink
jobs list and node read fixes (#56)
Browse files Browse the repository at this point in the history
* only show report button on scan job list if not recurring job

a scan job with a recurrence schedule should not show a report
button on the jobs list. the report button should only show
up on the actual scans list for recurring jobs.

* do not fail node read if secret does not exist

if we cannot find the credential id attached to the node,
we should not fail the node. we should just return what is
found and leave it to the user from there. failing the node
results in unreadable nodes, which helps no one.

Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>

* Update components/nodemanager-service/api/nodes/server/server.go

Co-Authored-By: vjeffrey <vjeffrey@chef.io>
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
  • Loading branch information
victoria jeffrey authored and Salim Afiune committed Apr 16, 2019
1 parent 06ffc6b commit b032145
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -41,7 +41,7 @@
<chef-td>{{ job.status }}</chef-td>
<chef-td>
<chef-button secondary
*ngIf="job.status === 'completed'"
*ngIf="job.status === 'completed' && job.recurrence === ''"
(click)="viewReport(job.id)">
Report
</chef-button>
Expand Down
3 changes: 2 additions & 1 deletion components/nodemanager-service/api/nodes/server/server.go
Expand Up @@ -208,7 +208,8 @@ func getSecretsAgg(ctx context.Context, secretIds []string, secretsClient secret
arrMap := make(map[string]string, 0)
s, err := secretsClient.Read(ctx, &secrets.Id{Id: id})
if err != nil {
return nil, errors.Wrap(err, "GetSecretsAgg error")
logrus.WithError(err).Errorf("could not read credential %q", id)
continue
}

for _, kv := range s.Data {
Expand Down

0 comments on commit b032145

Please sign in to comment.