Skip to content

Conversation

@skeggse
Copy link

@skeggse skeggse commented Jul 17, 2025

Resolves #2450


Before the change?

If an error occurs that is NOT a github.ErrorResponse or is a github.ErrorResponse with a status code other than 304 or 404 the current implementation will:

Not return from the function and continue executing and try to access resp.Header and ruleset.Name. Since both resp and ruleset are nil when there's an error we get a SIGSEGV

After the change?

  • Valid error response

Pull request checklist

  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

  • Yes
  • No

@nickfloyd nickfloyd moved this from Backlog to In Progress in Terraform Provider Nov 20, 2025
@nickfloyd nickfloyd moved this from In Progress to In Review in Terraform Provider Nov 20, 2025
@nickfloyd nickfloyd added this to the v6.x version wrap up milestone Nov 20, 2025
@diofeher diofeher self-requested a review November 23, 2025 03:07
Copy link
Collaborator

@diofeher diofeher left a comment

Choose a reason for hiding this comment

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

@skeggse Could you please add more context to the pull request's description about how you've fixed the problem and include an automated test demonstrating how this new functionality is expected to resolve the issue linked on the PR?

@github-project-automation github-project-automation bot moved this from 🆕 Triage to 🏗 In progress in 🧰 Octokit Active Nov 23, 2025
@diofeher diofeher self-assigned this Nov 23, 2025
@nickfloyd
Copy link
Member

@diofeher Due to the length of time it has taken to get this in, I'll step in and complete the PR description. After running some local tests this is what I came up with:

If an error occurs that is NOT a github.ErrorResponse or is a github.ErrorResponse with a status code other than 304 or 404 the current implementation will:

Not return from the function and continue executing and try to access resp.Header and ruleset.Name. Since both resp and ruleset are nil when there's an error we get a SIGSEGV

@nickfloyd nickfloyd requested a review from diofeher November 26, 2025 20:57
@deiga
Copy link
Contributor

deiga commented Nov 26, 2025

@nickfloyd Would there be any value in having some kind of regression test for that scenario? Maybe it could be used in the future to ensure other resources don't end up in a similar situation?

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

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

[BUG]: Refreshing github_organization_ruleset crashes Terraform plugin with segfault

4 participants