Skip to content

Commit

Permalink
cli: add debug logging to understand timing of verify call
Browse files Browse the repository at this point in the history
  • Loading branch information
malt3 committed Jan 22, 2024
1 parent 64c5d70 commit a956eda
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,25 @@ func runVerify(cmd *cobra.Command, _ []string) error {
if err != nil {
return err
}
logger.Debug("Starting verification")

validateOptsGen := newCoordinatorValidateOptsGen()
dialer := dialer.New(atls.NoIssuer, snp.NewValidator(validateOptsGen, logger), &net.Dialer{})

logger.Debug("Dialing coordinator", "endpoint", flags.coordinator)
conn, err := dialer.Dial(cmd.Context(), flags.coordinator)
if err != nil {
return fmt.Errorf("Error: failed to dial coordinator: %w", err)
}
defer conn.Close()

logger.Debug("Getting manifest")
client := coordapi.NewCoordAPIClient(conn)
resp, err := client.GetManifests(cmd.Context(), &coordapi.GetManifestsRequest{})
if err != nil {
return fmt.Errorf("failed to set manifest: %w", err)
return fmt.Errorf("failed to get manifest: %w", err)
}
logger.Debug("Got response")

filelist := map[string][]byte{
coordRootPEMFilename: resp.CACert,
Expand Down

0 comments on commit a956eda

Please sign in to comment.