Skip to content

fix: prevent panic when *http.Response is nil #156

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

Merged
merged 3 commits into from
Jun 2, 2025

Conversation

dannykopping
Copy link
Contributor

@dannykopping dannykopping commented May 21, 2025

closeBody can be called with a nil *http.Response, which will panic.

We observed this occurring in our CI: https://github.com/coder/coder/actions/runs/15155935941/job/42610796260

I've also added explicit error handling for sha256 download failures. I'm not quite sure what caused the issue in our CI run above. Appears to be transient/flaky, so who knows.

@dannykopping dannykopping marked this pull request as draft May 21, 2025 08:01
@dannykopping

This comment was marked as outdated.

@dannykopping dannykopping marked this pull request as ready for review May 21, 2025 08:34
Signed-off-by: Danny Kopping <[email protected]>
@dannykopping
Copy link
Contributor Author

@fergusstrange would you mind reviewing this please?

dannykopping added a commit to coder/coder that referenced this pull request Jun 2, 2025
Addresses fergusstrange/embedded-postgres#156 while maintainer is unresponsive

Signed-off-by: Danny Kopping <[email protected]>
dannykopping added a commit to coder/coder that referenced this pull request Jun 2, 2025
Addresses fergusstrange/embedded-postgres#156 while maintainer is unresponsive

Signed-off-by: Danny Kopping <[email protected]>
dannykopping added a commit to coder/coder that referenced this pull request Jun 2, 2025
Addresses fergusstrange/embedded-postgres#156 while maintainer is unresponsive

Signed-off-by: Danny Kopping <[email protected]>
@fergusstrange
Copy link
Owner

Sorry @dannykopping for the delay. Merging now and creating release.

@fergusstrange fergusstrange merged commit 4fb7ddc into fergusstrange:master Jun 2, 2025
7 of 8 checks passed
@dannykopping
Copy link
Contributor Author

No worries @fergusstrange, appreciate it!

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.

2 participants