kredits-github: fix webhook path and restart on unit changes #688
No Reviewers
Labels
Clear labels
monitoring
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
security
ui/ux
wontfix
Infrastructure metrics, alerts, notifications, etc.
service
discourse
Kosmos Community Forums
service
accounts
Kosmos Accounts
service
drone-ci
Kosmos Drone CI
service
email
mail.kosmos.org
service
garage
S3-compatible object storage
service
gitea
Kosmos Gitea
service
ipfs
Kosmos IPFS
service
lightning
Lightning address, lndhub, etc.
service
mastodon
kosmos.social
service
nostr
Relays, Blossom server, etc.
service
postgres
Database cluster
service
remotestorage
Portable data storage for the Web
service
wiki
Kosmos Wiki
service
xmpp
Kosmos Chat
Something is not working
Graphic/visual design
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Dive in, and start contributing
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Currently not actionable
Manual IT ops activities
Looking for an answer
All your base are belong to us
User interface, process design, etc.
This won't be fixed
release
major
release
minor
release
patch
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/chef#688
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
After the Probot 14 upgrade (6821b4f), kredits-github stopped processing GitHub events entirely. Probot 14 changed its default webhook path from
/(Probot 7) to/api/github/webhooks, but the GitHub App is still configured to POST tohttps://kredits-github.kosmos.org/. Every delivery returned 404 (seen with sockethub/sockethub#1347), sopull_requestlabels were never picked up and noKreditscheck run was ever created.A second, latent bug masked the fix: Chef's
systemd_unit:createaction only runsdaemon-reloadand never restarts a running unit, so writingWEBHOOK_PATH=/into the unit file alone did not affect the running process.Changes
kredits-github: serve/again viaWEBHOOK_PATH=/.kredits-githuband thekosmos-hubotbot resource: manage the unit with:create/:enableand restart it from aserviceresource subscribed to unit changes, so unit/env changes take effect without a repo change or reboot.Verification
Converged
nodejs-5and restarted the service:POST https://kredits-github.kosmos.org/returns400(signature required), was404.pull_request labeleddelivery via the GitHub API: GitHub now reportsOK, and aKreditscheck run was created and completed successfully.