-
Notifications
You must be signed in to change notification settings - Fork 949
Support shared_runners_setting
in Group response
#1805
Support shared_runners_setting
in Group response
#1805
Conversation
@@ -607,7 +607,7 @@ type SharedRunnersSettingValue string | |||
// https://docs.gitlab.com/ee/api/groups.html#options-for-shared_runners_setting | |||
const ( | |||
EnabledSharedRunnersSettingValue SharedRunnersSettingValue = "enabled" | |||
DisabledWithOverrideSharedRunnersSettingValue SharedRunnersSettingValue = "disabled_with_override" |
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 wonder if it makes sense to leave the deprecated setting in here just to be more graceful and be backwards compatible. You could mark the setting as deprecated:
// Deprecated: DisabledWithOverrideSharedRunnersSettingValue is deprecated in favor of DisabledAndOverridableSharedRunnersSettingValue
DisabledWithOverrideSharedRunnersSettingValue SharedRunnersSettingValue = "disabled_with_override"
DisabledAndOverridableSharedRunnersSettingValue SharedRunnersSettingValue = "disabled_and_overridable"
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.
That's a good point! I added it as deprecated 👍
Add `shared_runners_setting` in Group response and removed `shared_runners_enabled` because it was not included in the response. Ref: https://docs.gitlab.com/ee/api/groups.html
ce1d943
to
79f8c53
Compare
@@ -68,7 +68,7 @@ type Group struct { | |||
MentionsDisabled bool `json:"mentions_disabled"` | |||
RunnersToken string `json:"runners_token"` | |||
SharedProjects []*Project `json:"shared_projects"` | |||
SharedRunnersEnabled bool `json:"shared_runners_enabled"` | |||
SharedRunnersSetting SharedRunnersSettingValue `json:"shared_runners_setting"` |
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.
Guess SharedRunnersEnabled
should also be deprecated instead of removed right?
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.
Hi @svanharmelen, in my understanding, SharedRunnersEnabled
is not an attribute of Group
resource in the first place. SharedRunnersEnabled
is an output of Project
resource. So, I think we should remove SharedRunnersEnabled
here. cc: @timofurrer
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.
@svanharmelen @takp it seems like I've introduced this field a while back (#1429) - wrongly 😰
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.
Check 👍🏻
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.
Thanks 👍🏻
@svanharmelen once again, it would be awesome to get a release of this asap to unblock provider development 😇 |
Done... |
Thanks! 😄 |
Add
shared_runners_setting
in Group response, and removedshared_runners_enabled
because it was not included in the response. (shared_runners_enabled
is returned in the Project resources, not Group.)I confirmed with the
curl
response and had a look at the gitlab source code as well. In addition, I created a MR to addshared_runners_setting
to the API doc: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132831Ref: