[MAINT] Fix actions_hosted_runner tests#3521
Conversation
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
…_error` Signed-off-by: Timo Sand <timo.sand@f-secure.com>
…figStateChecks` Signed-off-by: Timo Sand <timo.sand@f-secure.com>
…cks` and `ConfigPlanChecks` Signed-off-by: Timo Sand <timo.sand@f-secure.com>
…lanChecks` Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
…` API methods Signed-off-by: Timo Sand <timo.sand@f-secure.com>
…are CRUD functions Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
|
👋 Hi, and thank you for this contribution! This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can. You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions. 🤖 This is an automated message. |
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
stevehipwell
left a comment
There was a problem hiding this comment.
Just a quick pre-review, the comments apply to all matching patterns not just the ones I commented on.
| } | ||
|
|
||
| func expandImage(imageList []any) map[string]any { | ||
| func expandImage(imageList []any) github.HostedRunnerImage { |
There was a problem hiding this comment.
It's probably worth moving the helper functions ot the bottom of the file to make the file layout clearer.
| } | ||
|
|
||
| func resourceGithubActionsHostedRunnerCreate(d *schema.ResourceData, meta any) error { | ||
| func resourceGithubActionsHostedRunnerCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { |
There was a problem hiding this comment.
| func resourceGithubActionsHostedRunnerCreate(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { | |
| func resourceGithubActionsHostedRunnerCreate(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics { |
|
|
||
| if v, ok := d.GetOk("public_ip_enabled"); ok { | ||
| payload["enable_static_ip"] = v.(bool) | ||
| if v, okExists := d.GetOkExists("public_ip_enabled"); okExists { //nolint:staticcheck // SA1019: d.GetOkExists is deprecated but necessary for bool fields |
There was a problem hiding this comment.
This isn't required as the value is optional with a default so it's always set one way; d.Get would be fine here.
| req.Image.Version = new(runnerImageVersion) | ||
| } | ||
|
|
||
| if v, ok := d.GetOk("image_gen"); ok { |
There was a problem hiding this comment.
This can be swapped for d.Get as d.GotOk isn't useful for bool values.
Resolves #ISSUE_NUMBER
Before the change?
resource_github_actions_hosted_runnertests have naming collisionsresource_github_actions_hosted_runneruses legacy patternsAfter the change?
resource_github_actions_hosted_runnertests useConfigStateChecksandConfigPlanChecksresource_github_actions_hosted_runnertests don't use conflicting namesresource_github_actions_hosted_runnerto use Context-aware CRUD functionsresource_github_actions_hosted_runnerto not callReadafterUpdateandCreateresource_github_actions_hosted_runnerto usego-githubAPI methodsPull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!