Received webhooks must be evaluated using the SSH URLs as well.
- Architecture: amd64
- Fleet Version: 0.12.3
- Cluster:
- Provider: RKE2
- Options:
- Kubernetes Version: v1.32.4+rke2r1
`gitjob` logs, only webhook payload is displayed, no further logs.
2025-05-26T12:17:55Z DEBUG webhook Webhook payload {"payload": {"ref":"refs/heads/main","before":"c910bb893ccdc56f6e8c0a39f6b3dac7839c2b5d","after":"be4a7eac8027c19e604dba9b31688f0f44d94dac","compare_url":"https://gitea.my.labs/fruit-salad/orange/compare/c910bb893ccdc56f6e8c0a39f6b3dac7839c2b5d...be4a7eac8027c19e604dba9b31688f0f44d94dac","commits":[{"id":"be4a7eac8027c19e604dba9b31688f0f44d94dac","message":"Update README.md\n","url":"https://gitea.my.labs/fruit-salad/orange/commit/be4a7eac8027c19e604dba9b31688f0f44d94dac","author":{"name":"root","email":"root@gitea.my.labs","username":"root"},"committer":{"name":"root","email":"root@gitea.my.labs","username":"root"},"added":[],"removed":[],"modified":["README.md"],"timestamp":"2025-05-26T12:17:51Z"}],"repository":{"id":2,"owner":{"id":5,"username":"fruit-salad","login":"fruit-salad","full_name":"","email":"","avatar_url":"https://gitea.my.labs/avatars/f141c59cb23e486c17f824d950eeca69"},"name":"orange","full_name":"fruit-salad/orange","description":"Orange is a project for managing orange service.","private":true,"unlisted":false,"fork":false,"parent":null,"empty":false,"mirror":false,"size":80,"html_url":"https://gitea.my.labs/fruit-salad/orange","ssh_url":"git@gitea-ssh.my.labs:fruit-salad/orange.git","clone_url":"https://gitea.my.labs/fruit-salad/orange.git","website":"","stars_count":0,"forks_count":0,"watchers_count":1,"open_issues_count":0,"default_branch":"main","created_at":"2025-05-26T07:55:24Z","updated_at":"2025-05-26T12:16:16Z","permissions":{"admin":true,"push":true,"pull":true}},"pusher":{"id":1,"username":"root","login":"root","full_name":"","email":"root@noreply.gitea.my.labs","avatar_url":"https://gitea.my.labs/avatars/6eecda161b118df90f110d5e71d26ab6"},"sender":{"id":1,"username":"root","login":"root","full_name":"","email":"root@noreply.gitea.my.labs","avatar_url":"https://gitea.my.labs/avatars/6eecda161b118df90f110d5e71d26ab6"}}}
Formatted payload
{
"payload": {
"ref": "refs/heads/main",
"before": "c910bb893ccdc56f6e8c0a39f6b3dac7839c2b5d",
"after": "be4a7eac8027c19e604dba9b31688f0f44d94dac",
"compare_url": "https://gitea.my.labs/fruit-salad/orange/compare/c910bb893ccdc56f6e8c0a39f6b3dac7839c2b5d...be4a7eac8027c19e604dba9b31688f0f44d94dac",
"commits": [
{
"id": "be4a7eac8027c19e604dba9b31688f0f44d94dac",
"message": "Update README.md\n",
"url": "https://gitea.my.labs/fruit-salad/orange/commit/be4a7eac8027c19e604dba9b31688f0f44d94dac",
"author": {
"name": "root",
"email": "root@gitea.my.labs",
"username": "root"
},
"committer": {
"name": "root",
"email": "root@gitea.my.labs",
"username": "root"
},
"added": [],
"removed": [],
"modified": [
"README.md"
],
"timestamp": "2025-05-26T12:17:51Z"
}
],
"repository": {
"id": 2,
"owner": {
"id": 5,
"username": "fruit-salad",
"login": "fruit-salad",
"full_name": "",
"email": "",
"avatar_url": "https://gitea.my.labs/avatars/f141c59cb23e486c17f824d950eeca69"
},
"name": "orange",
"full_name": "fruit-salad/orange",
"description": "Orange is a project for managing orange service.",
"private": true,
"unlisted": false,
"fork": false,
"parent": null,
"empty": false,
"mirror": false,
"size": 80,
"html_url": "https://gitea.my.labs/fruit-salad/orange",
"ssh_url": "git@gitea-ssh.my.labs:fruit-salad/orange.git",
"clone_url": "https://gitea.my.labs/fruit-salad/orange.git",
"website": "",
"stars_count": 0,
"forks_count": 0,
"watchers_count": 1,
"open_issues_count": 0,
"default_branch": "main",
"created_at": "2025-05-26T07:55:24Z",
"updated_at": "2025-05-26T12:16:16Z",
"permissions": {
"admin": true,
"push": true,
"pull": true
}
},
"pusher": {
"id": 1,
"username": "root",
"login": "root",
"full_name": "",
"email": "root@noreply.gitea.my.labs",
"avatar_url": "https://gitea.my.labs/avatars/6eecda161b118df90f110d5e71d26ab6"
},
"sender": {
"id": 1,
"username": "root",
"login": "root",
"full_name": "",
"email": "root@noreply.gitea.my.labs",
"avatar_url": "https://gitea.my.labs/avatars/6eecda161b118df90f110d5e71d26ab6"
}
}
}
Is there an existing issue for this?
Current Behavior
After receiving a webhook,
gitjobdoesn't evaluate it, because it can't find relatedGitRepoobject.As the find query is only based on Web hostname, no
GitRepois found by this query.See
parsePayloadfunctionhttps://github.com/rancher/fleet/blob/main/pkg/webhook/webhook.go#L272
Expected Behavior
Received webhooks must be evaluated using the SSH URLs as well.
Steps To Reproduce
rancher.my.labsgitea.my.labsand SSH URL equals togitea-ssh.my.labs(different hostname)repo: git@gitea-ssh.my.labs:fruit-salad/orange.gitEnvironment
Logs
Anything else?
No response