Skip to content

Commit

Permalink
Fix symbol upload (#21)
Browse files Browse the repository at this point in the history
* Return early if the symbol is already uploaded
* Improve logging
  • Loading branch information
nsavoire authored Sep 30, 2024
1 parent eb133d0 commit fa85613
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions reporter/symbol_querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ func (d *DatadogSymbolQuerier) QuerySymbols(ctx context.Context, buildIDs []stri
return nil, fmt.Errorf("error marshaling symbols query request: %w", err)
}

fmt.Printf("Querying symbols with request: %s\n", string(body))

req, err := http.NewRequestWithContext(ctx, http.MethodPost, d.symbolQueryURL, bytes.NewReader(body))
if err != nil {
return nil, fmt.Errorf("failed to create request: %w", err)
Expand Down
4 changes: 3 additions & 1 deletion reporter/symbol_uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ func (d *DatadogSymbolUploader) GetExistingSymbolsOnBackend(ctx context.Context,
}
}

log.Debugf("Existing symbols for executable %s with build: %v", e, symbolSource)
return symbolSource, nil
}

Expand Down Expand Up @@ -225,8 +226,9 @@ func (d *DatadogSymbolUploader) upload(ctx context.Context, uploadData uploadDat
}

if existingSymbolSource >= symbolSource {
log.Debugf("Skipping symbol upload for executable %s: existing symbols with source %v", fileName,
log.Infof("Skipping symbol upload for executable %s: existing symbols with source %v", fileName,
existingSymbolSource.String())
return true
}

symbolPath := debugElf.actualFileName
Expand Down

0 comments on commit fa85613

Please sign in to comment.