fix!: Pass UpdateHostedRunnerRequest to UpdateHostedRunner#3973
fix!: Pass UpdateHostedRunnerRequest to UpdateHostedRunner#3973alexandear wants to merge 2 commits intogoogle:masterfrom
UpdateHostedRunnerRequest to UpdateHostedRunner#3973Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3973 +/- ##
=======================================
Coverage 93.52% 93.53%
=======================================
Files 207 207
Lines 17600 17590 -10
=======================================
- Hits 16461 16453 -8
+ Misses 938 937 -1
+ Partials 201 200 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
So HostedRunnerRequest has both image_version and image.version? That seems odd.
In other parts of this repo, we reuse structs and add comments for fields that are used by one endpoint and not another... so are you thinking that splitting this struct into two separate use cases is going to reduce end-user confusion, and therefore is a desirable change?
|
We can't reuse structs in this case. They are different. And yes, splitting this struct into two separate use cases:
Here are comparison with Copilot:
|
| @@ -101,6 +100,17 @@ type HostedRunnerRequest struct { | |||
| ImageVersion string `json:"image_version,omitempty"` | |||
There was a problem hiding this comment.
So can image_version now be removed from HostedRunnerRequest?
There was a problem hiding this comment.
And since this is a breaking change, how about completely cleaning up HostRunnerRequest by removing omitempty from all the required fields and adding pointers to the optional fields... also to be more consistent with the rest of the repo?



BREAKING CHANGE:
ActionsService.UpdateHostedRunnerandEnterpriseService.UpdateHostedRunnernow acceptUpdateHostedRunnerRequest.While working on #3972, I found that
ActionsService.UpdateHostedRunneracceptsHostedRunnerRequestas a body. But it's wrong according to the docs for actions and enterprise.Current:
Should be
image_id(optional) instead of theImage. So, I created a separate structUpdateHostedRunnerRequestwith an optionalimage_idand the rest of the fields (all optional).