[JIRA] (JENKINS-58919) DateTimeParseException on MR web hook

0 views
Skip to first unread message

christian.koeberl@gmail.com (JIRA)

unread,
Aug 14, 2019, 4:56:02 AM8/14/19
to jenkinsc...@googlegroups.com
Christian Köberl created an issue
 
Jenkins / Bug JENKINS-58919
DateTimeParseException on MR web hook
Issue Type: Bug Bug
Assignee: Parichay Barpanda
Components: gitlab-branch-source-plugin
Created: 2019-08-14 08:55
Environment: Jenkins 2.176.2, GitLab 12.1.4
Priority: Minor Minor
Reporter: Christian Köberl

When GitLab sends the web hook for a Merge Request Jenkins fails with a 500 (Internal Server Error). The response shows the error is in parsing one of the timestamps:

java.time.format.DateTimeParseException: Text '2019-08-12T17:08:14+02:00' could not be parsed, unparsed text found at index 22java.time.format.DateTimeParseException: Text '2019-08-12T17:08:14+02:00' could not be parsed, unparsed text found at index 22 at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1952) at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851) at java.time.OffsetDateTime.parse(OffsetDateTime.java:402) at org.gitlab4j.api.utils.ISO8601.toInstant(ISO8601.java:155) at org.gitlab4j.api.utils.ISO8601.toDate(ISO8601.java:169) at org.gitlab4j.api.utils.JacksonJson$JsonDateDeserializer.deserialize(JacksonJson.java:281) at org.gitlab4j.api.utils.JacksonJson$JsonDateDeserializer.deserialize(JacksonJson.java:275) at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127) at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)

This happens since our update to GitLab 12.1 - seems like GitLab now uses this format for "last_commit.timestamp": "2019-08-12T17:08:14+02:00".

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

christian.koeberl@gmail.com (JIRA)

unread,
Aug 14, 2019, 4:57:02 AM8/14/19
to jenkinsc...@googlegroups.com

christian.koeberl@gmail.com (JIRA)

unread,
Aug 14, 2019, 4:57:02 AM8/14/19
to jenkinsc...@googlegroups.com
Christian Köberl updated an issue
 
Change By: Christian Köberl
When GitLab sends the web hook for a Merge Request Jenkins fails with a 500 (Internal Server Error). The response shows the error is in parsing one of the timestamps:

{noformat}

java.time.format.DateTimeParseException: Text '2019-08-12T17:08:14+02:00' could not be parsed, unparsed text found at index
22java.time.format.DateTimeParseException: Text '2019-08-12T17:08:14+02:00' could not be parsed, unparsed text found at index 22
at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1952)
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
at java.time.OffsetDateTime.parse(OffsetDateTime.java:402)
at org.gitlab4j.api.utils.ISO8601.toInstant(ISO8601.java:155)
at org.gitlab4j.api.utils.ISO8601.toDate(ISO8601.java:169)
at org.gitlab4j.api.utils.JacksonJson$JsonDateDeserializer.deserialize(JacksonJson.java:281)
at org.gitlab4j.api.utils.JacksonJson$JsonDateDeserializer.deserialize(JacksonJson.java:275)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
{noformat}


This happens since our update to GitLab 12.1 - seems like GitLab now uses this format for "last_commit.timestamp": "2019-08-12T17:08:14+02:00".

christian.koeberl@gmail.com (JIRA)

unread,
Aug 14, 2019, 4:59:01 AM8/14/19
to jenkinsc...@googlegroups.com
Christian Köberl updated an issue
Change By: Christian Köberl
Attachment: full-error.html

parichay.barpanda@gmail.com (JIRA)

unread,
Aug 14, 2019, 6:12:02 AM8/14/19
to jenkinsc...@googlegroups.com
Parichay Barpanda commented on Bug JENKINS-58919
 
Re: DateTimeParseException on MR web hook

Thanks for the pr in gitlab4j. Btw can you confirm the plugin worked with an earlier GitLab Server version? I am using GitLab Gold version - `GitLab Enterprise Edition 12.2.0-pre` and I do not have such issue. Although it could be an issue with the self hosted GitLab version.

christian.koeberl@gmail.com (JIRA)

unread,
Aug 14, 2019, 7:22:03 AM8/14/19
to jenkinsc...@googlegroups.com

Yes it worked with GitLab 12.0.x. Anyway the ISO date "2018-03-12T10:16:46+07:00"  is valid and should be accepted.

parichay.barpanda@gmail.com (JIRA)

unread,
Aug 14, 2019, 2:52:03 PM8/14/19
to jenkinsc...@googlegroups.com
Parichay Barpanda started work on Bug JENKINS-58919
 
Change By: Parichay Barpanda
Status: Open In Progress

parichay.barpanda@gmail.com (JIRA)

unread,
Aug 14, 2019, 2:52:03 PM8/14/19
to jenkinsc...@googlegroups.com
Parichay Barpanda updated an issue
 
Change By: Parichay Barpanda
Labels: gsoc-2019
Sprint: GSoC 2019. Coding Phase 3

christian.koeberl@gmail.com (JIRA)

unread,
Aug 16, 2019, 1:17:01 AM8/16/19
to jenkinsc...@googlegroups.com

parichay.barpanda@gmail.com (JIRA)

unread,
Aug 16, 2019, 2:03:03 AM8/16/19
to jenkinsc...@googlegroups.com

Thank you Christian Köberl for the fix, I will make a new release of gitlab api plugin and also update the gitlab branch source plugin.

parichay.barpanda@gmail.com (JIRA)

unread,
Aug 17, 2019, 2:06:03 PM8/17/19
to jenkinsc...@googlegroups.com
Change By: Parichay Barpanda
Status: In Review Resolved
Resolution: Fixed

parichay.barpanda@gmail.com (JIRA)

unread,
Aug 17, 2019, 2:06:03 PM8/17/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages