Skip to content

feat/refactor: rewrite webhook-handler#3979

Draft
shreddedbacon wants to merge 58 commits intomainfrom
webhook-handler-go
Draft

feat/refactor: rewrite webhook-handler#3979
shreddedbacon wants to merge 58 commits intomainfrom
webhook-handler-go

Conversation

@shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Sep 8, 2025

General Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

Database Migrations

  • If your PR contains a database migation, it MUST be the latest in date order alphabetically

Description

This is a substantial rewrite of the webhook-handler which consolidates the webhook-handler and webhooks2tasks services. Additionally, the API will now call out to the api-sidecar-handler service to handle triggering deployments and environment removals, this allows for shared code between the webhook-handler and api-sidecar-handler.

One way this is done is by moving from individual go services with their own go.mod files, into a mono repo setup. There are some remaining services that will need to be converted in a follow up pullrequest though. I left them out of this to try to reduce the amount of changes.

Builds off fork of drone/go-scm, which we can try to get merged into upstream.

Requires uselagoon/lagoon-charts#858

@github-actions
Copy link

github-actions bot commented Oct 28, 2025

Overview

Image reference testlagoon/api:main lagoon/api:ci-latest
- digest a9ca7509afa5 57a979513241
- tag main ci-latest
- provenance https://github.com/uselagoon/lagoon.git/commit/e3b3e65eff5102d4349ee8819537857607c6a372
- vulnerabilities critical: 3 high: 32 medium: 26 low: 5 critical: 2 high: 26 medium: 16 low: 5
- platform linux/amd64 linux/amd64
- size 151 MB 170 MB (+20 MB)
- packages 1579 1490 (-89)
Base Image node:22-alpine
also known as:
22-alpine3.23
22.22-alpine
22.22-alpine3.23
22.22.0-alpine
22.22.0-alpine3.23
jod-alpine
jod-alpine3.23
node:22-alpine
also known as:
22-alpine3.23
22.22-alpine
22.22-alpine3.23
22.22.0-alpine
22.22.0-alpine3.23
jod-alpine
jod-alpine3.23
- vulnerabilities critical: 1 high: 9 medium: 9 low: 2 critical: 0 high: 6 medium: 1 low: 2
Packages and Vulnerabilities (77 package changes and 6 vulnerability changes)
  • ➖ 68 packages removed
  • ♾️ 9 packages changed
  • 1261 packages unchanged
  • ✔️ 6 vulnerabilities removed
Changes for packages of type apk (5 changes)
Package Version
testlagoon/api:main
Version
lagoon/api:ci-latest
♾️ alpine-base 3.23.2-r0 3.23.3-r0
♾️ alpine-release 3.23.2-r0 3.23.3-r0
♾️ libcrypto3 3.5.4-r0 3.5.5-r0
♾️ libssl3 3.5.4-r0 3.5.5-r0
♾️ openssl 3.5.4-r0 3.5.5-r0
critical: 1 high: 3 medium: 0 low: 0
Removed vulnerabilities (4):
  • critical : CVE--2025--15467
  • high : CVE--2025--69421
  • high : CVE--2025--69420
  • high : CVE--2025--69419
Changes for packages of type npm (72 changes)
Package Version
testlagoon/api:main
Version
lagoon/api:ci-latest
@postman/form-data 3.1.1
@postman/tough-cookie 4.1.3-postman.1
@postman/tunnel-agent 0.6.4
asn1 0.2.6
assert-plus 1.0.0
aws-sign2 0.7.0
aws4 1.13.2
bcrypt-pbkdf 1.0.2
bluebird 2.11.0
brotli 1.3.3
caseless 0.12.0
chardet 2.0.0
charset 1.0.1
cli-progress 3.12.0
cli-table3 0.6.5
♾️ commander 8.3.0 7.2.0
core-util-is 1.0.3
csv-parse 4.16.3
dashdash 1.14.1
des.js 1.1.0
ecc-jsbn 0.1.2
extend 3.0.2
extsprintf 1.4.1
file-type 3.9.0
filesize 10.1.4
forever-agent 0.6.1
getpass 0.1.7
har-schema 2.0.0
har-validator 5.1.5
http-reasons 0.1.0
http-signature 1.3.6
httpntlm 1.8.13
httpreq 1.1.1
is-typedarray 1.0.0
isstream 0.1.2
jose 4.14.4
js-md4 0.3.2
js-sha512 0.9.0
json-schema 0.4.0
jsprim 2.0.2
liquid-json 0.3.1
mime-format 2.0.1
newman 6.2.1
node-forge 1.3.1
critical: 0 high: 2 medium: 0 low: 0
Removed vulnerabilities (2):
  • high : CVE--2025--66031
  • high : CVE--2025--12816
node-forge-flash 0.0.0
node-oauth1 1.3.0
oauth-sign 0.9.0
object-hash 1.3.1
parse-ms 2.1.0
performance-now 2.1.0
postman-collection 4.4.0
postman-collection-transformer 4.1.8
postman-request 2.88.1-postman.34
postman-runtime 7.39.1
postman-sandbox 4.7.1
postman-url-encoder 3.0.5
pretty-ms 7.0.1
process-nextick-args 2.0.1
psl 1.15.0
♾️ qs 6.5.3 6.13.0
critical: 0 high: 1 medium: 0 low: 0 critical: 0 high: 1 medium: 0 low: 0
serialised-error 1.1.3
sshpk 1.18.0
♾️ stack-trace 0.0.9 0.0.10
stream-length 1.0.2
teleport-javascript 1.0.0
tweetnacl 0.14.5
underscore 1.12.1
uvm 2.1.1
verror 1.10.0
webhook-handler 0.9.0
webhooks2tasks 1.0.0
♾️ xmlbuilder 15.1.1 11.0.1

@shreddedbacon shreddedbacon changed the title WIP: rewrite webhook-handler feat/refactor: rewrite webhook-handler Feb 1, 2026
@shreddedbacon
Copy link
Member Author

shreddedbacon commented Feb 19, 2026

I forgot that backup-handler still forwarded messages to the legacy webhooks2tasks which is removed in this PR.
Will need to do some refactoring to the backup-handler to work around this.

Edit: Done

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.

1 participant