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

Add GitHub App support #156

Merged
merged 13 commits into from
Jun 12, 2024
Merged

Add GitHub App support #156

merged 13 commits into from
Jun 12, 2024

Conversation

MagicRB
Copy link
Contributor

@MagicRB MagicRB commented May 19, 2024

This is still work in progress, avatars are broken and the code is ugly. But functionally its complete.

@MagicRB
Copy link
Contributor Author

MagicRB commented May 23, 2024

I have verified all 3 current backends, Gitea, GitHub legacy and GitHub app.

There are a few things left open:

  • GitHub's status reporter still tries to report Gitea events and fails harmlessly
  • GitHub app backend does not check for permissions at all
  • reload-github-projects can be made obsolete for the GitHub app event as GitHub provides a webhook which will notify the app about any repositories or installations being added/removed
  • documentation
  • tests
  • the nix module is not perfect, as in the current nixpkgs pin, attrTag is missing and so its hard to represent what we're trying to represent. Currently both auth backends can be enabled at the same time and buildbot will fail to launch. I will reattempt this later as it should be in nixos-unstable-small
  • avatars are still broken, I am not sure how to fix those

but aside from those things, the code is functional and ready for review

@MagicRB MagicRB marked this pull request as ready for review May 23, 2024 09:36
@Mic92
Copy link
Member

Mic92 commented May 23, 2024

Ah. So it's the avatar where it doesn't render the secret properly and instead only load it on initialize. This can be fixed with a patch, that will hopefully also be accepted upstream.

@MagicRB
Copy link
Contributor Author

MagicRB commented May 23, 2024

I'm not quite sure what you mean, but the problem with avatars is simply that I have no clue what token to feed into it. It won't accept the JWT app token (which is what is being fed in now) and the installation tokens are per installation, so again I'm not sure which one to feed in.

@Mic92
Copy link
Member

Mic92 commented May 27, 2024

I would expect the installation token to work. However unlike other parts of github it doesn't use the secrets api of buildbot and instead expects the token itself -> this needs to be fixed in buildbot.

@MagicRB
Copy link
Contributor Author

MagicRB commented May 27, 2024

The status push also just expects a token, it is poasible to hack together. But yes the big problem is the installation token doesn't work. But I've been told that there is a public endpoint we could use, just don't how fine that is ToS. (github.com can render avatars without login, so it must exist somewhere)

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 2, 2024

https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-a-user that endpoint requires a installation token, i have absolutely no clue how to associate installation tokens with specific users though. I will look into bypassing that endpoint, user avatars should be public in the api

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 2, 2024

This PR should be ready, I utilized attrTag and I can therefore no longer deploy it to my systems, until I repin nixpkgs (which I am planning to do today and the following week). The app backend is working, the legacy one was tested throughout development (it does evaluate I can test that), but I would appreciate someone giving that a final pass before we merge, @Mic92 do you have an instance you can test it on quickly? I will attempt to repin my server so I can test it on my own infrastructure.

README.md Outdated Show resolved Hide resolved
@Erethon
Copy link
Contributor

Erethon commented Jun 7, 2024

but I would appreciate someone giving that a final pass before we merge

I tested the legacy option with the token and it worked fine. I also did get a helpful warning when I used your branch that pointed me in the right direction about what I needed to update on my configuration.

trace: warning: The option services.buildbot-nix.master.github.tokenFile' defined in /nix/store/n4wna8b7g4377cfhm4yaihg62li2gbm7-source/hosts/nixtest1/default.nix' has been renamed to `services.buildbot-nix.master.github.authType.legacy.tokenFile'.

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 7, 2024

Wonderful! Thanks for the test. Then I think we're good to merge. I will open more PRs, specifically one to implement webhook app refresh and getting rid of the timer. And another series of PRs getting rid of the horrible hacks i put inplace to workaround buildbots github implementation once i upstream things into buildbot (and figure out a good API, that would be backwards compatible)

@Mic92
Copy link
Member

Mic92 commented Jun 7, 2024

I have a look on my system.

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 7, 2024

Thanks for the fox @Mic92 im currently on my way home.

@Mic92
Copy link
Member

Mic92 commented Jun 7, 2024

@mergify rebase

MagicRB and others added 6 commits June 7, 2024 08:16
Signed-off-by: magic_rb <richard@brezak.sk>
Signed-off-by: magic_rb <richard@brezak.sk>
Signed-off-by: magic_rb <richard@brezak.sk>
Signed-off-by: magic_rb <richard@brezak.sk>
Copy link

mergify bot commented Jun 7, 2024

rebase

✅ Branch has been successfully rebased

@Mic92
Copy link
Member

Mic92 commented Jun 7, 2024

I added an assertion statement because if you were still using the old repository labels, than there would be no "installation_id" set. Also would this not also break if we just install an app globally to all repositories?

@zimbatm zimbatm added this to the Release 1.0 milestone Jun 11, 2024
@Mic92
Copy link
Member

Mic92 commented Jun 12, 2024

I also forgot to specify app permission when creating the application. Please verify the ones I set are correct.

@Mic92
Copy link
Member

Mic92 commented Jun 12, 2024

Looks like we still miss one:

Jun 12 07:11:42 eve twistd[2368823]: 2024-06-12T07:11:42+0000 [HTTP11ClientProtocol (BufferingTLSTransport),client] Failed to update "success" for Mic92/dotfiles at f405412e2a2d73489f8168de85e17579b302258c, context "buildbot/nix-eval", issue 1142. http 403, b'{"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/commits/statuses#create-a-commit-status","status":"403"}'
Jun 12 07:11:42 eve twistd[2368823]:         Traceback (most recent call last):
Jun 12 07:11:42 eve twistd[2368823]:           File "/nix/store/k657hraaqivk458aimgz3kg50r08nk73-python3-3.11.9-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 1078, in _runCallbacks
Jun 12 07:11:42 eve twistd[2368823]:             current.result = callback(  # type: ignore[misc]
Jun 12 07:11:42 eve twistd[2368823]:           File "/nix/store/k657hraaqivk458aimgz3kg50r08nk73-python3-3.11.9-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 1949, in _gotResultInlineCallbacks
Jun 12 07:11:42 eve twistd[2368823]:             _inlineCallbacks(r, gen, status, context)
Jun 12 07:11:42 eve twistd[2368823]:           File "/nix/store/k657hraaqivk458aimgz3kg50r08nk73-python3-3.11.9-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 2003, in _inlineCallbacks
Jun 12 07:11:42 eve twistd[2368823]:             result = context.run(gen.send, result)
Jun 12 07:11:42 eve twistd[2368823]:           File "/nix/store/k657hraaqivk458aimgz3kg50r08nk73-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/reporters/github.py", line 234, in sendMessage
Jun 12 07:11:42 eve twistd[2368823]:             log.err(
Jun 12 07:11:42 eve twistd[2368823]:         --- <exception caught here> ---
Jun 12 07:11:42 eve twistd[2368823]:           File "/nix/store/k657hraaqivk458aimgz3kg50r08nk73-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/reporters/github.py", line 222, in sendMessage
Jun 12 07:11:42 eve twistd[2368823]:             raise RuntimeError()
Jun 12 07:11:42 eve twistd[2368823]:         builtins.RuntimeError:

Enable the following permissions:
- Contents: Read-only
- Metadata: Read-only
- Commit statuses: Read and write
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Found it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have:

  • commit statuses: RW
  • contents: R
  • issues: RW
  • merge queues: RW
  • metadata: R
  • webhooks: RW

Copy link
Contributor Author

@MagicRB MagicRB Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure webhooks are needed for creation, the rest are kind of vague, ill check the endpoints.

going through our code, at least:

  • commit statuses: RW
  • metadata: R
  • webhooks: RW
  • contents: R

are needed, not sure about merge queues and issues, ill disable and attempt to get an error

Copy link
Contributor Author

@MagicRB MagicRB Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested CI on a PR without merge queues or issues and it seems to be good, so the only thing we're missing are webhooks so we're fine

@Mic92
Copy link
Member

Mic92 commented Jun 12, 2024

I just had to delete github-app-installation-token-map.json again to make it work. Not sure if this was caused by making the github app public or if the key was expired and not renewed?

@Mic92
Copy link
Member

Mic92 commented Jun 12, 2024

I just had to delete github-app-installation-token-map.json again to make it work. Not sure if this was caused by making the github app public or if the key was expired and not renewed?

Looks like it's no longer expiring. So it must have something to do with making it public.

Copy link
Member

@Mic92 Mic92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my site. @MagicRB please merge if you are happy with my changes.

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 12, 2024

I just had to delete github-app-installation-token-map.json again to make it work. Not sure if this was caused by making the github app public or if the key was expired and not renewed?

That is a bug, can you provide some logs or something? It should auto renew everything

@Mic92
Copy link
Member

Mic92 commented Jun 12, 2024

I just had to delete github-app-installation-token-map.json again to make it work. Not sure if this was caused by making the github app public or if the key was expired and not renewed?

That is a bug, can you provide some logs or something? It should auto renew everything

I could try to reproduce it, when converting the numtide instance.

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 12, 2024

I will go over the renewal code, trying to spot a mistake somewhere. Or maybe evict the cache in case of an auth failure

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 12, 2024

I couldn't find anything obvious, I am testing a "if any project is missing an installation_id, refresh projects" fix though. Will push that once I've verified it works. It should improve the Legacy -> App migration experience

@Mic92
Copy link
Member

Mic92 commented Jun 12, 2024

Could we bust caches somehow that are missing installation_id?

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 12, 2024

that is what im attempting to implement

Signed-off-by: magic_rb <richard@brezak.sk>
…son` extension

