Skip to content

Webhooks for Azure DevOps do not trigger gitjob when URLs don't match old format #4059

@matteotumiati

Description

@matteotumiati

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Here are two valid URLs pointing to the same resource:

  1. https://dev.azure.com///_git/
  2. https://.visualstudio.com//_git/

Both are valid and, according to Azure DevOps, interchangeable. The problem is that if I have set the first one in my GitRepo but Azure DevOps sends a webhook using the second format, then Fleet won't be able to recognize the URL and update the GitRepo.

Expected Behavior

There should be URL matching between the first and the second format because both are valid and supported by Azure DevOps.

Steps To Reproduce

  1. Create a GitRepo with disablePolling: true and without pollingInterval
  2. Enable webhooks with the ingress in Rancher
  3. Set the URL of the GitRepo to https://dev.azure.com/org/project/_git/repo
  4. Disable the "Use the new URL" toggle in organization settings in the Azure DevOps org
  5. Enable service hooks in Azure DevOps to point to the URL configured in Rancher on push against main branch for that URL
  6. Enable debug logging for Fleet (I set debug: true, level: 5)
  7. Commit a change to the repository in Azure DevOps
  8. Observe how in the logs the payload is printed but the commit ID doesn't change and there are no jobs being created to sync the state

Environment

- Architecture: amd64
- Fleet Version: Tested with several versions of fleet above 0.12
- Cluster:
  - Provider: AKS
  - Options: 3 
  - Kubernetes Version: 1.31

Logs

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions