-
Notifications
You must be signed in to change notification settings - Fork 772
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
1332 workflow restrictions #1462
1332 workflow restrictions #1462
Conversation
@@ -26,6 +26,8 @@ func TestAccGithubActionsRunnerGroup(t *testing.T) { | |||
resource "github_actions_runner_group" "test" { | |||
name = github_repository.test.name | |||
visibility = "all" | |||
restricted_to_workflows = true |
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.
i don't think i can run these tests... i think they require an enterprise account?
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.
On main, I'm getting a failure on these acceptance tests:
--- FAIL: TestAccGithubActionsRunnerGroup (47.67s)
--- FAIL: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error (12.52s)
--- SKIP: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_individual_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_organization_account (12.52s)
--- FAIL: TestAccGithubActionsRunnerGroup/manages_runner_visibility (11.71s)
--- SKIP: TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_individual_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_organization_account (11.71s)
--- FAIL: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error (11.47s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_individual_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_organization_account (11.47s)
--- PASS: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_individual_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_organization_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error (11.98s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error/with_an_individual_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error/with_an_organization_account (11.98s)
FAIL
On this branch, I'm seeing a panic on line 179 of github/resource_github_actions_runner_group.go:
d.Set("selected_workflows", runnerGroup.SelectedWorkflows)
.
The error reads panic: runtime error: invalid memory address or nil pointer dereference
. Can you reproduce that when you run these tests on the branch locally?
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.
I'm not able to successfully run the TestAccGithubActionsRunnerGroup
tests even from the main
branch, so it makes it difficult for me to verify my own PR (other tests work file however). I think these tests require me to have an Enterprise Account, which I do not have on my personal account. Hm...
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.
Ohh that makes sense. We currently don't have a framework in place for enterprise testing, although it's on the TODO list in the effort starting with #1414.
@@ -26,6 +26,8 @@ func TestAccGithubActionsRunnerGroup(t *testing.T) { | |||
resource "github_actions_runner_group" "test" { | |||
name = github_repository.test.name | |||
visibility = "all" | |||
restricted_to_workflows = true |
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.
On main, I'm getting a failure on these acceptance tests:
--- FAIL: TestAccGithubActionsRunnerGroup (47.67s)
--- FAIL: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error (12.52s)
--- SKIP: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_individual_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_organization_account (12.52s)
--- FAIL: TestAccGithubActionsRunnerGroup/manages_runner_visibility (11.71s)
--- SKIP: TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_individual_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_organization_account (11.71s)
--- FAIL: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error (11.47s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_individual_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_organization_account (11.47s)
--- PASS: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_anonymous_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_individual_account (0.00s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_organization_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error (11.98s)
--- SKIP: TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error/with_an_individual_account (0.00s)
--- FAIL: TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error/with_an_organization_account (11.98s)
FAIL
On this branch, I'm seeing a panic on line 179 of github/resource_github_actions_runner_group.go:
d.Set("selected_workflows", runnerGroup.SelectedWorkflows)
.
The error reads panic: runtime error: invalid memory address or nil pointer dereference
. Can you reproduce that when you run these tests on the branch locally?
* update documentation with new params
d381f29
to
8c7edb6
Compare
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.
Hey @bob-bins thanks again for the contributions here! ❤️
Resolves #1332
Behavior
Supports the following options in resource
github_actions_runner_group
Additional info
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
Type: Breaking change
label)If
Yes
, what's the impact:Pull request type
Please add the corresponding label for change this PR introduces:
Type: Bug
Type: Feature
Type: Documentation
Type: Maintenance