Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions Self-hosted runner groups endpoints missing #448

Open
Eddman opened this issue Sep 15, 2021 · 6 comments
Open

GH Actions Self-hosted runner groups endpoints missing #448

Eddman opened this issue Sep 15, 2021 · 6 comments
Assignees
Labels
enterprise Applies to GitHub Enterprise Server or GitHub Enterprise Cloud Type: Support Any questions, information, or general needs around the SDK or GitHub APIs typescript Relevant to TypeScript users only
Projects

Comments

@Eddman
Copy link

Eddman commented Sep 15, 2021

What happened?

I'd like to call Self-hosted runner groups endpoints, but these are missing completely.

They are present in openapi-types, plugin-paginate-rest and types, but are not referenced in plugin-rest-endpoint-methods nor plugin-enterprise-server.

What did you expect to happen?
Self-hosted runner groups endpoints should be available in plugin-rest-endpoint-methods and plugin-enterprise-server.

What the problem might be

@Eddman Eddman added the Type: Bug Something isn't working as documented label Sep 15, 2021
@ghost ghost added this to Bugs in JS Sep 15, 2021
@gr2m gr2m added the typescript Relevant to TypeScript users only label Sep 15, 2021
@gr2m gr2m self-assigned this Sep 15, 2021
@ghost ghost moved this from Bugs to In progress in JS Sep 15, 2021
@gr2m
Copy link
Contributor

gr2m commented Sep 15, 2021

As far as I know, this endpoint is only accessible to GitHub Enterprise Cloud, can you confirm?

I remember it wasn't flagged correctly in the OpenAPI spec, so I had to add a workaround on my side
https://github.com/gr2m/github-openapi-graphql-query/blob/405891d8cd001f2c126174e6f1bf5f9847213a54/lib/workarounds.js#L15

I didn't further investigate because the plan was to create a separate OpenAPI spec for GitHub Enterprise Cloud, but that still didn't happen. I think there was another reason why I had to add the workaround on my side, I wish I kept track of that instead of just writing "Due to complications" in the comment 🤷🏼

@Eddman
Copy link
Author

Eddman commented Sep 15, 2021

That is not fully true. Runner groups are available for github.com (single group, but not manageable via API) as well as enterprise cloud as well as GitHub EE (self-hosted).

But you're right: I don't understand why you're "hiding" these 🙂 For me as Octokit user (even thou I'm GHEE user, not cloud) I may want to call these to manage my groups.... And now it is missing in plugin-enterprise-server as well.

@gr2m
Copy link
Contributor

gr2m commented Sep 15, 2021

What is "GitHub EE"? Is that GitHub Enterprise Server?

We left out enterprise-only endpoints by default because the @octokit/plugin-rest-endpoint-methods plugin is so widely used, and in most cases folks don't need the Enterprise endpoints. We created https://github.com/octokit/plugin-enterprise-server.js and https://github.com/octokit/plugin-enterprise-cloud.js for that purpose. I think for your case you can use https://github.com/octokit/plugin-enterprise-cloud.js?

I've created the follow up issue on the OpenAPI spec repository, let's see what they API folks say.

We are aware that enterprise support is rather weak right now, it's one of the main motivations behind working on a revamped Octokit, you can follow updates at https://github.com/octokit/octokit-next.js if you are interested

@gr2m gr2m added enterprise Applies to GitHub Enterprise Server or GitHub Enterprise Cloud Type: Support Any questions, information, or general needs around the SDK or GitHub APIs and removed Type: Bug Something isn't working as documented labels Sep 15, 2021
@Eddman
Copy link
Author

Eddman commented Sep 15, 2021

Yes, sorry, I meant GH Enterprise Server.

Will try to use plugin-enterprise-cloud.js for now...hopefully it will work for Enterprise Server as well. My only problem is that GH APIs usually differ in different versions of Enterprise Server. We're usually few steps behind (currently version 3.0, latest is 3.2, and Enterprise Cloud is even further) and there may already be breaking changes.

@gr2m
Copy link
Contributor

gr2m commented Sep 15, 2021

Maybe that was the reason why the flag was not set, because it's supported by both GHEC & GHES, and setting githubCloudOnly to true might be confusing for consumers in GHES.

I think I would recommend to just use octokit.request for now, until we figure this out properly. Introducing methods from GHEC to a GHES environment might cause more problems than it solves.

@axel3rd
Copy link

axel3rd commented Dec 7, 2021

+1, could be helpful to implement auto-scaling runners at enterprise level (available in GHES v3.3, partially in GHES v3.2) in Recommended autoscaling solutions => philips-labs/terraform-aws-github-runner#1303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enterprise Applies to GitHub Enterprise Server or GitHub Enterprise Cloud Type: Support Any questions, information, or general needs around the SDK or GitHub APIs typescript Relevant to TypeScript users only
Projects
No open projects
JS
  
In progress
Development

No branches or pull requests

3 participants