Skip to content

fix(go): hotfix defer/import errors from v0.16.0 → v0.17.0#8

Merged
Snider merged 1 commit intomainfrom
dev
Apr 30, 2026
Merged

fix(go): hotfix defer/import errors from v0.16.0 → v0.17.0#8
Snider merged 1 commit intomainfrom
dev

Conversation

@Snider
Copy link
Copy Markdown
Contributor

@Snider Snider commented Apr 30, 2026

Fixes build break introduced in v0.16.0. audit.sh still COMPLIANT.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Corrected HTTP response body cleanup handling to prevent potential resource leaks during data fetching operations.
    • Fixed deferred file closure in journal operations to ensure proper resource cleanup at function exit.
  • Chores

    • Removed unused imports from test files.

Hotfix for build failures introduced in v0.16.0:
- jobrunner/journal.go:134: defer f.Close → defer f.Close()
- collect/bitcointalk.go:236: defer resp.Body.Close → defer resp.Body.Close()
- plugin/config_test.go: drop unused `import "testing"` (file has no test bodies)

audit.sh verdict still COMPLIANT.
Build/vet/test all clean now.

Refs tasks.lthn.sh/view.php?id=1248
@Snider Snider merged commit d52d374 into main Apr 30, 2026
1 of 2 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 31a16973-0b83-4a23-8e6d-0d315234327a

📥 Commits

Reviewing files that changed from the base of the PR and between 9d0bb64 and 7814ead.

📒 Files selected for processing (3)
  • go/collect/bitcointalk.go
  • go/jobrunner/journal.go
  • go/plugin/config_test.go

📝 Walkthrough

Walkthrough

Three bug fixes address improper defer statements and unused imports. Two defer statements are corrected to properly invoke Close() methods instead of referencing them, ensuring HTTP response bodies and journal writers are cleaned up. One unused testing package import is removed from a test file.

Changes

Cohort / File(s) Summary
Defer statement fixes
go/collect/bitcointalk.go, go/jobrunner/journal.go
Corrects defer statements to properly invoke Close() methods instead of just referencing them, ensuring proper cleanup of HTTP response bodies and journal writers.
Import cleanup
go/plugin/config_test.go
Removes unused testing package import from test file.

Review rate limit: 3/5 reviews remaining, refill in 21 minutes and 42 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
go/collect/bitcointalk.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant