Skip to content

Commit

Permalink
httptransport: address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Frost <[email protected]>
  • Loading branch information
frostmar committed Feb 20, 2024
1 parent d164f60 commit 43282ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.alwaysSignOff": true
}
6 changes: 4 additions & 2 deletions httptransport/matcher_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/google/uuid"
"github.com/quay/claircore"
indexerController "github.com/quay/claircore/indexer/controller"
"github.com/quay/claircore/indexer/controller"
"github.com/quay/claircore/libvuln/driver"
"github.com/quay/zlog"
oteltrace "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace"
Expand Down Expand Up @@ -127,7 +127,9 @@ func (h *MatcherV1) vulnerabilityReport(w http.ResponseWriter, r *http.Request)
apiError(ctx, w, http.StatusInternalServerError, "experienced a server side error: %v", err)
}
// now check present and finished only after confirming no err
if !ok || indexReport.State != indexerController.IndexFinished.String() {
var indexState controller.State
indexState.FromString(indexReport.State)
if !ok || indexState != controller.IndexFinished {
apiError(ctx, w, http.StatusNotFound, "index report for manifest %q not found", manifest.String())
return
}
Expand Down

0 comments on commit 43282ce

Please sign in to comment.