Skip to content

feat/refactor: rewrite webhook-handler#3979

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

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

Conversation

@shreddedbacon
Copy link
Copy Markdown
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
Copy Markdown

github-actions Bot commented Oct 28, 2025

Overview

Image reference testlagoon/api:main lagoon/api:ci-latest
- digest 353b0987ad95 671fed82db9d
- tag main ci-latest
- provenance https://github.com/uselagoon/lagoon.git/commit/7a5630f4a3d391bdf0c5527faaa178d5ba5c89ad
- vulnerabilities critical: 3 high: 47 medium: 25 low: 8 critical: 2 high: 39 medium: 18 low: 7
- platform linux/amd64 linux/amd64
- size 151 MB 171 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
jod-alpine
jod-alpine3.23
node:22-alpine
also known as:
22-alpine3.23
22.22-alpine
22.22-alpine3.23
22.22.1-alpine
22.22.1-alpine3.23
jod-alpine
jod-alpine3.23
- vulnerabilities critical: 0 high: 12 medium: 3 low: 2 unspecified: 6 critical: 0 high: 12 medium: 3 low: 2 unspecified: 6
Environment Variables (1 changes)
  • ± 1 changed
  • 16 unchanged
 BASH_ENV=/home/.bashrc
 ELASTICSEARCH_URL=http://logs-db-service:9200
 ENV=/home/.bashrc
 HOME=/home
 KEYCLOAK_ADMIN_API_CLIENT_SECRET=bb86d344-a52d-11ef-b872-4f4337ee24f0
 KEYCLOAK_API_CLIENT_SECRET=39d5282d-3684-4026-b4ed-04bbc034b61a
 LAGOON=node
 LAGOON_LOCALDEV_HTTP_PORT=3000
 LAGOON_VERSION=development
 LOGSDB_ADMIN_PASSWORD=admin
 NODE_ENV=production
-NODE_VERSION=22.22.0
+NODE_VERSION=22.22.1
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 REDIS_PASSWORD=admin
 TMP=/tmp
 TMPDIR=/tmp
 YARN_VERSION=1.22.22
Packages and Vulnerabilities (75 package changes and 7 vulnerability changes)
  • ➖ 68 packages removed
  • ♾️ 7 packages changed
  • 1263 packages unchanged
  • ✔️ 7 vulnerabilities removed
Changes for packages of type github (1 changes)
Package Version
testlagoon/api:main
Version
lagoon/api:ci-latest
♾️ node 22.22.0 22.22.1
Changes for packages of type golang (1 changes)
Package Version
testlagoon/api:main
Version
lagoon/api:ci-latest
♾️ stdlib 1.25.3 1.26.1
critical: 1 high: 3 medium: 0 low: 0
Removed vulnerabilities (4):
  • critical : CVE--2025--68121
  • high : CVE--2026--25679
  • high : CVE--2025--61729
  • high : CVE--2025--61726
Changes for packages of type npm (73 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
♾️ corepack 0.34.0 0.34.6
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
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
critical: 0 high: 1 medium: 0 low: 0
Removed vulnerabilities (1):
  • high : CVE--2026--27601
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
Copy Markdown
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.

3 participants