Signed-off-by: magic_rb <richard@brezak.sk>
Signed-off-by: magic_rb <richard@brezak.sk>
@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 12, 2024

I fixed a few more things, migration is now seamless both ways, app_project_id_map_name now defaults to a file with a .json extension and if said files disappears (or the default location changes :) ) a project reload will be scheduled (with a message in the logs of course)

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 12, 2024

I think we're good to merge, let's see what things and where they explode, hopefully nowhere

@MagicRB MagicRB merged commit 7e327b8 into nix-community:main Jun 12, 2024
@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 12, 2024

@Mic92 is this what you ran into? if yes, then fixed by #179

Jun 12 16:20:05 buildbot systemd[1]: Started Buildbot Continuous Integration Server..
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:05+0000 [-] Loading /var/lib/buildbot/master/buildbot.tac...
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [-] Loaded.
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 24.3.0 (/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/bin/python3.11 3.11.9) starting up.
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [-] Starting BuildMaster -- buildbot.version: 3.11.2
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [-] Loading configuration from '/nix/store/8fis8i15fxjjnbjgcbyx4safkjx4ysw8-master.cfg'
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [buildbot_nix.github_projects#info] Loading 74 cached repositories.
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [-] while starting BuildMaster
Jun 12 16:20:07 buildbot twistd[452]:         Traceback (most recent call last):
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 1078, in _runCallbacks
Jun 12 16:20:07 buildbot twistd[452]:             current.result = callback(  # type: ignore[misc]
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 1949, in _gotResultInlineCallbacks
Jun 12 16:20:07 buildbot twistd[452]:             _inlineCallbacks(r, gen, status, context)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 1999, in _inlineCallbacks
Jun 12 16:20:07 buildbot twistd[452]:             result = context.run(
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/failure.py", line 519, in throwExceptionIntoGenerator
Jun 12 16:20:07 buildbot twistd[452]:             return g.throw(self.value.with_traceback(self.tb))
Jun 12 16:20:07 buildbot twistd[452]:         --- <exception caught here> ---
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/master.py", line 252, in startService
Jun 12 16:20:07 buildbot twistd[452]:             self.config = yield threads.deferToThreadPool(
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/threadpool.py", line 269, in inContext
Jun 12 16:20:07 buildbot twistd[452]:             result = inContext.theWork()  # type: ignore[attr-defined]
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/threadpool.py", line 285, in <lambda>
Jun 12 16:20:07 buildbot twistd[452]:             inContext.theWork = lambda: context.call(  # type: ignore[attr-defined]
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/context.py", line 117, in callWithContext
Jun 12 16:20:07 buildbot twistd[452]:             return self.currentContext().callWithContext(ctx, func, *args, **kw)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/context.py", line 82, in callWithContext
Jun 12 16:20:07 buildbot twistd[452]:             return func(*args, **kw)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/config/master.py", line 121, in loadConfig
Jun 12 16:20:07 buildbot twistd[452]:             config = MasterConfig.loadFromDict(config_dict, filename)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/config/master.py", line 259, in loadFromDict
Jun 12 16:20:07 buildbot twistd[452]:             config.run_configurators(filename, config_dict)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/config/master.py", line 290, in run_configurators
Jun 12 16:20:07 buildbot twistd[452]:             interfaces.IConfigurator(configurator).configure(config_dict)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/__init__.py", line 844, in configure
Jun 12 16:20:07 buildbot twistd[452]:             project.create_project_hook(project.owner, project.repo, self.url)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/github_projects.py", line 661, in create_project_hook
Jun 12 16:20:07 buildbot twistd[452]:             hooks = paginated_github_request(
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/common.py", line 21, in paginated_github_request
Jun 12 16:20:07 buildbot twistd[452]:             res = http_request(
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/common.py", line 86, in http_request
Jun 12 16:20:07 buildbot twistd[452]:             raise HttpError(msg) from e
Jun 12 16:20:07 buildbot twistd[452]:         buildbot_nix.common.HttpError: Request for GET https://api.github.com/repos/MagicRB/buildbot-nix/hooks?per_page=100 failed with 401 Unauthorized: {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest","status":"401"}
Jun 12 16:20:07 buildbot twistd[452]:
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [-] BuildMaster startup failed
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [-] BuildMaster is stopped
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [-] Main loop terminated.
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] Server Shut Down.
Jun 12 16:20:07 buildbot systemd[1]: buildbot-master.service: Deactivated successfully.
Jun 12 16:20:07 buildbot systemd[1]: buildbot-master.service: Consumed 4.272s CPU time.

@MagicRB
Copy link
Contributor Author

MagicRB commented Jun 12, 2024

I fixed a few more things, migration is now seamless both ways, app_project_id_map_name now defaults to a file with a .json extension and if said files disappears (or the default location changes :) ) a project reload will be scheduled (with a message in the logs of course)

broke treefmt with this one, apologies, we should setup a pre commit hook or something like that. I'll look into it, so that I don't forget to check for treefmt :)

MagicRB added a commit to MagicRB/buildbot-nix that referenced this pull request Jun 12, 2024
Signed-off-by: magic_rb <richard@brezak.sk>
@Mic92
Copy link
Member

Mic92 commented Jun 13, 2024

@Mic92 is this what you ran into? if yes, then fixed by #179

Jun 12 16:20:05 buildbot systemd[1]: Started Buildbot Continuous Integration Server..
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:05+0000 [-] Loading /var/lib/buildbot/master/buildbot.tac...
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [-] Loaded.
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 24.3.0 (/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/bin/python3.11 3.11.9) starting up.
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [-] Starting BuildMaster -- buildbot.version: 3.11.2
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [-] Loading configuration from '/nix/store/8fis8i15fxjjnbjgcbyx4safkjx4ysw8-master.cfg'
Jun 12 16:20:06 buildbot twistd[452]: 2024-06-12T16:20:06+0000 [buildbot_nix.github_projects#info] Loading 74 cached repositories.
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [-] while starting BuildMaster
Jun 12 16:20:07 buildbot twistd[452]:         Traceback (most recent call last):
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 1078, in _runCallbacks
Jun 12 16:20:07 buildbot twistd[452]:             current.result = callback(  # type: ignore[misc]
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 1949, in _gotResultInlineCallbacks
Jun 12 16:20:07 buildbot twistd[452]:             _inlineCallbacks(r, gen, status, context)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/internet/defer.py", line 1999, in _inlineCallbacks
Jun 12 16:20:07 buildbot twistd[452]:             result = context.run(
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/failure.py", line 519, in throwExceptionIntoGenerator
Jun 12 16:20:07 buildbot twistd[452]:             return g.throw(self.value.with_traceback(self.tb))
Jun 12 16:20:07 buildbot twistd[452]:         --- <exception caught here> ---
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/master.py", line 252, in startService
Jun 12 16:20:07 buildbot twistd[452]:             self.config = yield threads.deferToThreadPool(
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/threadpool.py", line 269, in inContext
Jun 12 16:20:07 buildbot twistd[452]:             result = inContext.theWork()  # type: ignore[attr-defined]
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/threadpool.py", line 285, in <lambda>
Jun 12 16:20:07 buildbot twistd[452]:             inContext.theWork = lambda: context.call(  # type: ignore[attr-defined]
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/context.py", line 117, in callWithContext
Jun 12 16:20:07 buildbot twistd[452]:             return self.currentContext().callWithContext(ctx, func, *args, **kw)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/context.py", line 82, in callWithContext
Jun 12 16:20:07 buildbot twistd[452]:             return func(*args, **kw)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/config/master.py", line 121, in loadConfig
Jun 12 16:20:07 buildbot twistd[452]:             config = MasterConfig.loadFromDict(config_dict, filename)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/config/master.py", line 259, in loadFromDict
Jun 12 16:20:07 buildbot twistd[452]:             config.run_configurators(filename, config_dict)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot/config/master.py", line 290, in run_configurators
Jun 12 16:20:07 buildbot twistd[452]:             interfaces.IConfigurator(configurator).configure(config_dict)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/__init__.py", line 844, in configure
Jun 12 16:20:07 buildbot twistd[452]:             project.create_project_hook(project.owner, project.repo, self.url)
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/github_projects.py", line 661, in create_project_hook
Jun 12 16:20:07 buildbot twistd[452]:             hooks = paginated_github_request(
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/common.py", line 21, in paginated_github_request
Jun 12 16:20:07 buildbot twistd[452]:             res = http_request(
Jun 12 16:20:07 buildbot twistd[452]:           File "/nix/store/31gip4q86bcc1873w6qcadj6gl2ana82-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/common.py", line 86, in http_request
Jun 12 16:20:07 buildbot twistd[452]:             raise HttpError(msg) from e
Jun 12 16:20:07 buildbot twistd[452]:         buildbot_nix.common.HttpError: Request for GET https://api.github.com/repos/MagicRB/buildbot-nix/hooks?per_page=100 failed with 401 Unauthorized: {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest","status":"401"}
Jun 12 16:20:07 buildbot twistd[452]:
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [-] BuildMaster startup failed
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [-] BuildMaster is stopped
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [-] Main loop terminated.
Jun 12 16:20:07 buildbot twistd[452]: 2024-06-12T16:20:07+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] Server Shut Down.
Jun 12 16:20:07 buildbot systemd[1]: buildbot-master.service: Deactivated successfully.
Jun 12 16:20:07 buildbot systemd[1]: buildbot-master.service: Consumed 4.272s CPU time.

Yes. That's the one.

Mic92 added a commit that referenced this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants