Skip to content

scalesets runner group check incorrectly encodes query parameters #452

Description

@Hdom

Hello @gabriel-samfira I am in the midst of testing the scaleset feature and ran into this issue.

In GetRunnerGroupByName the way that the query parameter is set into the path is breaking once the path is passed into newActionsRequest

I added some debugging and what I am experiencing is the following:

  • Path generated by GetRunnerGroupByName: _apis/runtime/runnergroups/?groupName=<runnergroup>
  • newActionsRequest acquires url from s.actionsServiceInfo.GetURL(): https://pipelinesghubeus12.actions.githubusercontent.com/<token>/
  • newActionsRequest joins URL with Path uri := actionsURI.JoinPath(path). At this point I added a debug and the path looks like so: https://pipelinesghubeus12.actions.githubusercontent.com/<token>/_apis/runtime/runnergroups/%3FgroupName=<runnergroup>

Hopefully that makes sense, it looks like the ampersand in the path is being url encoded.

This results in the query returning all runners groups which breaks the condition at this line and I get error multiple runner groups exist with the same name (<runnergroup>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions