You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by arvindn05 <no...@github.com> on 2015/06/23 01:18:15 UTC

[jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Fixes issue where glance fails to parse image details with milli seconds in the date.
The issue is described in this bug. https://issues.apache.org/jira/browse/JCLOUDS-333

Caused by: java.text.ParseException: Unparseable date: "2015-06-19T15:06:58.000+0000"
at java.text.DateFormat.parse(Unknown Source)
at org.jclouds.date.internal.SimpleDateFormatDateService.iso8601SecondsDateParse(SimpleDateFormatDateService.java:164)
... 17 more

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs-openstack/pull/195

-- Commit Summary --

  * Fix issue where glance fails to parse Image details which has microseconds in Date format

-- File Changes --

    M openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/functions/ParseImageDetailsFromHeaders.java (6)
    M openstack-glance/src/test/java/org/jclouds/openstack/glance/v1_0/functions/ParseImageDetailsFromHeadersTest.java (119)

-- Patch Links --

https://github.com/jclouds/jclouds-labs-openstack/pull/195.patch
https://github.com/jclouds/jclouds-labs-openstack/pull/195.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by arvindn05 <no...@github.com>.
anything i need to do before this change can be merged @zack-shoylev ?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195#issuecomment-119742617

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by Zack Shoylev <no...@github.com>.
Thanks, I will merge and backport in a bit.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195#issuecomment-120109048

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by arvindn05 <no...@github.com>.
Closed #195.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195#event-352189889

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by Ignasi Barrera <no...@github.com>.
> +    public ImageDetails expected() {
> +        return ImageDetails.builder()
> +                .id("fcc451d0-f6e4-4824-ad8f-70ec12326d07")
> +                .name("debian")
> +                .properties(ImmutableMap.of("description", "debian image description"))
> +                .containerFormat(ContainerFormat.BARE)
> +                .diskFormat(DiskFormat.RAW)
> +                .checksum("233afa7b8809d840679b5f0d36d7350a")
> +                .size(65645798l)
> +                .status(Image.Status.ACTIVE)
> +                .owner("5821675")
> +                .isPublic(true)
> +                .createdAt(new SimpleDateFormatDateService().iso8601DateOrSecondsDateParse("2012-05-18T18:06:44"))
> +                .updatedAt(new SimpleDateFormatDateService().iso8601DateOrSecondsDateParse("2012-05-18T18:42:58"))
> +                .build();
> +    }

jclouds uses a [3 space indentation](https://cwiki.apache.org/confluence/display/JCLOUDS/Coding+Standards). Could you revert the re-formatting of this class so we can see the real diff? 

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195/files#r33062677

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by arvindn05 <no...@github.com>.
I am not sure if the rebase worked....if not i can just create another clean pull request without the many commits. please let me know @zack-shoylev 

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195#issuecomment-119778676

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by arvindn05 <no...@github.com>.
Thanks Zack and nac. Sorry for the formatting issues, this is my first commit so please bear with me :)

The merge commit is not needed. Trying to learn working with github.

Please see my latest review. Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195#issuecomment-114621955

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by Zack Shoylev <no...@github.com>.
Rebase to a single commit

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195#issuecomment-119757953

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by Zack Shoylev <no...@github.com>.
Hmm commits seem messed up. If you want to, you can make a new one. Just make sure to reference it here. Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195#issuecomment-119784737

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by Zack Shoylev <no...@github.com>.
Outside of some formatting issues and the merge commit (is it needed?), this looks good. Good bug to fix. Thanks @arvindn05 

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195#issuecomment-114613597

Re: [jclouds-labs-openstack] Fixes issue where glance fails to parse image details with milli seconds in the date (#195)

Posted by arvindn05 <no...@github.com>.
created a new pull request with just the one commit. @zack-shoylev 
https://github.com/jclouds/jclouds-labs-openstack/pull/197

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/195#issuecomment-120108907