ssh gerrit query with TIME return invald

718 views
Skip to first unread message

UkJung Kim

unread,
May 17, 2017, 2:09:12 AM5/17/17
to Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Hello,

I have problem with 'ssh gerrit query with TIME (after: / before: ..)'

When I use TIME only with date, it works fine.

$ ssh review.tizen.org -p 29418 gerrit query --format=json -- after:'2017-05-01' limit:2
{"project":"platform/kernel/linux-rpi3","branch":"tizen","id":"Icead3fc34b2e37889a1dd407c24aff1444a5ab20","number":"129590","subject":"ARM64: tizen_bcmrpi3_defconfig: Enable USB_SERIAL configurations","owner":{"name":"Jaehoon Chung","email":"jh80....@xxx.com","username":"jaehoon"},"url":"https://review.tizen.org/gerrit/129590","commitMessage":"ARM64: tizen_bcmrpi3_defconfig: Enable USB_SERIAL configurations\n\nEnable USB_SERIAL configurations.\n(CONFIG_SERIAL, CONFIG_SERIAL_GENERIC, CONFIG_SERIAL_CP210X)\n\nChange-Id: Icead3fc34b2e37889a1dd407c24aff1444a5ab20\nSigned-off-by: Jaehoon Chung \u003cjh80.chung@xxx.com\u003e\n","createdOn":1494999765,"lastUpdated":1495000446,"sortKey":"004538220001fa36","open":true,"status":"NEW"}
{"project":"platform/upstream/efl","branch":"tizen","id":"I7e3e9b33476f6c9a472f6fe0ba72a546d3144eaf","number":"128266","subject":"evas_gl: fix glGetObjectPtrLabel prototype.","owner":{"name":"Daekwang Ryu","email":"dkdk...@xxx.com","username":"dkdkryu"},"url":"https://review.tizen.org/gerrit/128266","commitMessage":"evas_gl: fix glGetObjectPtrLabel prototype.\n\nChange-Id: I7e3e9b33476f6c9a472f6fe0ba72a546d3144eaf\n","createdOn":1494232115,"lastUpdated":1495000276,"sortKey":"0045381f0001f50a","open":false,"status":"MERGED"}
{"type":"stats","rowCount":2,"runTimeMilliseconds":9}


But if I use TIME with time, it doesn't work fine with me.

$ ssh review.tizen.org -p 29418 gerrit query --format=json -- after:'2017-05-01 00:00:00' limit:2
{"type":"error","message":"Unsupported query:00"}


$ ssh review.tizen.org -p 29418 gerrit query --format=json -- after:'2017-05-01 12:00:00' limit:2
{"type":"stats","rowCount":0,"runTimeMilliseconds":2}

Gerrit version is 2.9.4.


I got the similar results with gerrit 2.13.7.

$ ssh xxx.net -p 29418 gerrit query --format=json -- after:'2017-05-01 12:00:00' limit:2
{"type":"stats","rowCount":0,"runTimeMilliseconds":3,"moreChanges":false}

Please help me if I use wrong query.

Thanks.

Matthew Webber

unread,
May 17, 2017, 4:28:55 AM5/17/17
to Repo and Gerrit Discussion

On Wednesday, 17 May 2017 07:09:12 UTC+1, UkJung Kim wrote:
I have problem with 'ssh gerrit query with TIME (after: / before: ..)'

I'm running Gerrit  2.13.8, and I also see some inconsistent results:

$ ssh -p 29418 gerrit.diamond.ac.uk gerrit query --format=json -- after:'2017-05-16 00:00:00' limit:2
{"type":"stats","rowCount":1,"runTimeMilliseconds":3,"moreChanges":false}

$ ssh
-p 29418 gerrit.diamond.ac.uk gerrit query --format=json -- after:'2017-05-16' limit:2
{"type":"stats","rowCount":2,"runTimeMilliseconds":8,"moreChanges":true}

Matthew

David Pursehouse

unread,
May 17, 2017, 5:18:08 AM5/17/17
to Matthew Webber, Repo and Gerrit Discussion
what are the 'last updated' timestamps on the results?

and is it possible that a change got updated in the time between issuing the first query and the second query?
 
Matthew

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

UkJung Kim

unread,
May 18, 2017, 12:36:43 AM5/18/17
to Repo and Gerrit Discussion, mat...@unsolvable.org
lastUpdated timestamps are 

lastUpdated: 2017-05-17 08:19:36 UTC
lastUpdated: 2017-05-17 05:51:16 UTC

and there is no changes at all.


2017년 5월 17일 수요일 오후 6시 18분 8초 UTC+9, David Pursehouse 님의 말:

David Pursehouse

unread,
May 18, 2017, 12:42:33 AM5/18/17
to UkJung Kim, Repo and Gerrit Discussion, mat...@unsolvable.org
On Thu, May 18, 2017 at 1:36 PM UkJung Kim <nere...@gmail.com> wrote:
lastUpdated timestamps are 

lastUpdated: 2017-05-17 08:19:36 UTC
lastUpdated: 2017-05-17 05:51:16 UTC

and there is no changes at all.


Can you try explicitly adding the timezone on the query?

 

2017년 5월 17일 수요일 오후 6시 18분 8초 UTC+9, David Pursehouse 님의 말:


On Wed, May 17, 2017 at 5:28 PM Matthew Webber <mat...@unsolvable.org> wrote:


what are the 'last updated' timestamps on the results?

and is it possible that a change got updated in the time between issuing the first query and the second query?
 
Matthew

UkJung Kim

unread,
May 18, 2017, 12:50:36 AM5/18/17
to Repo and Gerrit Discussion, nere...@gmail.com, mat...@unsolvable.org
2017년 5월 18일 목요일 오후 1시 42분 33초 UTC+9, David Pursehouse 님의 말:
On Thu, May 18, 2017 at 1:36 PM UkJung Kim <nere...@gmail.com> wrote:
lastUpdated timestamps are 

lastUpdated: 2017-05-17 08:19:36 UTC
lastUpdated: 2017-05-17 05:51:16 UTC

and there is no changes at all.


Can you try explicitly adding the timezone on the query?


I got the same results even with timezone.

$ ssh review.tizen.org -p 29418 gerrit query --format=json -- after:'2017-05-01 00:00:00 -0700' limit:2

{"type":"error","message":"Unsupported query:00"}

$ ssh review
.tizen.org -p 29418 gerrit query --format=json -- after:'2017-05-01 12:00:00 -0700' limit:2
{"type":"stats","rowCount":0,"runTimeMilliseconds":1}
 

UkJung Kim

unread,
May 23, 2017, 12:46:18 AM5/23/17
to Repo and Gerrit Discussion
It is strange that the same query with gerrit Web or Rest API work fine.
But the issue is only with ssh command line.

David Pursehouse

unread,
May 23, 2017, 1:30:05 AM5/23/17
to UkJung Kim, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
I was able to reproduce the behaviour and found that it works as expected after escaping and quoting the date:

ssh -p xxx.net gerrit query --format-json -- 'after:\"2017-05-01 12:00:00\"' limit:2


 
Please help me if I use wrong query.

Thanks.

--

UkJung Kim

unread,
May 23, 2017, 2:54:38 AM5/23/17
to Repo and Gerrit Discussion, nere...@gmail.com
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
2017년 5월 23일 화요일 오후 2시 30분 5초 UTC+9, David Pursehouse 님의 말:
On Wed, May 17, 2017 at 3:09 PM UkJung Kim <nere...@gmail.com> wrote:

$ ssh xxx.net -p 29418 gerrit query --format=json -- after:'2017-05-01 12:00:00' limit:2
{"type":"stats","rowCount":0,"runTimeMilliseconds":3,"moreChanges":false}


I was able to reproduce the behaviour and found that it works as expected after escaping and quoting the date:

ssh -p xxx.net gerrit query --format-json -- 'after:\"2017-05-01 12:00:00\"' limit:2


Oh, it resolve my issue.
I have tried escaping and quoting but have not tried that combination.
Thank you. very much.
Reply all
Reply to author
Forward
0 new messages