adevinta / zoe

The Kafka CLI for humans
https://adevinta.github.io/zoe
MIT License
287 stars 21 forks source link

`--from` parsing fails for `P1Y` #15

Closed tomaratyn closed 4 years ago

tomaratyn commented 4 years ago

I'm trying out Zoe and I hit this issue:

zoe --cluster my-cluster --output table  topics consume my-topic --from 'P1Y'
Usage: zoe topics consume [OPTIONS] topic

Error: Invalid value for "--from": Text cannot be parsed to a Duration

According to Wikipedia P1Y is valid one year duration.

Edited to add Zoe version:

❯ zoe version print | jq .
{
  "projectVersion": "0.24.0",
  "buildTimestamp": "2020-07-02T19:55:05.897748",
  "createdBy": "Gradle 6.4",
  "buildJdk": "11.0.7 (Azul Systems, Inc. 11.0.7+10-LTS)",
  "buildOS": "Linux amd64 5.3.0-1031-azure"
}
wlezzar commented 4 years ago

Hi @tomaratyn . Sorry for the late response.

In Zoe we are using the Duration.parse static function that comes with the JDK and indeed it seems to be unable to parse the year form. Unfortunately, there is nothing we can do on zoe's side :( . So I suggest to open this issue on the JDK side. Makes sense? (feel free to reopen the issue if you think otherwise)