-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure devops webhook call fails on parsing time #183
Comments
The AZ webhook payload contains the parent project field which is having the LastUpdateTime field filled invalid repository": { |
@DarkosGahan Do you have a sanitized JSON sample I can use for testing? That field is not shown for a code push in the sample docs: https://learn.microsoft.com/en-us/azure/devops/service-hooks/events?toc=%2Fazure%2Fdevops%2Fmarketplace-extensibility%2Ftoc.json&view=azure-devops#code-pushed It's also important to note that we parse the JSON directly into the |
Hello David, Hopefully, this helps, this is the event returned by azure. I have attached a txt file, the json struct doesn't seem to get indented when pasting the text as code. the webhook seem to fail on the date provided for the main project, which indeed doesn't make sense. I have checked with our teams and nobody seem to know how to modify that date. |
@DarkosGahan I dug into the payload you gave me some more and found that the
The error you are seeing comes from the parser expecting expecting that latter format. I tested using the Updating the code to parse each date/time field in the payload differently is not something that is viable to do on our end. That would require too much logic and the JSON payload should never be mixing and matching date/time formats within the same payload for this specific reason |
Hi,
A webhook call from azure devops fails with the following message:
webhook-go[XXXXX]: &time.ParseError{Layout:"2006-01-02T15:04:05Z07:00", Value:"0001-01-01T00:00:00", LayoutElem:"Z07:00", ValueElem:"", Message:""}
webhook-go[XXXXX]: time="2024-12-11T08:09:12Z" level=error msg="error parsing webhook: parsing time "0001-01-01T00:00:00" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "Z07:00""
both azuredevops and server are set to UTC
I can see the following data in the event details on the azure devops webhook:
I have no knowledge in go so I am unable to fix it by myself
Thank you
The text was updated successfully, but these errors were encountered: