-
Notifications
You must be signed in to change notification settings - Fork 773
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
[BUG]: Since 6.0.1
the github_actions_repository_permissions
resource errors on read when it's disabled
#2182
Comments
Oh, that's not ideal. Do you think this is severe enough to warrant a rollback of #2114? @Danielku15, do you have thoughts on how we might go about resolving this? |
@kfcampbell from our side it wasted a couple of hours and then required a rollback to |
I'll try to have a look tomorrow (its already 11pm here) 😅 From my direct changes I cannot directly infer what would trigger this. My new conditions mainly target the allowed_actions="selected". I assume they trigger some unintended else-path. Should be easy to fix once I narrowed down the exact path. Edit: The TestAccGithubActionsRepositoryPermissions/test_disabling_actions_on_a_repository suite also fails already on my PC with this error. Seems tests are not fully running on GitHub Actions / PullRequests? @kfcampbell Would it make sense to setup there a more continuous acceptance testing to catch those errors? https://github.com/integrations/terraform-provider-github/actions/runs/8144672944/job/22259269917#step:8:7 Found the error and will work on a fix. The problematic code is the resource import / initial read logic where terraform does not provide access to the desired state defined in code and we try to load the actions always: terraform-provider-github/github/resource_github_actions_repository_permissions.go Lines 177 to 179 in b9af9f3
Edit 2: Fix is ready at #2186 |
@Danielku15 thanks for the attention here! You're correct that integration tests are not automatically running on PRs and merges; I've opened #1414 to track this but we haven't gotten the time or priority to work on it unfortunately. We've struggled with the expense, time, and hassle of automatically testing resources and we're certainly in an unhealthy position now. In the meantime, I've been running relevant tests manually, which is not ideal. I appreciate you opening the PR, I'll look shortly! |
@kfcampbell it looks like the |
It's definitely not. Let's keep future discussion about that issue on #2191. |
#2191 wasn't created when I added this comment, but I saw it was opened and am following it. |
Expected Behavior
When a
github_actions_repository_permissions
resource is set to disabled it should be able to be read correctly.Actual Behavior
We're getting the following error when we have a
github_actions_repository_permissions
resource set to disabled.I suspect that this has been caused by the changes in 97d5113.
Terraform Version
Terraform v1.5.7
on linux_amd64
Affected Resource(s)
github_actions_repository_permissions
Terraform Configuration Files
Steps to Reproduce
No response
Debug Output
No response
Panic Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: