Skip to content
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

[chore] - minor cleanup S3 source #3554

Merged
merged 2 commits into from
Nov 4, 2024
Merged

[chore] - minor cleanup S3 source #3554

merged 2 commits into from
Nov 4, 2024

Conversation

ahrav
Copy link
Collaborator

@ahrav ahrav commented Nov 3, 2024

Description:

This PR resolves linter issues and removes the logger from the S3 Source struct, switching to using the context for logging instead.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@ahrav ahrav marked this pull request as ready for review November 3, 2024 23:16
@ahrav ahrav requested a review from a team as a code owner November 3, 2024 23:16
Copy link
Collaborator

@rosecodym rosecodym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks so much for doing this!


if common.IsDone(ctx) {
return
}

s.SetProgressComplete(i, len(bucketsToScan), fmt.Sprintf("Bucket: %s", bucket), "")
logger.V(3).Info("Scanning bucket")
s.SetProgressComplete(i, len(bucketsToScan), "Bucket: "+bucket, "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no opinion about your other stylistic changes, but this one took me a second to understand. Do you have a strong objection to retaining fmt.Sprintf here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to change it back. I'll also consider disabling perfsprintf from my linter.

@ahrav ahrav merged commit 6923843 into main Nov 4, 2024
13 checks passed
@ahrav ahrav deleted the chore-cleanup-s3 branch November 4, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants