feat: add ListRunnerScaleSets on Client#92
Open
niranjan94 wants to merge 1 commit intoactions:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
Client.ListRunnerScaleSets(ctx, runnerGroupID)which returns every runner scale set in a given runner group.Today the
ClientexposesGetRunnerScaleSet(lookup by name within a group) andGetRunnerScaleSetByID(lookup by ID), but there is no way to enumerate scale sets in a group without already knowing their names or IDs. This makes it awkward for external controllers that own a subset of scale sets in a group and need to reconcile their desired state against what currently exists on the service, for example to detect and clean up scale sets whose owning configuration has been removed.The new method hits the same
runnerscalesetsendpoint thatGetRunnerScaleSetalready uses, just without thename=query filter, and decodes the existingrunnerScaleSetsResponseenvelope. No new types, no change to existing behavior.Changes
client.go: newListRunnerScaleSetsmethod, modeled on the style and locking discipline of the neighboringGetRunnerScaleSet/GetRunnerScaleSetByIDmethods.client_test.go:TestListRunnerScaleSetsverifies the request path, therunnerGroupIdquery parameter, the absence of anamefilter, and that the response is decoded into the returned slice.