Skip to content

feat: Add ImageGen to HostedRunner and UpdateHostedRunnerRequest - #4549

Open
jdymitarai wants to merge 1 commit into
google:masterfrom
jdymitarai:fix-4532-hosted-runner-image-gen
Open

feat: Add ImageGen to HostedRunner and UpdateHostedRunnerRequest#4549
jdymitarai wants to merge 1 commit into
google:masterfrom
jdymitarai:fix-4532-hosted-runner-image-gen

Conversation

@jdymitarai

Copy link
Copy Markdown

Fixes #4532
Supersedes #4544 (blocked on unsigned CLA from bot account).

Cause

The GitHub-hosted runner API supports image_gen on create, read, and update. Currently, go-github only includes ImageGen in CreateHostedRunnerRequest, making it impossible to read back or update the image generation configuration of runner pools.

Solution

  • Added ImageGen *bool json:"image_gen,omitempty"`` to HostedRunner and `UpdateHostedRunnerRequest`.
  • Regenerated accessors in github-accessors.go and github-accessors_test.go via go generate ./....
  • Added unit tests TestHostedRunner_Marshal and TestUpdateHostedRunnerRequest_Marshal verifying JSON round-trip marshaling.

AI assistance: Drafted marshal tests and verified accessor generation against the OpenAPI spec.

Add ImageGen (*bool) to HostedRunner and UpdateHostedRunnerRequest to
allow reading back and updating the image generation setting for
GitHub-hosted runners.

Fixes google#4532
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Sep 13, 2026
@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.57%. Comparing base (440bc88) to head (b028b1b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4549   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files         197      197           
  Lines       18252    18252           
=======================================
  Hits        17991    17991           
  Misses        261      261           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @jdymitarai!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @Not-Dhananjay-Mishra

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

Labels

NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

image_gen missing from HostedRunner and UpdateHostedRunnerRequest

2 participants