-
Notifications
You must be signed in to change notification settings - Fork 768
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
fix: Make allowed_actions_config optional #2114
fix: Make allowed_actions_config optional #2114
Conversation
@@ -166,6 +166,49 @@ func TestAccGithubActionsOrganizationPermissions(t *testing.T) { | |||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests in this file are passing on the main branch but failing for me on this branch like so:
--- FAIL: TestAccGithubActionsOrganizationPermissions (51.85s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_setting_of_basic_actions_organization_permissions (3.42s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_setting_of_basic_actions_organization_permissions/with_an_organization_account (3.42s)
--- FAIL: TestAccGithubActionsOrganizationPermissions/imports_entire_set_of_github_action_organization_permissions_without_error (16.76s)
--- FAIL: TestAccGithubActionsOrganizationPermissions/imports_entire_set_of_github_action_organization_permissions_without_error/with_an_organization_account (16.76s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_setting_of_organization_allowed_actions (4.79s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_setting_of_organization_allowed_actions/with_an_organization_account (4.79s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_not_setting_of_organization_allowed_actions_without_error (3.05s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_not_setting_of_organization_allowed_actions_without_error/with_an_organization_account (3.05s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_setting_of_organization_enabled_repositories (23.82s)
--- PASS: TestAccGithubActionsOrganizationPermissions/test_setting_of_organization_enabled_repositories/with_an_organization_account (23.82s)
FAIL
Can you reproduce this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kfcampbell Yes, I can reproduce the problem. Seems I had some env-vars wrongly set in my setup. Will prepare a fix.
00040b4
to
419fcfe
Compare
@kfcampbell Problem should be fixed now. I adapted two things:
Its a bit tricky to handle as it seems there is no good way to get the values as defined in code (desired state). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look good to me now, thank you for updating!
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github](https://registry.terraform.io/providers/integrations/github) ([source](https://github.com/integrations/terraform-provider-github)) | required_provider | patch | `6.0.0` -> `6.0.1` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>integrations/terraform-provider-github (github)</summary> ### [`v6.0.1`](https://github.com/integrations/terraform-provider-github/releases/tag/v6.0.1) [Compare Source](https://github.com/integrations/terraform-provider-github/compare/v6.0.0...v6.0.1) #### What's Changed - build(deps): bump github.com/golangci/golangci-lint from 1.56.1 to 1.56.2 by [@​dependabot](https://github.com/dependabot) in [https://github.com/integrations/terraform-provider-github/pull/2159](https://github.com/integrations/terraform-provider-github/pull/2159) - build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.31.0 to 2.32.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/integrations/terraform-provider-github/pull/2160](https://github.com/integrations/terraform-provider-github/pull/2160) - build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.32.0 to 2.33.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/integrations/terraform-provider-github/pull/2168](https://github.com/integrations/terraform-provider-github/pull/2168) - Fix github_external_groups page title by [@​tomasmota](https://github.com/tomasmota) in [https://github.com/integrations/terraform-provider-github/pull/2170](https://github.com/integrations/terraform-provider-github/pull/2170) - docs: Update example usage to use version 6.0 by [@​rnestler](https://github.com/rnestler) in [https://github.com/integrations/terraform-provider-github/pull/2169](https://github.com/integrations/terraform-provider-github/pull/2169) - fix: Make allowed_actions_config optional by [@​Danielku15](https://github.com/Danielku15) in [https://github.com/integrations/terraform-provider-github/pull/2114](https://github.com/integrations/terraform-provider-github/pull/2114) - GitHub org ignore archived repos by [@​felixlut](https://github.com/felixlut) in [https://github.com/integrations/terraform-provider-github/pull/1833](https://github.com/integrations/terraform-provider-github/pull/1833) - build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/integrations/terraform-provider-github/pull/2177](https://github.com/integrations/terraform-provider-github/pull/2177) - build(deps): bump golang.org/x/crypto from 0.19.0 to 0.21.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/integrations/terraform-provider-github/pull/2180](https://github.com/integrations/terraform-provider-github/pull/2180) - build(deps): bump actions/add-to-project from 0.5.0 to 0.6.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/integrations/terraform-provider-github/pull/2175](https://github.com/integrations/terraform-provider-github/pull/2175) #### New Contributors - [@​tomasmota](https://github.com/tomasmota) made their first contribution in [https://github.com/integrations/terraform-provider-github/pull/2170](https://github.com/integrations/terraform-provider-github/pull/2170) - [@​rnestler](https://github.com/rnestler) made their first contribution in [https://github.com/integrations/terraform-provider-github/pull/2169](https://github.com/integrations/terraform-provider-github/pull/2169) - [@​Danielku15](https://github.com/Danielku15) made their first contribution in [https://github.com/integrations/terraform-provider-github/pull/2114](https://github.com/integrations/terraform-provider-github/pull/2114) **Full Changelog**: integrations/terraform-provider-github@v6.0.0...v6.1.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: kireque-bot[bot] <143391978+kireque-bot[bot]@users.noreply.github.com>
Resolves #2105
Before the change?
resource_github_actions_repository_permissions
andresource_github_actions_organization_permissions
theallowed_actions_config
values were considered mandatory ifallowed_actions
was set toselected
After the change?
resource_github_actions_repository_permissions
andresource_github_actions_organization_permissions
theallowed_actions_config
values are optional in all scenarios.allowed_actions_config
is not set on the declared resource, it will not be loaded from the API and the respective properties will not be filled and available for further usage. The behavior is aligned with the otherallowed_actions
values.Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!